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

Re: deleting selected/filtered mails in sendmail queue


Erik Dörnbach wrote:

> Hello list,
> I had some trouble with an misconfigured "ms isa server" in my network, which in return had an misconfigured "ms exchange" behind it, which acted as a kind of openrelay (ooh, those people!).
> The problem is now, my sendmail box - being the smarthost for the exchange - has a queue full of undeliverable notices for fake-addresses now, the lot going somewhere to ".tw" .
> As I'm pretty sure none of our customers really has email contact with taiwan I'm looking for an easy way to get those messages out of my queue without touching any other emails.
> Is there anything available either in sendmail itself (something like sendmail -qR@blah.com, just for deleting and not queuerun) which I haven't found yet or some additional tools/scripts whatever.

Stop sendmail, cp -pr /var/spool/mqueue to say, /var/spool/omqueue, start
sendmail again and do a couple of queueruns on that queue (be sure you
remove the /var/spool/omqueue/.hoststat/ entries).  Dequeue with
'sendmail -oQ/var/spool/omqueue -q -v' and after you're confident that
most of the 'normal' e-mail is out grep the qf* files to dig out the
.tw entries and throw away those {d,q}f* files. After that dequeue
again 'till the queue is empty and you're done.

> Thanks in advance for cleaning up my queue!
> With best regards,
> Erik 


Henk Roose <Henk.Roose@cwi.nl>
CWI - Centrum voor Wiskunde en Informatica
Centre for Mathematics and Computer Science
Amsterdam (NL)

Reply to: