Mails are not being sent

From Linuxintro
Revision as of 17:24, 2 January 2016 by imported>ThorstenStaerk

I had the problem that mails were not sent. The mails could be seen with the command mailq like this:

root@mail:/etc# lsb_release -d
Description:    Ubuntu 14.04.3 LTS
root@mail:~# mailq 
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C3580220AC*   32415 Wed Dec 30 07:49:01  thorsten@example.com

Ok, /var/log/mail.err had a million entries

Jan  2 17:17:35 mail postfix/smtp[24439]: fatal: specify a password table via the `smtp_sasl_password_maps' configuration parameter

I had /etc/postfix as config directory for mail, and I had a backup of older configurations in /etc/postfix-1 and /etc/postfix-2. The command

diff -rup /etc/postfix /etc/postfix-2

showed me that I had made changes in /etc/postfix/main.cf:

-smtp_sasl_auth_enable = yes
-smtp_sasl_security_options = 

So I copied this file back and restarted postfix:

root@mail:/etc# cp -r /etc/postfix-2/main.cf /etc/postfix
root@mail:/etc# /etc/init.d/postfix restart

Then the command mailq only delivered 2 requests that had failed. And this due to a wrong recipient address.