Remove mails from exim queue

prashantbhushan

Verified User
Joined
Jul 21, 2006
Messages
199
Location
Pune, India.
hello,

Is there any script for removing mails from exim mail queue.
I want to remove mails containing particular pattern.
For eg. I want to remove mails containing patterns like "VIAGRA"


Thanks,
Prashant.
 
it would be so useful... but soooo useful...

it would be so useful... but soooo useful... an option like "CMD_EMAIL_FILTER" at server/admin level...

for those we don't like SpamAssasin or SpamBloker...

...
Ramdileo.sys
 
hello,

Is there any script for removing mails from exim mail queue.
I want to remove mails containing particular pattern.
For eg. I want to remove mails containing patterns like "VIAGRA"


Thanks,
Prashant.

This should do it:

Code:
grep -lr 'VIAGRA' /var/spool/exim/input/ | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
 
how long does it take for the queue to become clear? or is it something that has to be done manually as mine keeps alot of spam
 
Exim freezes undeliverable email. You can freeze that hasn't been delivered in X days if it's not already frozen (actually X seconds). You can remove all frozen email from the queue.

Lots of exim documentation at exim.org and all over the 'net. Google is your friend.

Jeff
 
This should do it:

Code:
grep -lr 'VIAGRA' /var/spool/exim/input/ | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm

When I try this I get

exim: no message ids given after -Mrm option

How do I solve this problem?

Regards,
 
Presuming the rest of the command is right, it means nothing matched, so nothing got moved to xargs. Check it first without the xargs argument and see what you get for the output.

You could have asked me this one on the phone today. I know this one even when I'm at lunch :). Only because I get it all the time, too ;).

Jeff
 
Back
Top