exim4 queue loops

Just a brain helper ...

To remove all frozen messages:

mailq |grep frozen |awk '{print $3}' |while read MID ; do exim4 -Mrm $MID ; done

To remove all of age 10+ days:

mailq |egrep "^[0-9]+[0-9]d" |awk '{print $3}' |while read MID ; do exim4 -Mrm $MID ; done

If there is a special config file, do not forget to add -C /etc/exim4/foo.conf to all commands!


From: IBCL BLog.
Originally posted: 2008-07-05