Clear Postfix queue

From D3xt3r01.tk
Jump to navigationJump to search

WHAT

I want to get rid of all the weird spam queues

HOW

 for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done

you could also just do

 postsuper -d ALL

to clear all mail queues or even

 postsuper -d ALL deferred

to just get rid of deferred mail from the queue.