{"id":171,"date":"2008-04-16T10:03:26","date_gmt":"2008-04-16T18:03:26","guid":{"rendered":"http:\/\/jim-zimmerman.com\/blog\/?p=171"},"modified":"2008-04-18T20:07:30","modified_gmt":"2008-04-19T04:07:30","slug":"smtp-auth-using-saslauthd-and-imap-authentication-redhatcentosfedora","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=171","title":{"rendered":"SMTP Auth using saslauthd and IMAP authentication &#8211; Redhat\/CentOS\/Fedora"},"content":{"rendered":"<p>I used  the following procedure to support SMTP Auth on a CentOS5 machine.<\/p>\n<p>Created a name in my DNS  to use for the outgoing mail server on remote mail clients.  This will allow me to easilly migrate the service to another server or IP address.<\/p>\n<p>Made the following modifications my \/etc\/postfix\/mail.cf.  This configures postfix to support SMTP Auth.<\/p>\n<p>vi \/etc\/postfix\/main.cf<br \/>\n&#8230;<br \/>\n# JGZ 4\/16\/2008 &#8211; Begin &#8211; To enable SMTP Auth using dovecot (IMAP) authentication.<br \/>\n# Enable SASL Authentication<br \/>\nsmtpd_sasl_auth_enable = yes<\/p>\n<p># Report Authenticated Username In Headers<br \/>\nsmtpd_sasl_authenticated_header = yes<\/p>\n<p># Set Path for SASL Auth (this references the smtpd.conf file created earlier)<br \/>\nsmtpd_sasl_path = smtpd<\/p>\n<p># Support Broken Microsoft Clients<br \/>\nbroken_sasl_auth_clients = yes<\/p>\n<p># Enable on authenticated user to send<br \/>\nsmtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination<br \/>\n# JGZ 4\/16\/2008 &#8211; End  &#8211; To enable SMTP Auth using dovecot (IMAP) authentication.<br \/>\n&#8230;<\/p>\n<p>Reload postfix to implement the changes:<br \/>\npostfix reload<\/p>\n<p>Made a backup copy of my \/etc\/sysconfig\/saslauthd:<br \/>\ncp -p \/etc\/sysconfig\/saslauthd \/etc\/sysconfig\/saslauthd.orig<\/p>\n<p>Modify \/etc\/sysconfig\/saslauthd to support IMAP authentication and specify the remote IMAP server.  Note: you can use a name or IP address.  Furthermore, you can use 127.0.0.1 is running the IMAP server on the same machine.  I used a name to better accommodate changes I might need to make.<br \/>\nvi \/etc\/sysconfig\/saslauthd<br \/>\n&#8230;<br \/>\n# JGZ 4\/16\/2008 &#8211; to authenicate via IMAP server<br \/>\nMECH=&#8221;rimap&#8221;<br \/>\n&#8230;<br \/>\n# JGZ 4\/16\/2008 &#8211; To send authentication request to remote server.<br \/>\n#FLAGS=<br \/>\nFLAGS=&#8221;-O imap.server.name&#8221;<br \/>\n&#8230;<\/p>\n<p>Start saslauthd.<br \/>\nservice saslauthd start<\/p>\n<p>Configure saslauthd to start at boot up via ntsysv.<\/p>\n<p>This works well.  It is very simple.  While the IMAP password is transmitted twice to send and receive mail, the password is encrypted.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used the following procedure to support SMTP Auth on a CentOS5 machine. Created a name in my DNS to use for the outgoing mail server on remote mail clients. This will allow me to easilly migrate the service to another server or IP address. Made the following modifications my \/etc\/postfix\/mail.cf. This configures postfix to [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-171","post","type-post","status-publish","format-standard","hentry","category-documentation"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=171"}],"version-history":[{"count":0,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/171\/revisions"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}