exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
`exim -bp`, lists the messages in queue, which is piped through awk, printing to output "exim -Mrm {MessageID}" which is further piped into bash for execution.
Remove all messages from exim queue
Submitted by sandip on Thu, 11/17/2011 - 16:39
exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash `exim -bp`, lists the messages in queue, which is piped through awk, printing to output "exim -Mrm {MessageID}" which is further piped into bash for execution. »
|
User loginRecent blog posts
Who's onlineThere are currently 0 users and 9 guests online.
|
cleanup all apache generated mails from exim mail queue
This works out better if you know the sender email address that needs weeding from the mail queue.
exim -bp | grep "nobody@" | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
or if you need to clean mails older than a couple days from the queue:
exim -bp | grep "^ 3d" | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' |bash
Try this instead...
exiqgrep -i | xargs exim -Mrm