SMTP Authentication in Jsmtpd

Jsmtpd supportstwo authentication methods (PLAIN/LOGIN) via the !org.jsmtpd.plugins.smtpExtension.BasicSmtpAuth plugin.

Load the extension

Edit your config file etc/jsmtpd-plugin-config.xml, and locate the smtpExtensions element. Add the following configuration under the element :

		<smtpExtension name="auth" class="org.jsmtpd.plugins.smtpExtension.BasicSmtpAuth">
		</smtpExtension>

Configure user/passwords

Now, you need to add users/passwords to this smtpExtension. You can either set login/passwords in clear (bad ;), or encrypted version of the password. In any case, the property is a string containing the user and the password, separated by a coma. Properties :

  • PlainUser : Adds the user/password in clear text
  • MD5User : Login is in clear, but the password is the base64 encoded version of the md5 hash of your password. Use the tool org.jsmtp.PasswordGenerator to generate such passwords.

Secured authentication ?

With the plain/login methods of authentication, passwords are sent in clear. You can tell the plugin to require a secured communication channel (such as a SSL/TLS channel, provided by another SMTP extension of Jsmtpd, !TLSSwitcher. To tell it do so, use the property RequireSecuredChannel, and set it to true.

Example

At the end, it should look like :

		<smtpExtension name="auth" class="org.jsmtpd.plugins.smtpExtension.BasicSmtpAuth">
			<propertyset name="MD5User" value="jfp,QtOI+LHbmX+q99q0h/ESkA=="/>
                        <propertyset name="PlainUser" value="dummyUser,DummyPassword"/>
			<propertyset name="RequireSecuredChannel" value="true"/>	
		</smtpExtension>

Attachments