How is the Simple Authentication and Security Layer (SASL) authentication enabled in Postfix SMTP server in Red Hat Enterprise Linux 5?
In Just 4 Mins
Cyrus Simple Authentication and Security Layer (SASL) library authenticates a remote SMTP client’s username and password; while the email accounts are part of the local system accounts. To enable (SASL) authentication in Postfix SMTP server follow these steps:
Step 1: Verify that cyrus-sasl has been installed.
Step 2: Modify /etc/postfix/main.cf, adding the following two lines.
smtpd_sasl_path = smtpd
smtpd_sasl_auth_enable = yes
Step 3: Modify /usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
Step 4: Start the postfix and saslauthd service
service saslauthd start
service postfix start
Step 5: Test the SASL authentication on the Postfix SMTP server. To test the server side, connect to the Postfix SMTP server port to demonstrate if the connection is successful.
Example using telnet:
$ telnet server.test.com 25
. . .
220 server.test.com ESMTP Postfix
EHLO client.test.com
250-server.test.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN AHJlZGhhdAByZWRoYXQ=
235 2.0.0 Authentication successful