POSTFIX CHEAT SHEET TERMINAL COMMANDS

Delete Email Messages

This will delete ALL emails in the queue.


[code]postsuper -d ALL[/code]

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


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

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


[code]postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /[email protected]\.com/ { print 1 }' | tr -d '*!' | postsuper -d -[/code]

To delete a single message:

[code]postuper -d 070788B31[/code]

Check Email Queue


[code]postqueue -p[/code]

Flash or resend the queue mails


[code]postqueue -f[/code]

Check the basic config of postfix


[code]postconf -n[/code]

Check whole config of Postfix


[code]postconf[/code]

Renew queue in Postfix


[code]postsuper -r ALL[/code]

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


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

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


[code]tail -f /var/log/mail.log[/code]

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


[code]postsuper -h 070788B31[/code]

Hold Email Messages

To put on hold all Email messages

[code]postsuper -h ALL[/code]

To put on hold messages from [email protected]:

[code]postqueue -p | awk ‘BEGIN { RS = “” } { if (7 == “[email protected]” ) print 1 }’ | tr -d ‘!*’ | postsuper -h –[/code]

Release emails from hold

Release single email message:

[code]postsuper -H 070788B31[/code]

Release all email messages:

[code]postsuper -H ALL[/code]

To release messages just from [email protected]


[code]postqueue -p | awk ‘BEGIN { RS = “” } { if (7 == “[email protected]” ) print 1 }’ | tr -d ‘!*’ | postsuper -H –[/code]

POSTFIX CHEAT SHEET TERMINAL COMMANDS was last modified: October 6th, 2017 by Maximus Mccullough

Summary
POSTFIX CHEAT SHEET TERMINAL COMMANDS
Article Name
POSTFIX CHEAT SHEET TERMINAL COMMANDS
Description
A list of commands in Linux terminal to edit POSTFIX email settings.
Author
Publisher
A1WEBSITEPRO LLC
Logo
POSTFIX-CHEAT-SHEET-TERMINAL-COMMANDS

Leave a Reply

Your email address will not be published.

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