[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim - remove many messages



On 26 Mar 02 10:43:43 GMT, Rory Campbell-Lange <rory@campbell-lange.net> wrote:
> This is really a two part message. The first part is about removing many
> messages from Exim. How does one do that easily, if one has to have
> the precise id for each?

grep the output from 

# mailq

which leads to...

> Secondly, I'd like to make something like the line below work in bash.
> Exim complains in this case of not finding a message with id "-".
> 
> cat /tmp/e | exim -Mrm -

Try putting it into the exim command line, like this:

# exim -Mrm `cat /tmp/e`

Other people have suggested xargs, but this "Works for me(TM)".

> I solved my problem cludgily by making an output file of exim -bp and
> then vimming it so that it contained a set of "exim -Mrf <id> lines. I
> then sourced the file.
> 
> There must be a more elegant solution without using perl or python.

This will get rid of all "frozen" messages, caused for example by
someone forging a non-existant user on your host as the reply address
for spam:

# exim -Mrm `mailq | grep frozen | awk '{print $3}'`

Another option is to add an "auto_thaw <time>" option to exim.conf,
along with "freeze_tell_mailmaster = false". This will prevent a
shitload of annoying mails being sent to you, while causing exim to
keep trying to deliver the offending messages until they timeout
(according to the documentation at least).

Frank
-- 
Home Page: <URL:http://thingy.apana.org.au/~fjc/> 
Not the Scientology Home Page: <URL:http://xenu.apana.org.au/ntshp/>


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: