exim / remove (all) frozen messages from queue
Post by: tom on March 22nd, 2007 | File Under Mailserver, MementoTags: exim, queue
Just a quick & dirty hack to delete frozen messages for a single / some recipient(s)…
#!/bin/bash
#
# what are we searching for?
# (part of the email-address)
SEARCH="anyrecipient.tld"
#
# exim-bin
EXIM=`which exim`
#
# execute (frozen messages only)..
$EXIM -Mrm $(mailq | grep $SEARCH -B1 | grep frozen |cut -c 11-27)
Thanks to Mark -> this can be done a lot of easier if you want to kill all frozen messages:
exiqgrep -z -i | xargs exim -Mrm
If you want to do this only for some domains / email-addresses, use the first example.
April 23rd, 2007 at 17:48
exiqgrep -z -i | xargs exim4 -Mrm
April 24th, 2007 at 09:47
@Mark -> Thanks for the hint