Outbound SMTP Auth

Many ISPs require authentication before routing mail through their mail servers. This was a minor annoyance years ago when running ones own mail server, since you could simply bypass theirs. On today's internet, with dynamic IPs appearing in blacklists, and ISPs themselves blocking port 25 unless it's to/from their servers, this capability is now a requirement.

This document will tell you how to set up outbound SMTP Auth using development versions of the relevant packages for SME 6.0 from Mitel. As always, there is more than one way to do it, but this way does not require you to rebuild qmail, or use another MTA with the capability built in.

Step One: Obtain the updated packages

(due to this page being pretty much empty, consider this a rough draft copied from http://web.archive.org/web/20040214112450/http://www.powerframe.com/e-smith/qmail-remote-auth-smtp/)

qmail remote authenticated SMTP

This customization enables your server to send outgoing email through your Internet provider's SMTP server using authenticated SMTP (required by some Internet providers such as Rogers High Speed in Canada).

Technically it supports only the Simple Authentication Security Layer (SASL) LOGIN authentication method. It does not support STARTTLS or other authentication methods.

It works with the Mitel 6000 Managed Application Server version 5.6. Step-by-step instructions

1. Download the following three files into the /root directory on your server

2. Update qmail by running the following command from the /root directory:

rpm -Uvh qmail-1.03-08jdm.i386.rpm
/etc/rc.d/init.d/qmail restart

3. Install the updated SmartHost template by running the following command from the /root directory:

mkdir -p /etc/e-smith/templates-custom/var/qmail/control/smtproutes
cp 20SMTPSmartHost /etc/e-smith/templates-custom/var/qmail/control/smtproutes

4. Use the "Other e-mail settings" function from the server manager to specify the Internet provider's SMTP server.

5. Enter the username and password required by your Internet provider for authenticated SMTP, by running the following commands (substitute your account name and password where it says myaccount and mypass):

/sbin/e-smith/db configuration set SMTPSmartHostAccount myaccount
/sbin/e-smith/db configuration set SMTPSmartHostPassword mypass
/sbin/e-smith/expand-template /var/qmail/control/smtproutes

6. Verify that everything worked by reviewing the file /var/qmail/control/smtproutes. You should see a base64 encoded username and password at the end of the line where your Internet provider's SMTP server is specified.

7. Try sending some email messages to people at various sites other than yours. Use the command:

tail -f /var/log/qmail/current

to see whether the outgoing mail is being accepted by your Internet provider's mail server.

8. If you ever want to disable authenticated SMTP, run the following commands:

/sbin/e-smith/db configuration delete SMTPSmartHostAccount
/sbin/e-smith/db configuration delete SMTPSmartHostPassword
/sbin/e-smith/expand-template /var/qmail/control/smtproutes

You can re-enable the feature at any time by returning to step 5.