Activating SMTP Authentication To Other Mail Servers (Postfix)
Support knowledgebase (rsimai_imap_smtp_auth)
Applies to
eMail Server: Version 3
Situation
You want to activate SMTP-AUTH so the eMail Server can authenticate
itself as a client to another mail server. Although the following
description mainly refers to the eMail Server 3, it should also work
with the standard distribution if Postfix is used as MTA. A description for
sendmail is available here
Why SMTP-AUTH
Nowadays, many ISPs have opted to accept e-mails only from clients
that have previously authenticated
themselves to the server. The reason for this is that it is very
difficult to monitor who sends
messages to whom in dial-up connections. The increase of
SPAM messages makes it necessary to check if the sender is authorized. 'pop before smtp', which
allows the sender to use the provider's SMTP server during a given
period of time after an
authenticated POP call, is often used for these purposes. The problem
mostly arises when the
eMail Server is temporarily connected to the Internet -- without a dedicated
line and static IP address.
Prerequisite
Postfix is already installed and configured on your system. Your ISP has already
supplied you with a user name and password that can be used for the
server authentication
via SMTP. Since this is not normal procedure, we recommend you ask
your provider if you can use SMTP-AUTH.
Procedure
- Make sure the following entries are available in
/etc/postfix/main.cf
or insert them if this is not the case:
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
- Create a file called
/etc/postfix/saslpasswd
with the
following content:
destination username:password
destination
usually refers to the relay host you use.
With this, instruct Postfix to deliver via SMTP-AUTH (to
the possible extent) all messages transported through the specified
host. Other possible routes will be dealt with as before.
- Finally, generate the new map and reload the configuration:
postmap /etc/postfix/saslpasswd
rcpostfix reload
Possible Problems
- Your provider does not support SMTP-AUTH.
You can test it by means of a telnet to the port 25 of the host:
me@work:~>telnet smtpserver.provider.de 25
220 smtpserver.provider.de Mailservice ready
EHLO my.mailserver.de
...
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
...
If this line is included in the output, your provider's mail server
supports SMTP-AUTH.
- Wrong password or wrong user name in
/etc/postfix/saslpasswd
or postmap
is not
executed after a modification.
If /var/log/mail
contains an entry like:
...Authentication failed: SASL authentication failed...
check /etc/postfix/saslpasswd
or ask your provider for the data.
Keywords: IMAP3, POSTFIX, SMTP, AUTH, SASL
Categories:
SuSE Linux IMAP Server
Feedback welcome: Send Mail to srsimai@suse.de (Please give the following subject: SDB-rsimai_imap_smtp_auth
)
SDB-rsimai_imap_smtp_auth, Copyright SuSE Linux AG, Nürnberg, Germany
- Version: 24. Apr 2002
SuSE Linux AG - Last generated: 22. Mai 2002 by ip (sdb_gen 1.40.0)