November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Specific Email Address From Your Mail Queue

You can check your current mail queue like this:

postqueue -p

To delete all mails from the mail queue that come from falko@example.com or are sent tofalko@example.com (the command is the same regardless of if it’s the sender or recipient address), you can use this command:

mailq | tail +2 | awk ‘BEGIN { RS = “” } / falko@example\.com$/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

Afterwards check your mail queue again:

postqueue -p

mailq | tail +2 | grep -v ‘^ *(‘ | awk ‘BEGIN { RS = “” } { if ($8 == “email@address.com” && $9 == “”) print $1 } ‘ | tr -d ‘*!’ | postsuper -d –

Afterwards check your mail queue again:

postqueue -p

postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } / byrdsnestquilt@bellsouth\.net/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>