{"id":2131,"date":"2022-08-30T15:22:18","date_gmt":"2022-08-30T15:22:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/02\/postfix-returning-no-sasl-authentication-mechanisms-despite-mysql-auth-config-being-seemingly-valid-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:18","modified_gmt":"2022-08-30T15:22:18","slug":"postfix-returning-no-sasl-authentication-mechanisms-despite-mysql-auth-config-being-seemingly-valid-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/postfix-returning-no-sasl-authentication-mechanisms-despite-mysql-auth-config-being-seemingly-valid-collection-of-common-programming-errors\/","title":{"rendered":"Postfix returning &ldquo;no SASL authentication mechanisms&rdquo; despite mySQL auth config being seemingly valid-Collection of common programming errors"},"content":{"rendered":"<p>I am trying to set up a mail server that has multi domain support using Postfix+Dovecot+mySQL. I was following this guide.<\/p>\n<p>I seem to have everything set up and the server is sending the dovecot SSL cert (throwing a cert exception dialog in my client) however mail is not sending or receiving.<\/p>\n<p>\/var\/log\/mail_err returns this postfix error:<\/p>\n<blockquote>\n<p>Connect to private\/auth failed: Connection refused<\/p>\n<\/blockquote>\n<p>\/var\/log\/mail.log is returning a bit more detail:<\/p>\n<pre><code>Sep 25 19:33:58 localhost postfix\/postscreen[11483]: CONNECT from [MYIPADDRESS]:58837 to [MYSERVERIPADDRESS]:25\nSep 25 19:33:58 localhost postfix\/postscreen[11483]: PASS OLD [MYIPADDRESS]:58837\nSep 25 19:34:01 localhost postfix\/smtpd[11486]: connect from MYHOSTMASK[MYIPADDRESS]\nSep 25 19:34:01 localhost postfix\/smtpd[11486]: warning: SASL: Connect to private\/auth failed: Connection refused\nSep 25 19:34:01 localhost postfix\/smtpd[11486]: fatal: no SASL authentication mechanisms\nSep 25 19:34:02 localhost postfix\/master[4556]: warning: process \/usr\/lib\/postfix\/smtpd pid 11486 exit status 1\nSep 25 19:34:02 localhost postfix\/master[4556]: warning: \/usr\/lib\/postfix\/smtpd: bad command startup -- throttling\nSep 25 19:34:02 localhost postfix\/postscreen[11483]: CONNECT from [MYIPADDRESS]:58839 to [MYSERVERIPADDRESS]:25\nSep 25 19:34:02 localhost postfix\/postscreen[11483]: PASS OLD [MYIPADDRESS]:58839\nSep 25 19:35:02 localhost postfix\/smtpd[11780]: connect from MYHOSTMASK[MYIPADDRESS]\nSep 25 19:35:49 localhost dovecot: auth-worker: mysql(127.0.0.1): Connected to database mailserver\nSep 25 19:35:49 localhost dovecot: imap-login: Login: user=, method=PLAIN, rip=MYIPADDRESS, lip=MYSERVERIPADDRESS, mpid=11804, TLS\nSep 25 19:38:07 localhost postfix\/anvil[11379]: statistics: max connection rate 1\/60s for (submission:MYIPADDRESS) at Sep 25 19:28:57\nSep 25 19:38:07 localhost postfix\/anvil[11379]: statistics: max connection count 1 for (submission:MYIPADDRESS) at Sep 25 19:28:57\nSep 25 19:38:07 localhost postfix\/anvil[11379]: statistics: max cache size 2 at Sep 25 19:28:57\nSep 25 19:39:02 localhost postfix\/smtpd[11780]: lost connection after UNKNOWN from MYHOSTMASK[MYIPADDRESS]\nSep 25 19:39:02 localhost postfix\/smtpd[11780]: disconnect from MYHOSTMASK[MYIPADDRESS]\nSep 25 19:39:02 localhost postfix\/smtpd[11945]: connect from MYHOSTMASK[MYIPADDRESS]\nSep 25 19:39:03 localhost postfix\/smtpd[11945]: warning: SASL: Connect to private\/auth failed: Connection refused\nSep 25 19:39:03 localhost postfix\/smtpd[11945]: fatal: no SASL authentication mechanisms\nSep 25 19:39:04 localhost postfix\/master[4556]: warning: process \/usr\/lib\/postfix\/smtpd pid 11945 exit status 1\n<\/code><\/pre>\n<p>Again, I am not receiving or able to send mail. It does seem that postfix is crashing, what with the premature exit. I&#8217;m out of ideas and I&#8217;d really prefer not to wipe everything out and start the setup all over again. Any thoughts? This is a VPS running on Ubuntu 12.04<\/p>\n<p><strong>EDIT<\/strong><\/p>\n<p>postconf -n output:<\/p>\n<pre><code>alias_database = hash:\/etc\/aliases\nalias_maps = hash:\/etc\/aliases\nappend_dot_mydomain = no\nbiff = no\nconfig_directory = \/etc\/postfix\ninet_interfaces = all\ninet_protocols = ipv4\nmailbox_command = procmail -a \"$EXTENSION\"\nmailbox_size_limit = 0\nmydestination = localhost\nmyhostname = lightningcoders.com\nmynetworks = 127.0.0.0\/8 [::ffff:127.0.0.0]\/104 [::1]\/128\nmyorigin = \/etc\/mailname\nreadme_directory = no\nrecipient_delimiter = +\nrelayhost =\nsmtp_tls_session_cache_database = btree:${data_directory}\/smtp_scache\nsmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)\nsmtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination\nsmtpd_sasl_auth_enable = yes\nsmtpd_sasl_path = private\/auth\nsmtpd_sasl_type = dovecot\nsmtpd_tls_auth_only = yes\nsmtpd_tls_cert_file = \/etc\/ssl\/certs\/dovecot.pem\nsmtpd_tls_key_file = \/etc\/ssl\/private\/dovecot.pem\nsmtpd_tls_session_cache_database = btree:${data_directory}\/smtpd_scache\nsmtpd_use_tls = yes\nvirtual_alias_maps = mysql:\/etc\/postfix\/mysql-virtual-alias-maps.cf\nvirtual_mailbox_domains = mysql:\/etc\/postfix\/mysql-virtual-mailbox-domains.cf\nvirtual_mailbox_maps = mysql:\/etc\/postfix\/mysql-virtual-mailbox-maps.cf\nvirtual_transport = lmtp:unix:private\/dovecot-lmtp\n<\/code><\/pre>\n<p>postfix master config:<\/p>\n<pre><code>root@orion:~# cat \/etc\/postfix\/master.cf | grep ^smtp\nsmtp      inet  n       -       -       -       -       smtpd\nsmtp      inet  n       -       -       -       1       postscreen\nsmtpd     pass  -       -       -       -       -       smtpd\nsmtp      unix  -       -       -       -       -       smtp\n<\/code><\/pre>\n<p><strong>EDIT 2:<\/strong><\/p>\n<pre><code>root@orion:\/home\/jknipp# ls -ld \/var\/spool\/postfix\/private\/auth\nsrw-rw-rw- 1 postfix postfix 0 Sep 25 02:38 \/var\/spool\/postfix\/private\/auth\n<\/code><\/pre>\n<p>As for the dovecot config:<\/p>\n<pre><code>2.0.19: \/etc\/dovecot\/dovecot.conf\n# OS: Linux 3.9.3-x86_64-linode33 x86_64 Ubuntu 12.04.3 LTS ext3\nauth_mechanisms = plain login\nmail_location = maildir:\/var\/mail\/vhosts\/%d\/%n\nmail_privileged_group = mail\npassdb {\n  args = \/etc\/dovecot\/dovecot-sql.conf.ext\n  driver = sql\n}\nprotocols = imap pop3 lmtp\nssl = required\nssl_cert =<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-01-02 12:07:50. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am trying to set up a mail server that has multi domain support using Postfix+Dovecot+mySQL. I was following this guide. I seem to have everything set up and the server is sending the dovecot SSL cert (throwing a cert exception dialog in my client) however mail is not sending or receiving. \/var\/log\/mail_err returns this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2131","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2131"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2131\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}