Fresh install - outbound emails issues

1 post / 0 new
#1 Tue, 05/30/2017 - 12:39
Dibs

Fresh install - outbound emails issues

I have a VPS running Ubuntu 16.04 LTS distro. Did the recommended things such as Iptables, Fail2ban, setting up SSH using keys and revoked account logins via SSH.

Everything seems to gone ok so far.

Installed Virtualmin GPL - at this time I didn't have a TLD or other mapped to the IP, but a quick entry in the (windows pc) hosts file got over that. I do have a TLD which I'll hopefully point to the VPS today.

No errors - everything seemed fine. I even got PHP5 running alongside PHP7. Thought I was home dry - the complicated (or so I thought) stuff done.

Emails (outbound) via a mail client - I ticked the "outgoing SMTP authentication required" box in Outlook's setup bit. Composed a message and hit send. It sat in the Outbox and then the server login credentials box jumped up. Typed them in and clicked OK.

No matter how many times I clicked OK - the email wouldn't send. Clicking Cancel - just meant it sat in the Outbox and I got a few mins reprieve before the annoying credentials box jumped up again.

Apologies if someone has done a post somewhere detailing this issue - in my defence I will say, I've spent the last 7 or so hours just focused on this issue - Googling away and checking all sorts of things.

Log files - the mail ones, I have none. Or certainly none that are visible or being written to. I've checked

/etc/rsyslog.d/50-default.conf

has the following entry

-/var/log/mail.log

but as mentioned earlier that file doesn't exist. I've found posts suggesting that rsyslogd be restarted, done that too. Even restarted postfix. Nothing seemed to address the issues, which I'll separate for ease:

  1. Outlook keeps having the login to server/network credentials box jump up because I'd selected the option that SMTP authentication was required. No matter how many times I clicked OK -emails weren't sent.
  2. /var/log/mail.log doesn't exist.

I've managed to deal with issue #1 - the login details not going anywhere, Outlook would just say the server has rejected your credentials. No typo in the inputting of the details. No /var/log/mail.log didn't help. So I started clicking on the login box on one monitor and going to any log that was available, one after another.

Luck would have it that the syslog showed the following line just after I clicked on the Outlook Network Credentials pop up,

warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

Some more Googling coughed up the solution - create the symlink, change permissions and restart postfix and saslauthd, i.e.

" 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

Be sure to restart postfix and saslauthd.

sudo /etc/init.d/postfix restart sudo /etc/init.d/saslauthd restart "

as detailed at https://nfolamp.wordpress.com/2013/02/04/fixing-postfix-and-saslauthd-ca...

I've cut & pasted the salient bits above - in case the original page linked disappears. Nothing more useful than a solution you can't see.

Apologies for the overly long post & hope it helps someone in the future.