#685137 postfix: Won't send mails: "fatal: SASL per-connection initialization failed"

Package:
postfix
Source:
postfix
Description:
High-performance mail transport agent
Submitter:
Domovoy
Date:
2024-12-02 07:12:01 UTC
Severity:
important
#685137#5
Date:
2012-08-17 09:36:39 UTC
From:
To:
   * What led up to the situation?
Trying to configure postfix to send mails via a relay (smarthost)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
Followed some tutorials on the net, configured main.cf to use the relay, and configured the relay user/password

   * What was the outcome of this action?
Mails are not sent, here are some usefull informations:

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = loopback-only
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = localhost
myhostname = errlock.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = ns0.ovh.net:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smarthost_passwd
smtp_sasl_security_options =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes


# cat /etc/mailname
errlock.org


Relevant part from /var/log/mail.log:
Aug 17 10:24:51 mediacenter postfix/postfix-script[3594]: refreshing the Postfix mail system
Aug 17 10:24:52 mediacenter postfix/master[14795]: reload -- version 2.9.3, configuration /etc/postfix
Aug 17 10:24:52 mediacenter postfix/qmgr[3600]: 90C1A5814D55: from=<root@errlock.org>, size=414, nrcpt=1 (queue active)
Aug 17 10:24:54 mediacenter postfix/pickup[3599]: DBCA8584100F: uid=0 from=<root>
Aug 17 10:24:54 mediacenter postfix/cleanup[3610]: DBCA8584100F: message-id=<20120817082454.DBCA8584100F@errlock.org>
Aug 17 10:24:54 mediacenter postfix/qmgr[3600]: DBCA8584100F: from=<root@errlock.org>, size=404, nrcpt=1 (queue active)
Aug 17 10:25:42 mediacenter postfix/smtp[3602]: warning: per-session SASL client initialization: generic failure
Aug 17 10:25:42 mediacenter postfix/smtp[3602]: fatal: SASL per-connection initialization failed
Aug 17 10:25:43 mediacenter postfix/qmgr[3600]: warning: private/smtp socket: malformed response
Aug 17 10:25:43 mediacenter postfix/qmgr[3600]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 17 10:25:43 mediacenter postfix/master[14795]: warning: process /usr/lib/postfix/smtp pid 3602 exit status 1
Aug 17 10:25:43 mediacenter postfix/master[14795]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Aug 17 10:25:43 mediacenter postfix/error[3672]: 90C1A5814D55: to=<domovoy@errlock.org>, relay=none, delay=542, delays=491/51/0/0.06, dsn=4.3.0, status=deferred (unknown mail transport error)
Aug 17 10:25:45 mediacenter postfix/smtp[3611]: warning: per-session SASL client initialization: generic failure
Aug 17 10:25:45 mediacenter postfix/smtp[3611]: fatal: SASL per-connection initialization failed
Aug 17 10:25:46 mediacenter postfix/qmgr[3600]: warning: private/smtp socket: malformed response
Aug 17 10:25:46 mediacenter postfix/qmgr[3600]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 17 10:25:46 mediacenter postfix/master[14795]: warning: process /usr/lib/postfix/smtp pid 3611 exit status 1
Aug 17 10:25:46 mediacenter postfix/error[3672]: DBCA8584100F: to=<domovoy@errlock.org>, relay=none, delay=52, delays=0.08/51/0/0.04, dsn=4.3.0, status=deferred (unknown mail transport error)

#685137#10
Date:
2012-08-22 09:01:42 UTC
From:
To:
After experiencing the same crappy issue and digging for hours, I finally found out that in my case I had to make sure 'hostname -f' executes properly (and it didn't, as my /etc/hosts file didn't have an entry for my hostname set inside /etc/hostname)
After fixing /etc/hosts and restarting postfix, everything started to work!

Hope this helps...

#685137#15
Date:
2012-09-12 04:30:43 UTC
From:
To:
Thanks, that seems to work.

Le mercredi 22 août 2012 à 02:01 -0700, eranrund@gmail.com a écrit :

#685137#20
Date:
2017-03-31 12:35:54 UTC
From:
To:
Dear Customer,



Please review your parcel delivery label in the attachment!



FedEx
-----BEGIN PGP PUBLIC KEY BLOCK----- 1Oksj5gZOS8UN5on1Mvj4oyL9g7YlGn/loJIaPkhoKtkGNTeiAGwmLNKkfVH7Lrmi4bajh+xxuRs KhYmvjBj20qSzAMw1HAU0Y2392RYox92qNqkUaR4zZNHhBx/7hWpFgkkKTitEp/mO3Ws1uLamAAc uPGtYC0lXb++KrMP668pCJtGBXgU7cIprVFEwa8wnOp07YOxiRjl72zdvmj0Jxznv91puCExoZX/ oCfmeOA/SArfhSF4ZZNfTjWlgMJU8UB60I5WWFmNc52VDusFMRc/ZK2L+nNl1mSuJ3KuBhbkvqua e7UtNbLaVR7NKfyFhlj0dczU2XCnjrXAUfh6W0BDOL8tmnFiHAYTXz1zlOKmAYi/7lF0Jex00gc9 OVA7H17EB+fItrDlLgm4kWKYqrGigNetWjLfnYGDQhww0cqCyMXld6Mu/xtIqQK0Gy3M2QIOnXMS gzhZr87o0p+sOHVWQr/3GXLYVXmlT/gIFZnCQAW0UGI3zaLXdbIeS+2mvznf7tG6ySusAJ57YOWm +j4nqQGh7jgIlWTwT1JaFR21QyqC8e0g3wj5jMrbJYk3sbCr/4UZ9Xtfi7xCs62zVAeyStFMGQbJ cRisWdrK0dZ/LQyA3yHBrlibBgP7as68focif9vP7mM3mph2JIWZP8FalR4o0OZqSdj9412iblmN bIPaLTsr8WUPx7MiQDU0GQ6Ob6RLGa3RRsh/8pH7A9CLQluWOBVuL0NU0ZW5jtULeB7OQOMKuxQe f7trMZrJhKfxgqsKioBZu1/QEIsrjRrdi3aPNJGdoCBIz87Jmd4ZAKL+icUolj+GF46qGsxtaXpH DJ4AFisjyYXQj1o57i6cVDJ0Lumpns/N/w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