postfix

From Glee
Jump to: navigation, search

Queue

Checking

mailq

Deleting

Deleting a single message from the queue :

postsuper -d <id> # Seen in the mailq output

Deleting multiple messages from the queue, based on their content (fragile and ugly, but effective) :

for file in /var/spool/postfix/deferred/*/*; do
 id=`basename $file`
 grep "This is the string I'm looking for" $file && postsuper -d $id
done