On Tue, Mar 09, 2010 at 12:12:42PM -0600, Jay G. Scott wrote: > i'm trying to convert from sendmail to postfix.
Welcome. > i have a utility (let's call it) that looks through files > in the sendmail mail queue and determines whether the msg is a > bounce message that i don't really want to send out. i stop > sendmail, then delete the q and d files, and restart sendmail. > > what i need is a way to delete a particular msg in > postfix's queue. ISTM that a better approach is to reject the mail that causes these bounces, *before* it gets into the queue. Typically, your recipient validation in smtpd(8) is what does this. > on my test boxes i don't have any files in the > queues -- the queue is empty. i expect i'll have some once > i go to production. Why? http://www.postfix.org/ADDRESS_CLASS_README.html (and your own local copy of the same documentation) describes the various address classes, and how they are defined, and how they validate recipients. If the problem is something else, you'd have to describe what these bounces are, in order to get good suggestions on how to fix the problem ... the REAL problem, not the symptom of deleting bounces from the queue. > but, just so i can be somewhat prepared, how do i > do this? i don't want to delete all the msgs, i can already > find ways to do that. i want to delete particular messages. > this has to be an old issue but my searches are coming up with > complete wipeouts. > > i see the postqueue command, but i also have stuff that > looks inside the message for particular things i must stop going > out. postqueue won't show me that stuff. so, is there a way to > pillage the queued files? It's basically simple for awk(1), python(1), or your preferred scripting language to parse mailq(1) output and feed results to postcat(1). But I'm hoping you're not reimplementing a broken Sendmail system as a broken Postfix one. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header