Postfix Cheat Sheet

A quick reference sheet for some useful postfix tools and general help. These have been tested using an AWS EC2 instance running Ubuntu 20.04 LTS.

websitewww.postfix.org
mailqInspect mail queue
postmapUse postmap to convert text file into a database file:

postmap <infile>
postmap query testUse postmap to check that your MySQL query configuration is working as expected

postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
postsuperUse postsuper to delete deferred e-mails:

postsuper -d ALL deferred
logsPostfix logs to these files:

/var/log/mail.log
and
/var/log/mail.err
configPostfix configuration is stored in this directory:

/etc/postfix
show configShow running config using postconf:

postconf
reload configGracefully reload configuration without restarting the daemon:

systemctl reload postfix