Re: [exim] how to delete emails for particular domain

Góra strony
Delete this message
Reply to this message
Autor: Paul Graydon
Data:  
Dla: exim users
Temat: Re: [exim] how to delete emails for particular domain
zbigniew szalbot wrote:
> Hello,
>
> Graeme Fowler pisze:
>
>> On Wed, 2008-01-02 at 15:34 +0100, zbigniew szalbot wrote:
>>
>>> I have a lot of mailman bounces destined for an admin address (my
>>> error). I would like to delete them from queue (no need to send them).
>>> How do I do that? I can delete a single message using -Mrm option but
>>> can anyone share how to do that for all messages destined for one
>>> recipient? We're talking about 4K emails in this instance.
>>>
>> Assuming a sender of the form:
>>
>> mailman-admin@???
>>
>> you'd do:
>>
>> exipick -f "mailman-admin@???" -i |\
>>    xargs -i exim -Mrm {}

>>
>> exipick really is your friend, especially in cases like this :)
>>
>>
> Thank you very much for your advice Graeme but xargs complains about
> illegal option -i
> I am reading man xargs and even if I substitute -i with -o or the like,
> exim then says:
> exim: malformed message id {} after -Mrm option
>
> Thanks!
>
> Zbigniew Szalbot
>


I'm not sure the aim of the -i, but what you need to do there is send
the message IDs one at a time to exim, so the "-L1" flag usually does
the trick. You may need to check your xargs man page to confirm thats
the right syntax for the version on your OS:

exipick -f "mailman-admin@???" -i |\
xargs -L1 exim -Mrm {}


--

Paul Graydon
Systems Administrator
Claranet Limited
21 Southampton Row
London, WC1B 5HA

Tel:      +44 (0) 20 7685 8059
Email:    paul.graydon@???
Web:      www.clara.net


All the information contained within this electronic message from
Claranet Ltd is covered by the disclaimer at
http://www.uk.clara.net/disclaimer