SMTP not working

Running VIrtualMin 5.03 Pro on Ubuntu 16.04.

I'm getting this in /var/log/mail.log when trying to send email using Thunderbird. I am sure the user/pass is correct as I can log into Usermin fine.

May 23 15:51:29 sites postfix/smtpd[9749]: connect from 50-200-12-90-static.hfc.comcastbusiness.net[50.200.12.90]
May 23 15:51:30 sites postfix/smtpd[9749]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 23 15:51:30 sites postfix/smtpd[9749]: warning: SASL authentication failure: Password verification failed
May 23 15:51:30 sites postfix/smtpd[9749]: warning: 50-200-12-90-static.hfc.comcastbusiness.net[50.200.12.90]: SASL PLAIN authentication failed: generic failure
May 23 15:51:30 sites postfix/smtpd[9749]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 23 15:51:30 sites postfix/smtpd[9749]: warning: 50-200-12-90-static.hfc.comcastbusiness.net[50.200.12.90]: SASL LOGIN authentication failed: generic failure
May 23 15:51:54 sites postfix/smtpd[9749]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 23 15:51:54 sites postfix/smtpd[9749]: warning: SASL authentication failure: Password verification failed

I see similar posts in the forum here but nothing solved my problem.

Other relevant info:
root@sites:~# ls -ld /var/spool/postfix/var/run/saslauthd
drwxr-xr-x 2 root root 4096 Apr 25 08:19 /var/spool/postfix/var/run/saslauthd

I am migrating a client's mail to my server tomorrow so I need to get this working.

Thanks,
Don

Status: 
Active

Comments

Howdy -- what is the output of these commands:

ps auxw | grep saslauth
ls -la  /var/spool/postfix/var/run/saslauthd

If the first command doesn't return anything, does it help to restart the saslauth service:

service saslauthd restart

If the above doesn't show an issue with saslauthd not running, I lean towards thinking there's a permission issue (which may indicate the installer needs to fix this). Could you try running these commands:

sudo ln -s /var/spool/postfix/var/run/saslauthd /var/run
sudo chown root:sasl /var/spool/postfix/var/run/saslauthd
sudo usermod -a -G sasl postfix
sudo service postfix restart
sudo service saslauthd restart

It's possible that saslauthd doesn't have permission to access that directory, the above should give it the rights to do so.

Thanks for your quick reply.

saslauthd is running

root@sites:/var/run/saslauthd# ls -la /var/spool/postfix/var/run/saslauthd
total 8
drwxr-xr-x 2 root root 4096 Apr 25 08:19 .
drwxr-xr-x 3 root root 4096 Apr 25 08:19 ..

/var/run/saslauthd exists already:
root@sites:/var/run/saslauthd# ls -l
total 968
-rw------- 1 root root 0 Apr 25 08:49 cache.flock
-rw------- 1 root root 986112 Apr 25 08:49 cache.mmap
srwxrwxrwx 1 root root 0 Apr 25 08:49 mux
-rw------- 1 root root 0 Apr 25 08:49 mux.accept
-rw------- 1 root root 5 Apr 25 08:49 saslauthd.pid

One is not a symlink for the other.

Permissions of /var/run/saslauthd/:
drwx--x--- 2 root sasl 140 Apr 25 08:49 saslauthd

root@sites:/var/run# groups postfix
postfix : postfix sasl

Restarted Postfix and Saslauthd, issue persists:
May 23 16:55:21 sites postfix/smtpd[13497]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 23 16:55:21 sites postfix/smtpd[13497]: warning: SASL authentication failure: Password verification failed
May 23 16:55:21 sites postfix/smtpd[13497]: warning: 50-200-12-90-static.hfc.comcastbusiness.net[50.200.12.90]: SASL PLAIN authentication failed: generic failure
May 23 16:55:21 sites postfix/smtpd[13497]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
May 23 16:55:21 sites postfix/smtpd[13497]: warning: 50-200-12-90-static.hfc.comcastbusiness.net[50.200.12.90]: SASL LOGIN authentication failed: generic failure

I'm wondering if it's looking in /var/spool/postfix/var/run/saslauthd rather than /var/run/saslauthd.

Could you delete the existing /var/spool/postfix/var/run/saslauthd directory, and make it a symlink that points to /var/run/saslauthd?

When you're done, both /var/spool/postfix/var/run/saslauthd and /var/run/saslauthd should have the same file contents.

Tried what you said --

May 23 20:04:17 sites postfix/smtpd[24569]: warning: SASL authentication failure: cannot connect to saslauthd server: Too many levels of symbolic links
May 23 20:04:17 sites postfix/smtpd[24569]: warning: SASL authentication failure: Password verification failed
May 23 20:04:17 sites postfix/smtpd[24569]: warning: pool-108-15-251-91.hrbgpa.fios.verizon.net[108.15.251.91]: SASL PLAIN authentication failed: generic failure

I'm unfortunately not sure what might be going on there.

Would it be possible for one of us to log in and take a look?

Actually, before doing that, I have one other idea.

What you might want to try is:

  1. Stop saslauthd
  2. Delete the /var/spool/postfix/var/run/saslauthd symlink
  3. Create a /var/spool/postfix/var/run/saslauthd directory
  4. Delete the /var/run/saslauthd directory
  5. Create a symlink from /var/run/saslauthd to /var/spool/postfix/var/run/saslauthd

Doing some reading, it sounds like /var/spool/postfix/var/run/saslauthd may not be allowed to be a symlink; but I think that /vaar/run/saslauthd could be.

I appreciate your responses and offer to log in, which would have been great. I got it to work finally. I undid the symlink that I did before my previous post. Then I noted that postfix runs in a chroot, so I edited /etc/default/saslauthd choosing the right option for Postfix running in a chroot:

# To know if your Postfix is running chroot, check /etc/postfix/master.cf.
# If it has the line "smtp inet n - y - - smtpd" or "smtp inet n - - - - smtpd"
# then your Postfix is running in a chroot.
# If it has the line "smtp inet n - n - - smtpd" then your Postfix is NOT
# running in a chroot.
#OPTIONS="-c -m /var/run/saslauthd"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

The commented option is what was in the file. The uncommented option does the trick.

Looks like your last symlink option (which I didn't see until now) would have done the same thing.

Excellent, I'm glad to hear that's working now!

Is everything else set for your migration tomorrow?

And we'll review the installer to make sure it's handling that setting properly for new installations.

rwilkin2's picture
Submitted by rwilkin2 on Sun, 11/12/2017 - 07:39

I had similar issue with SMTP. After a few hours I used advice from Post #7. With a fresh install email was not working fully. I could only send local to server. And then after restarting Postfix that stopped as well.

Followed instructions in #7 and it worked. My email is flying again. Thanks a lot.