find /var/spool/postfix | xargs grep -l "your string" | sed -g 's|.*/||' | postsuper -d -
I am such a UNIX scripting wimp. This should have been so easy... Maybe that is why it wasn't on the net... ;-)
Some other aliases that answer missing postfix functions (bash):
Delete all emails with sent by the argument email address:
function delfrom() { mailq | grep "$1" | sed -g 's|\ .*$||'| postsuper -d - ;}
How many emails are in the queue going to a given host:
function hostq() { mailq | grep "\@$1" | wc -l ;}
0 comments:
Post a Comment