Postfix Email Notes
Some notes on Postfix
-
Display postfix configuration - "postconf"
-
Queue List: postqueue -p
-
View contents of one by id: postcat -vq XXXXXXXXXX
-
Delete all: postsuper -d ALL
-
Queue Flush (attempt): postqueue -f
-
Queue delete by sender or recipient email address (RHEL5):
mailq | awk '$7 ~/^support@example.com$/ { print $1 }' | tr -d '*!' | postsuper -d -
based on: http://keithscode.com/tutorials/linux/7-delete-a-group-of-messages-from-the-postfix-queue.html
delete by domain - regex hint from: http://stackoverflow.com/questions/14310070/print-first-column-and-email-with-awk-or-sed
mailq | awk '$7 ~/^[A-Za-z0-9._%+-]+@example.com$/ { print $1 }' | tr -d '*!' | postsuper -d -
-
The length of time that a message will be retried before it is returned to sender: maximal_queue_lifetime - http://www.postfix.org/postconf.5.html#maximal_queue_lifetime
-
Corrupt messages, probably in: /var/spool/postfix/corrupt - can move files, or use "postsuper -d"
-
Get version: postconf -d | grep mail_version
tags: smtp, email, postfix, server, mailer