How To Enable SASL Authenticated Email Relay In Postfix

Below info copied from http://www.postfix.org/SASL_README.html#server_sasl_enable
Make sure saslauthd is running first.
Edit /etc/postfix/main.cf:
smtpd_sasl_type = cyrus
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated {other options that were already there}
# postfix reload
To test (you supply the items in bold):
% telnet server.example.com 25
…
220 server.example.com ESMTP Postfix
EHLO client.example.com
250-server.example.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH DIGEST-MD5 PLAIN CRAM-MD5
250 8BITMIME
AUTH PLAIN AHRlc3QAdGVzdHBhc3M=
235 Authentication successful
Create the encrypted string show above using the perl script you obtain from the link below:
% gen-auth plain
username: {uname}
password: {password}
The gen-auth Perl script was written by John Jetmore and can be found at http://jetmore.org/john/code/gen-auth.
Leave Your Comment
All fields marked with "*" are required.