Derek Neely

...notes for thyself, but useful for all...

Postfix - Helpful Commands


Dec 20, 2016 by derek


Had a small issue with a web server sending out email recently. Thanks to some poorly secured WP sites and asshat script kiddies one of our servers turned into a spammer. Well, briefly because we quickly hit our cap on emails over at the kind people at Sendgrid. Even though we hit our cap on Sendgrid the server's queue was still filling up and the moment our cap was reset, all these additional backed up emails would start flooding through. Wonderful endless cycle. So, I stopped postfilx, found their littls scripts, and proceeded with the commands below to get things under control.

Anyhow, found myself needing some simple Postfix commands and its not every day I do mail administration so, here I am taking some notes on those.

View the mail queue:

mailq

Remove all mail from the queue:

postsuper -d ALL

Remove all main in the deferred queue:

postsuper -d ALL deferred

If I find myself using some other useful commands I'll update as I go.

 

Linux

Social


Tweet Tweet Tweet


© 2016 Derek Neely