1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 5.00 out of 5)

POSTFIX CHEAT SHEET TERMINAL COMMANDS

POSTFIX-CHEAT-SHEET-TERMINAL-COMMANDS

Delete Email Messages *

This will delete ALL emails in the queue.

postsuper -d ALL

To delete all email in the queue from a certain domain run this command. You will have to be logged in as root.

postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /@example\.com/ { print 1 }' | tr -d '*!' | postsuper -d -

If you want to delete emails from a specific email address run this command. Make sure you are logged in as root.

postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /username@example\.com/ { print 1 }' | tr -d '*!' | postsuper -d -

To delete a single message:

postuper -d 070788B31

Check Email Queue *

postqueue -p

Flash or resend the queue mails *

postqueue -f

Check the basic config of postfix *

postconf -n

Check whole config of Postfix *

postconf

Renew queue in Postfix *

postsuper -r ALL

Reload the configuration after modification to my main.cf or master.cf. *

postfix reload</code>
<code>service postfix restart

Check what is going on in /var/log/mail.log *

tail -f /var/log/mail.log

To put an email message on hold use this command after you get the id number. *

postsuper -h 070788B31

Hold Email Messages *

To put on hold all Email messages

postsuper -h ALL

To put on hold messages from user@example.com:

postqueue -p | awk ‘BEGIN { RS = “” } { if (7 == “user@domain.com” ) print 1 }’ | tr -d ‘!*’ | postsuper -h –

Release emails from hold *

Release single email message:

postsuper -H 070788B31

Release all email messages:

postsuper -H ALL

To release messages just from user@domain.com

postqueue -p | awk ‘BEGIN { RS = “” } { if (7 == “user@domain.com” ) print 1 }’ | tr -d ‘!*’ | postsuper -H –

Please follow and like us:
POSTFIX CHEAT SHEET TERMINAL COMMANDS was last modified: October 6th, 2017 by Maximus Mccullough

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.