| |||||||||||||||||||||||||||||||
|
> 1) We are using qshape to determine the number of messages in our deferred > queue with a cron-job and send an alert mail to the sysadmin if a certain > threshold is passed. Since there is increasingly much greylisting, I am not > interested in learning about mails that are in the queue for < 40 min. > > To determine the ones that are > 40 Min, I developed the script > > qshape -t80 deferred | grep TOTAL | cut -d "L" -f2 | cut -d " " -f3 This is wrong, use -t40 and inspect the 80 column. > Unfortunately, it turns out that in the column "80" there is not just the > sum of the messages > 40min - <= 80Min, but even younger ones. > > Is there an easy alternative to determine in a script the count of messages > in the queue that are in there for > 40 Mins? > with "postcat -q" and "postsuper -d" I can manually view/delete single > messages in the deferred queue. > There are two more things that I would like to manually execute on single > messages: You really should "hold" them first, inspect from the "hold" queue and delete from there. Otherwise you are subject to race-conditions. > 2) postqueue -f > "postsuper -r queueid" doesn't really have the same semantics and > "flush send_file queueid" appears only to be available to postmaster, but > not to the command line? postqueue -i <queue-id> (for sufficiently recent Postfix ~2.3+) > 3) early expiration, i.e. if I determine e.g. after 1d that there is no > chance of successful delivery, I would like to bounce it immediately to the > sender instead of trying for another 3days and flooding the sender with > interim warning notices. Create a second instance with a queue directory in the same filesystem. "mv" the queue file from the hold queue of the main instance to the maildrop queue of the 2nd instance. In the second instance: content_filter = error:5.1.0 Message Undeliverable This instance will bounce all new mail. Configure its routing rules otherwise identical with the first instance. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com