We have had several customers with postfix problems and they seem to be all of a similar nature, so i thought i would blog a couple.
The most common one is trying to use both aliases and virtualhosts for a domain. Especially with Virtualmin which tries to do both.
The main symptoms are something in the logs such as
Oct 27 21:46:56 hostname postfix/local[26401]: BF7942C3A9: to=<bob.domain@defaultdomain.com>, orig_to=<bob@domain.com>, relay=local, delay=0.32, delays=0.14/0.01/0/0.17, dsn=2.0.0, status=sent (forwarded as E305F2C3AA)
The main problem was that postfix can’t have (or at least it complains about it) the same domain both in mydestination and in virtual_domains. The only way we can tweak postfix to use the Virtualmin’s schema was to use localhost.localdomain for myorigin in /etc/postfix/main.cf. This will be appended all the “user-only” addresses too.
This is what the new log shows it has
Oct 27 21:46:56 hostname postfix/local[26401]: BF7942C3A9: to=<bob.domain@localhost.localdomain>, orig_to=<bob@domain.com>, relay=local, delay=0.32, delays=0.14/0.01/0/0.17, dsn=2.0.0, status=sent (forwarded as E305F2C3AA)
Another one i stumbled across today was an saslauthd error doing smtp authentication.
The saslauthd was installed and setup and running fine, the postfix config was identical to other machines, however for some reason it still said ‘wrong password’ and the logs have the following
Oct 27 20:19:18 hostname postfix/smtpd[21012]: <localhost.lan[127.0.0.1]: AUTH PLAIN AGVsbGVuAGVsbGVuaHVubnljYWtlcw==
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_first: sasl_method PLAIN, init_response AGVsbGVuAGVsbGVuaHVubnljYWtlcw==
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_first: decoded initial response
Oct 27 20:19:18 hostname postfix/smtpd[21012]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Oct 27 20:19:18 hostname postfix/smtpd[21012]: warning: SASL authentication failure: Password verification failed
Oct 27 20:19:18 hostname postfix/smtpd[21012]: warning:localhost.lan[127.0.0.1]: SASL PLAIN authentication failed: generic failure
Oct 27 20:19:18 hostname postfix/smtpd[21012]: >localhost.lan[127.0.0.1]: 535 5.7.8 Error: authentication failed: generic failure
Oct 27 20:19:18 hostname postfix/smtpd[21012]: <localhost.lan[127.0.0.1]: AUTH LOGIN
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_first: sasl_method LOGIN
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_auth_response: uncoded server challenge: Username:
Oct 27 20:19:18 hostname postfix/smtpd[21012]: >localhost.lan [127.0.0.1]: 334 VXNlcm5hbWU6
Oct 27 20:19:18 hostname postfix/smtpd[21012]: <localhost.lan[127.0.0.1]: ZWxsZW4=
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_next: decoded response: username
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_auth_response: uncoded server challenge: Password:
Oct 27 20:19:18 hostname postfix/smtpd[21012]: > localhost.lan[127.0.0.1]: 334 UGFzc3dvcmQ6
Oct 27 20:19:18 hostname postfix/smtpd[21012]: <localhost.lan[127.0.0.1]: ZWxsZW5odW5ueWNha2Vz
Oct 27 20:19:18 hostname postfix/smtpd[21012]: xsasl_cyrus_server_next: decoded response: somepass
Oct 27 20:19:18 hostname postfix/smtpd[21012]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
The fix? adding the line in bold to /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux
Then restarting postfix .
/etc/init.d/postfix restart
If you have problems with email on your Rimuhosting VPS and the configuration, just drop us a support ticket and we will give you a hand