I upgraded a Virtualmin managed server from Dapper to Hardy and although most things came back up with no or only minor issues, I can’t seem to get sending mail via authenticated smtp working again.
I’ve tried a number of things suggested by google searches, but nothing seems to help. I’ve been over my postfix and saslauthd configs many times and it all seems to be correct, and matches the config that I had before the upgrade. In /var/log/mail.log I get the following message when trying to send mail:
Postfix is able to receive incoming mail just fine, and dovecot is authenticating POP3 and IMAP with no problems. Any suggestions for what else to look at?
Do you see any errors in the mail log when you authenticate? That’s in /var/log/mail.log.
Also, can you post the contents of your /etc/default/saslauthd file?
What do you see when you type this: ps auxw | grep saslauthd
And while this probably isn’t related, it looks like Ubuntu is confused about your hostname, you may want to verify that your hostname is setup correctly on the system, in /etc/hosts, and in the /etc/postfix/main.cf file.
After lots and lots of further testing, reading miles of log files after turning on verbose logging modes, and learning stuff I never really wanted to know, I’ve been able to make a fix.
I determined that saslauthd and pam are working correctly together by using the testsaslauthd program. Then I noticed that when postfix attempted an authentication that there was no activity in the auth.log where saslauthd messages were going to, not even any messages about a failure like I could see with the test program. So apparently postfix was not able to communicate with saslauthd but instead of letting us know about the problem it just wrote “authentication failure” type messages to its log and left us in the dark.
Anyway, with that extra bit of information I was able to retarget my google searches and I tried a few shot in the dark changes to see if anything made any difference. It turns out that the smtpd.conf file is no longer being looked for in /etc/postfix/sasl, but in /usr/lib/sasl2 instead. I made a symlink in the latter location to the former and my next test mail authenticated and went through with no problems at all.
I have been battling with this problems for weeks. I was trying to get a my fedora configuration running on a ubuntu box. Since it was the FULL configuration, I would have thought it should have been easy, but different compiled-in path will break stuff.
This was the worst error message in the 10 years I have used postfix. But I know it’s hard (developer my self) to do good logging.