4 msgRewriting To: field for outbound messages
13 msgMy server send e-mails that are considered SPAM
6 msgWeb Based Front End - Update
2 msgmailman subdomain not recognized by some mail s...
14 msgTrying to feed an script with an email
5 msgQ: smtpd_recipient_restrictions w/reject_unlist...
2 msgQuestion about recipient canonical rewrite and ...
3 msgQQ regarding server performance impact when doi...

Re: qshape and greylisting
\ Victor Duchovni (28 Mar 2008)

4 msgAddress Verification Question
8 msgDistributed mailbombing on one address
2 msgTrouble with postmaster alias
5 msgParent domains confusion?
2 msgAnti-virus scanning with Postfix & Mac OS X
2 msgFolder Structure help
8 msgqmgr_active_corrupt
3 msgretiring a mail server
2 msgSMTP verification
9 msgMultiple IPs
2 msgControlling out going messages
Subject:Re: qshape and greylisting
Group:Postfix-users
From:Victor Duchovni
Date:28 Mar 2008


 
On Fri, Mar 28, 2008 at 05:00:56PM +0100, Ralf Hauser wrote:

> 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