[RESOLVED] New Installer Issue - Debian 9.1 - SASL Auth - Roundcube/Gmail

Hi all.

I have a feeling that SASL auth isn’t being setup correctly during installation.
Even trusty old Roundcube can’t send mail due to the auth error:

# tail -n 20 /var/log/mail.log postfix/smtpd[9387]: connect from localhost[::1] postfix/smtpd[9387]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory postfix/smtpd[9387]: warning: localhost[::1]: SASL LOGIN authentication failed: generic failure postfix/smtpd[9387]: disconnect from localhost[::1] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

Same issue if I try to setup Gmail ‘send as’ Account for any of the domain names hosted on the server.
Using Port 587, TLS, correct email address, correct password.
Authentication failed message presented.

So, at the moment, I can’t use Gmail to “send as” (ie. authenticate via the server/domain)
And, I can’t use Roundcube (the usually trusty backup)
But sending email via Usermin email interface works, as I expect that’s just using port 25.
Form submission using phpmailer works through port 25
Form submission using phpmailer with TLS/Port/Username/Password authentication fails (same as Gmail and Roundcube)

Seems to be an issue since the new installer as I’ve done hundreds of installs prior to this (though usually Ubuntu 14.04 and 16.04).

I’m not a SASL / Postfix pro (as Virtualmin’s always handled that for me in the past).
I’ve tried quite a few mods to /etc/postfix/main.cf and master.cf (and reset them back to original) many times.

To the Virtualmin Devs, let me know if you need to see any specific logs to help rectify this issue.

Yes, saslauthd is running:

service saslauthd status
● saslauthd.service - LSB: saslauthd startup script
Loaded: loaded (/etc/init.d/saslauthd; generated; vendor preset: enabled)
Active: active (running) since Mon 2017-08-21 02:32:22 UTC; 6h ago
Docs: man:systemd-sysv-generator(8)
Process: 338 ExecStart=/etc/init.d/saslauthd start (code=exited, status=0/SUCCESS)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/saslauthd.service
├─386 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
├─387 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
├─388 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
├─389 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5
└─390 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 5

I just can’t figure it out. Suggestions appreciated. Please.

Found the problem. The configuration has changed somewhere along the way, and we need to explicitly setup saslauthd to put its socket inside of the Postfix chroot.

So, edit /etc/default/saslauth, and change the OPTIONS and PARAMS lines to this:

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

They’re the last lines in the file, probably. If there’s more than one of each, delete the extras (I noticed this happened on one of my test boxes, maybe due to running the installer twice, even though it’s not supposed to do that).

Then restart saslauthd:

# systemctl restart saslauthd

RoundCube, and any other mail client that connects via SMTP to send mail with a username and password, should work fine after this.

This has been resolved as part of https://www.virtualmin.com/node/43216

I suppose, this is not resolved. Having installed several Debian Stretch 9.3 recently (only minimal ssh), after virtualmin gpl setup there are the following lines in /etc/default/saslauthd:

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r" PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

Error in mail.log is: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

Only after removing the “-r” in the “OPTIONS” line and doing “service saslauthd restart”
receiving mails via postfix is working.

BTW: the wrong line is inserted two times in the file. Original debian line is:

OPTIONS="-c -m /var/run/saslauthd"

Same here, also had this:

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

in my saslauthd file.