Postfix

From finninday
Jump to navigation Jump to search

https://help.ubuntu.com/community/Postfix

Packages[edit]

root@weasel:/var/log# dpkg -l *postfix*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                       Version                    Description
+++-==========================-==========================-====================================================================
ii  postfix                    2.5.1-2ubuntu1             High-performance mail transport agent


Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                       Version                    Description
+++-==========================-==========================-====================================================================
pn  libsasl2                   <none>                     (no description available)
ii  libsasl2-2                 2.1.22.dfsg1-18ubuntu2     Cyrus SASL - authentication abstraction library
ii  libsasl2-modules           2.1.22.dfsg1-18ubuntu2     Cyrus SASL - pluggable authentication modules
ii  sasl2-bin                  2.1.22.dfsg1-18ubuntu2     Cyrus SASL - administration programs for SASL users database

Config files[edit]

  • /etc/postfix/main.cf
  • /etc/postfix/master.cf
  • /etc/default/saslauthd


Test output[edit]

root@weasel:/etc/default# telnet finninday.net 25
Trying 24.21.185.50...
Connected to finninday.net.
Escape character is '^]'.
220 weasel.finninday.net ESMTP Postfix (Ubuntu)
ehlo finninday.net
250-weasel.finninday.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

new user[edit]

After creating a new account with "adduser", it is still necessary to set a sasl password.

This will show all sasl accounts:

 sasldblistusers2

This will create a new sasl account:

 saslpasswd2 -c

I also had to create a "Maildir" directory in the new user's home directory. Not sure if it was necessary to restart saslauthd and postfix, but I did this time. Now it works.

It was instructive to watch /var/log/mail.log, but I had to resist the temptation to try to troubleshoot the PAM-related messages.

Troubleshooting: tlsmgr won't start[edit]

No tlsmgr is process list. I expect to see this:

postfix   2222  2056  0 May11 ?        00:00:04 tlsmgr -l -t unix -u -c

service postfix restart doesn't have any effect. postfix reload doesn't have any effect.

Man page for tlsmgr says it is the postfix TLS sessioni cache and random number manager. It is not a distinct binary, it is a part of postfix.

Oops, not an issue. tlsmgr starts on demand, so opening a test session to postfix caused it to launch.