{"id":904,"date":"2012-08-02T15:56:02","date_gmt":"2012-08-02T07:56:02","guid":{"rendered":"http:\/\/rmohan.com\/?p=904"},"modified":"2012-08-02T16:00:55","modified_gmt":"2012-08-02T08:00:55","slug":"postfix-smtp-auth-tls-howto","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=904","title":{"rendered":"Postfix-SMTP-AUTH-TLS-Howto"},"content":{"rendered":"<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong><span style=\"font-size: medium;\">Postfix-SMTP-AUTH-TLS-Howto<\/span><\/strong><br \/>\n<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Version 1.0<br \/>\nAuthor: Falko Timme &lt;falko [dot] timme [at] projektfarm [dot] de&gt;<br \/>\nLast edited 12\/31\/2003 <\/span><\/p>\n<div>You can find the latest version of this document at <a href=\"http:\/\/www.howtoforge.com\/howto_postfix_smtp_auth_tls_howto\/\">http:\/\/www.howtoforge.com<\/a><\/div>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">This document describes how to install a mail server based on postfix that is capable of SMTP-AUTH and TLS. It should work (maybe with slight changes concerning paths etc.) on all *nix operating systems. I tested it on Debian Woody and Fedora Core 1 so far.<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">This document comes without warranty of any kind!<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>1 Get the Sources<\/strong><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">We need the following software: openssl, cyrus-sasl2, postfix and the TLS patch for postfix. We will install the software from the <em><span style=\"font-family: Courier New,Courier,mono;\">\/tmp<\/span><\/em> directory.<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>cd \/tmp<\/em><\/span><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">wget http:\/\/www.openssl.org\/source\/openssl-0.9.7c.tar.gz<\/span><\/em><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">wget &#8211;passive-ftp ftp:\/\/ftp.andrew.cmu.edu\/pub\/cyrus-mail\/cyrus-sasl-2.1.17.tar.gz<\/span><\/em><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">wget &#8211;passive-ftp ftp:\/\/ftp.aet.tu-cottbus.de\/pub\/postfix_tls\/related\/postfix\/postfix-2.0.16.tar.gz<\/span><\/em><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">wget &#8211;passive-ftp ftp:\/\/ftp.aet.tu-cottbus.de\/pub\/postfix_tls\/pfixtls-0.8.16-2.0.16-0.9.7b.tar.gz<\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>2 Install Openssl<\/strong><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>tar xvfz openssl-0.9.7c.tar.gz<br \/>\ncd openssl-0.9.7c<br \/>\n.\/config<br \/>\nmake<br \/>\nmake install<\/em><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>3 Install Cyrus-sasl<\/strong><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>cd \/tmp<br \/>\ntar xvfz cyrus-sasl-2.1.17.tar.gz<br \/>\ncd cyrus-sasl-2.1.17<br \/>\n.\/configure &#8211;enable-anon &#8211;enable-plain &#8211;enable-login &#8211;disable-krb4 &#8211;with-saslauthd=\/var\/run\/saslauthd &#8211;with-pam &#8211;with-openssl=\/usr\/local\/ssl &#8211;with-plugindir=\/usr\/local\/lib\/sasl2 &#8211;enable-cram &#8211;enable-digest &#8211;enable-otp<\/em><\/span> <span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">(1 line!)<\/span><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">make<br \/>\nmake install<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">If <\/span><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">\/usr\/lib\/sasl2<\/span><\/em> <span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">exists: <\/span><br \/>\n<em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">mv \/usr\/lib\/sasl2 \/usr\/lib\/sasl2_orig<\/span><\/em><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">ln -s \/usr\/local\/lib\/sasl2 \/usr\/lib\/sasl2<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Create the file <em> <span style=\"font-family: Courier New,Courier,mono;\"> \/usr\/local\/lib\/sasl2\/smtpd.conf<\/span><\/em>:<\/span><\/p>\n<table width=\"90%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\" bgcolor=\"#CCCCCC\">\n<tbody>\n<tr>\n<td>\n<pre># This sets smtpd to authenticate using the saslauthd daemon.\r\npwcheck_method:saslauthd\r\n# This allows only plain, login, cram-md5 and digest-md5 as the authentication mechanisms.\r\nmech_list: plain login cram-md5 digest-md5<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">4 Install Postfix<\/span><\/strong><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">cd \/tmp<br \/>\ntar xvfz pfixtls-0.8.16-2.0.16-0.9.7b.tar.gz<br \/>\ntar xvfz postfix-2.0.16.tar.gz<br \/>\ncd postfix-2.0.16<br \/>\nuseradd postfix<br \/>\ngroupadd postdrop<br \/>\npatch -p1 &lt; ..\/pfixtls-0.8.16-2.0.16-0.9.7b\/pfixtls.diff<br \/>\nmake makefiles CCARGS=&#8221;-DHAS_SSL -DUSE_SASL_AUTH -I\/usr\/local\/include\/sasl -I\/usr\/local\/ssl\/include&#8221; AUXLIBS=&#8221;-L\/usr\/local\/ssl\/lib -L\/usr\/local\/lib -R\/usr\/local\/lib -lsasl2 -lssl -lcrypto&#8221; <\/span><\/em><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">(1 line!)<\/span><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><br \/>\nmake<br \/>\nmake install<\/span><\/em> <span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">(accept the default values)<\/span><br \/>\n<span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em><br \/>\ncp \/etc\/postfix\/aliases \/etc\/<br \/>\nnewaliases<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Create<\/span> <em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">\/etc\/init.d\/postfix<\/span><\/em><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">:<\/span><\/p>\n<table width=\"90%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\" bgcolor=\"#CCCCCC\">\n<tbody>\n<tr>\n<td>\n<pre>#!\/bin\/bash\r\n#\r\n# postfix        This script controls the postfix daemon.\r\n#\r\n\r\n# description: Postfix MTA\r\n# processname: postfix\r\n\r\ncase \"$1\" in\r\n    start)\r\n        \/usr\/sbin\/postfix start\r\n    ;;\r\n    stop)\r\n        \/usr\/sbin\/postfix stop\r\n    ;;\r\n    reload)\r\n        \/usr\/sbin\/postfix reload\r\n    ;;\r\n    restart)\r\n        $0 stop\r\n        $0 start\r\n    ;;\r\n    *)\r\n    echo \"Usage: $0 {start|stop|reload|restart}\"\r\n    exit 1\r\nesac\r\nexit 0<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">chmod 755 \/etc\/init.d\/postfix<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">In order to start <span style=\"font-family: Courier New,Courier,mono;\"> <em>postfix<\/em><\/span> at boot time do the following:<\/span><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">ln -s \/etc\/init.d\/postfix \/etc\/rc2.d\/S20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc3.d\/S20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc4.d\/S20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc5.d\/S20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc0.d\/K20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc1.d\/K20postfix<br \/>\nln -s \/etc\/init.d\/postfix \/etc\/rc6.d\/K20postfix<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Our postfix will run chrooted in <em><span style=\"font-family: Courier New,Courier,mono;\">\/var\/spool\/postfix<\/span><\/em> so we have to copy a few files:<\/span><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">mkdir -p \/var\/spool\/postfix\/etc<br \/>\ncd \/etc<br \/>\ncp localtime services hosts resolv.conf \/var\/spool\/postfix\/etc\/<br \/>\nmkdir -p \/var\/spool\/postfix\/var\/run<br \/>\nmv -f \/var\/run\/saslauthd\/ \/var\/spool\/postfix\/var\/run\/<br \/>\nchmod 755 \/var\/spool\/postfix\/var\/run\/saslauthd\/<br \/>\nln -s \/var\/spool\/postfix\/var\/run\/saslauthd\/ \/var\/run\/saslauthd<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Now we have to generate the certificate files needed for TLS:<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>mkdir \/etc\/postfix\/ssl<br \/>\ncd \/etc\/postfix\/ssl\/<br \/>\n<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">If<\/span> <span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>\/usr\/bin\/openssl<\/em><\/span> <span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">exists:<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>mv<\/em><\/span> <span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>\/usr\/bin\/openssl<\/em><\/span> <span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>\/usr\/bin\/openssl<\/em><\/span><span style=\"font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">_orig<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>ln -s \/usr\/local\/ssl\/bin\/openssl \/usr\/bin\/openssl<br \/>\nopenssl genrsa -des3 -rand \/etc\/hosts -out smtpd.key 1024<\/em><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif;\">&lt;- Enter a password for smtpd.key.<\/span><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>chmod 600 smtpd.key<br \/>\nopenssl req -new -key smtpd.key -out smtpd.csr<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">&lt;- Again, enter your password for smtpd.key.<br \/>\n&lt;- Enter your Country Name (e.g., &#8220;DE&#8221;).<br \/>\n&lt;- Enter your State or Province Name.<br \/>\n&lt;- Enter your City.<br \/>\n&lt;- Enter your Organization Name (e.g., the name of your company).<br \/>\n&lt;- Enter your Organizational Unit Name (e.g. &#8220;IT Department&#8221;).<br \/>\n&lt;- Enter the Fully Qualified Domain Name of the system (e.g. &#8220;server1.example.com&#8221;).<br \/>\n&lt;- Enter your Email Address.<br \/>\n<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">The following information is optional:<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">&lt;- Enter a challenge password.<br \/>\n&lt;- Enter an optional company name.<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">&lt;- Again, enter your password for smtpd.key.<\/span><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em><br \/>\n<\/em><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>openssl rsa -in smtpd.key -out smtpd.key.unencrypted<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">&lt;- Again, enter your password for smtpd.key.<\/span><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em><br \/>\n<\/em><\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>mv -f smtpd.key.unencrypted smtpd.key<br \/>\nopenssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">&lt;- Again, enter your password for smtpd.key.<br \/>\n&lt;- Enter your Country Name (e.g., &#8220;DE&#8221;).<br \/>\n&lt;- Enter your State or Province Name.<br \/>\n&lt;- Enter your City.<br \/>\n&lt;- Enter your Organization Name (e.g., the name of your company).<br \/>\n&lt;- Enter your Organizational Unit Name (e.g. &#8220;IT Department&#8221;).<br \/>\n&lt;- Enter the Fully Qualified Domain Name of the system (e.g. &#8220;server1.example.com&#8221;).<br \/>\n&lt;- Enter your Email Address.<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Edit <em><span style=\"font-family: Courier New,Courier,mono;\">\/etc\/postfix\/main.cf<\/span><\/em> in order to enable SMTP-AUTH and TLS:<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>postconf -e &#8216;mydomain = example.com&#8217;<br \/>\npostconf -e &#8216;myhostname = server1.$mydomain&#8217;<br \/>\npostconf -e &#8216;smtpd_sasl_local_domain =&#8217;<br \/>\npostconf -e &#8216;smtpd_sasl_auth_enable = yes&#8217;<br \/>\npostconf -e &#8216;smtpd_sasl_security_options = noanonymous&#8217;<br \/>\npostconf -e &#8216;broken_sasl_auth_clients = yes&#8217;<br \/>\npostconf -e &#8216;smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,check_relay_domains&#8217;<br \/>\npostconf -e &#8216;inet_interfaces = all&#8217;<br \/>\npostconf -e &#8216;alias_maps = hash:\/etc\/aliases&#8217;<br \/>\n<\/em><\/span><span style=\"font-family: Courier New,Courier,mono;\"><em><span style=\"font-size: small;\">postconf -e &#8216;smtpd_tls_auth_only = no&#8217;<br \/>\npostconf -e &#8216;smtp_use_tls = yes&#8217;<br \/>\npostconf -e &#8216;smtpd_use_tls = yes&#8217;<br \/>\npostconf -e &#8216;smtp_tls_note_starttls_offer = yes&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_key_file = \/etc\/postfix\/ssl\/smtpd.key&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_cert_file = \/etc\/postfix\/ssl\/smtpd.crt&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_CAfile = \/etc\/postfix\/ssl\/cacert.pem&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_loglevel = 1&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_received_header = yes&#8217;<br \/>\npostconf -e &#8216;smtpd_tls_session_cache_timeout = 3600s&#8217;<br \/>\npostconf -e &#8216;tls_random_source = dev:\/dev\/urandom&#8217;<\/span><\/em><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>5 Configure Saslauthd<\/strong><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Create <em><span style=\"font-family: Courier New,Courier,mono;\">\/etc\/init.d\/saslauthd<\/span><\/em>:<\/span><\/p>\n<table width=\"90%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\" bgcolor=\"#CCCCCC\">\n<tbody>\n<tr>\n<td>\n<pre>#!\/bin\/sh -e\r\n\r\nNAME=saslauthd\r\nDAEMON=\"\/usr\/sbin\/${NAME}\"\r\nDESC=\"SASL Authentication Daemon\"\r\nDEFAULTS=\/etc\/default\/saslauthd\r\n\r\ntest -f \"${DAEMON}\" || exit 0\r\n\r\n# Source defaults file; edit that file to configure this script.\r\nif [ -e \"${DEFAULTS}\" ]; then\r\n    . \"${DEFAULTS}\"\r\nfi\r\n\r\n# If we're not to start the daemon, simply exit\r\nif [ \"${START}\" != \"yes\" ]; then\r\n    exit 0\r\nfi\r\n\r\n# If we have no mechanisms defined\r\nif [ \"x${MECHANISMS}\" = \"x\" ]; then\r\n    echo \"You need to configure ${DEFAULTS} with mechanisms to be used\"\r\n    exit 0\r\nfi\r\n\r\n# Add our mechanimsms with the necessary flag\r\nfor i in ${MECHANISMS}; do\r\n    PARAMS=\"${PARAMS} -a ${i}\"\r\ndone\r\n\r\n# Consider our options\r\ncase \"${1}\" in\r\n  start)\r\n        echo -n \"Starting ${DESC}: \"\r\n        ln -fs \/var\/spool\/postfix\/var\/run\/${NAME} \/var\/run\/${NAME}\r\n        ${DAEMON} ${PARAMS}\r\n        echo \"${NAME}.\"\r\n        ;;\r\n  stop)\r\n        echo -n \"Stopping ${DESC}: \"\r\n        PROCS=`ps aux | grep -iw '\/usr\/sbin\/saslauthd' | grep -v 'grep' |awk '{print $2}' | tr '\\n' ' '`\r\n        if [ \"x${PROCS}\" != \"x\" ]; then\r\n          kill -15 ${PROCS} &amp;&gt; \/dev\/null\r\n        fi\r\n        echo \"${NAME}.\"\r\n        ;;\r\n  restart|force-reload)\r\n        $0 stop\r\n        sleep 1\r\n        $0 start\r\n        echo \"${NAME}.\"\r\n        ;;\r\n  *)\r\n        echo \"Usage: \/etc\/init.d\/${NAME} {start|stop|restart|force-reload}\" &gt;&amp;2\r\n        exit 1\r\n        ;;\r\nesac\r\n\r\nexit 0<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">chmod 755 \/etc\/init.d\/saslauthd<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">In order to start <span style=\"font-family: Courier New,Courier,mono;\"> <em>saslauthd<\/em><\/span> at boot time do the following:<\/span><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">ln -s \/etc\/init.d\/saslauthd \/etc\/rc2.d\/S20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc3.d\/S20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc4.d\/S20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc5.d\/S20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc0.d\/K20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc1.d\/K20saslauthd<br \/>\nln -s \/etc\/init.d\/saslauthd \/etc\/rc6.d\/K20saslauthd<\/span><\/em><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Then create <em><span style=\"font-family: Courier New,Courier,mono;\">\/etc\/default\/saslauthd<\/span><\/em>:<\/span><\/p>\n<table width=\"90%\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\" bgcolor=\"#CCCCCC\">\n<tbody>\n<tr>\n<td>\n<pre># This needs to be uncommented before saslauthd will be run automatically\r\nSTART=yes\r\n\r\n# You must specify the authentication mechanisms you wish to use.\r\n# This defaults to \"pam\" for PAM support, but may also include\r\n# \"shadow\" or \"sasldb\"\r\nMECHANISMS=shadow<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">If you find out that <em><span style=\"font-family: Courier New,Courier,mono;\">saslauthd<\/span><\/em> is located in <em><span style=\"font-family: Courier New,Courier,mono;\">\/usr\/local\/sbin<\/span><\/em> instead of <em><span style=\"font-family: Courier New,Courier,mono;\">\/usr\/sbin<\/span><\/em> create a symbolic link:<\/span><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>ln -s \/usr\/local\/sbin\/saslauthd \/usr\/sbin\/saslauthd<\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Then start <em><span style=\"font-family: Courier New,Courier,mono;\">saslauthd<\/span><\/em> and <em><span style=\"font-family: Courier New,Courier,mono;\">postfix<\/span><\/em>:<\/span><\/p>\n<p><em><span style=\"font-family: Courier New,Courier,mono; font-size: small;\">\/etc\/init.d\/saslauthd start<\/span><\/em><\/p>\n<p><span style=\"font-family: Courier New,Courier,mono; font-size: small;\"><em>\/etc\/init.d\/postfix start<\/em><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>6 Test your Configuration<\/strong><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">To see if SMTP-AUTH and TLS work properly now run the following command:<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">telnet localhost 25<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">After you have established the connection to your postfix mail server type<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">ehlo localhost<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">If you see the lines<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">250-STARTTLS<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">and<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">250-AUTH<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">everything is fine.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.projektfarm.com\/en\/support\/howto\/images\/telnet_25.gif\" alt=\"\" width=\"378\" height=\"206\" \/><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Type<\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><em><span style=\"font-family: Courier New,Courier,mono;\">quit<\/span><\/em><\/span><\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">to return to the system&#8217;s shell.<\/span><br \/>\n<span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\">Further (Debian-specific) information about this topic can be found here: <a href=\"http:\/\/www.projektfarm.com\/en\/support\/debian_setup\/index.html\">http:\/\/www.projektfarm.com\/en\/support\/debian_setup\/index.html<\/a>.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: small;\"><strong>Links<\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postfix-SMTP-AUTH-TLS-Howto <\/p>\n<p>Version 1.0 Author: Falko Timme &lt;falko [dot] timme [at] projektfarm [dot] de&gt; Last edited 12\/31\/2003 <\/p>\n<p> You can find the latest version of this document at http:\/\/www.howtoforge.com <\/p>\n<p>This document describes how to install a mail server based on postfix that is capable of SMTP-AUTH and TLS. It should work (maybe with slight changes [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/904"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=904"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/904\/revisions"}],"predecessor-version":[{"id":906,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/904\/revisions\/906"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}