Monday, March 25, 2013

Delete empty mails from maildrop

I don't know why I have a bunch of empty mails on maildrop folder of postfix, but ...

find /var/spool/postfix/maildrop/ -size 0 -name '*' -exec rm {} +

Postfix. Delete some mails from the queue

Change "123@example" to something you need ...

mailq|grep '123@example'|awk {'print $1'}|grep -v "(host"|tr -d '*!'|postsuper -d -