Results 1 to 2 of 2
Hi Guys,
I'm having a little problem with writing a script to clear e-mails in the postfix queue that have the error "Domain Not Found.".
My scripting skills aren't great ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-23-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 2
Clearing Postfix Mail Queues
Hi Guys,
I'm having a little problem with writing a script to clear e-mails in the postfix queue that have the error "Domain Not Found.".
My scripting skills aren't great by any means and the problem I'm having is when searching for this error message it's on a seperate line from the Queue ID, so how do I get the line above it to return as well? For example...
5CAE47705F 4803 Wed Nov 21 15:12:54 bob@whatever.com
(host mail.server[127.0.0.1] said: 450 4.1.2 <recipient@home.com>: Recipient address rejected: Domain not found (in reply to RCPT TO command))
recipient@home.com
I've tried thinking of various grep combinations, and/or using xargs somehow, but can't manage to get the line above the one that's been returned when grep'ing for said error message! Any help would be much appreciated, thanks!
- 11-23-2007 #2Just Joined!
- Join Date
- Nov 2007
- Location
- Camp Pendleton
- Posts
- 55
Hi.
It looks like somebody already did what I wanted. Take a look at this and see if this will help you.
[Mailman-Developers] Postfix mailq formatter/dumper/searcher: mq


Reply With Quote
