Is it possible to suppress NDR/Delayed delivery messages generated by messages to a particular RCPT?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is it possible to suppress NDR/Delayed delivery messages generated by messages to a particular RCPT?

Tobi
Hello list

first of all: I know suppressing NDR/Delay Delivery Notifications is not
a "good" thing as they can be helpful.
But I have a case where I really need to suppress them :-)

My mailsystem consinsts of two postfix instances (mx and scanner) and
the mailbox servers where scanners deliver via lmtp.
The mail flow is

outside world (smtp) --> mx (smtp) --> scanner (lmtp) --> mailbox

Now I have several spamtrap addresses and catch-alls which are aliased
by mx to the same RCPT address [hidden email]
This address does trigger some dovecot-sieve scripts on mbox upon
receiving msg via lmtp.
When the mbox servers are under heavy load the sieve-script is not
processed fast enough and postfix on scanners keep the msg in queue

> conversation with mbox.example.tld[XX.XX.XX.XX] timed out while
> sending end of data -- message may be sent more than once)
>                                    [hidden email]

Although I have those messages on mbox :-)

After some time the scanners try to send a delay notification to the
original sender and after queue time expired the NDR.

These notifications I want to suppress without suppressing the helpful
ones for all "normal" rcpt addresses (not trap and not catch all). The
msg to suppress have in common that they're all generated by messages
for rcpt [hidden email]

Is it somehow possible to configure postfix to suppress notifications
but only if they're were originally triggered by a delivery for a
specific address?

Thanks and cheers

tobi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to suppress NDR/Delayed delivery messages generated by messages to a particular RCPT?

Wietse Venema
Tobi:

> Hello list
>
> first of all: I know suppressing NDR/Delay Delivery Notifications is not
> a "good" thing as they can be helpful.
> But I have a case where I really need to suppress them :-)
>
> My mailsystem consinsts of two postfix instances (mx and scanner) and
> the mailbox servers where scanners deliver via lmtp.
> The mail flow is
>
> outside world (smtp) --> mx (smtp) --> scanner (lmtp) --> mailbox
>
> Now I have several spamtrap addresses and catch-alls which are aliased
> by mx to the same RCPT address [hidden email]
> This address does trigger some dovecot-sieve scripts on mbox upon
> receiving msg via lmtp.
> When the mbox servers are under heavy load the sieve-script is not
> processed fast enough and postfix on scanners keep the msg in queue

Why mess with NDRs, when you could reduce the intensity of the flow
to the mbox servers?

        Wietse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to suppress NDR/Delayed delivery messages generated by messages to a particular RCPT?

Tobi

Am 02.08.2017 um 12:59 schrieb Wietse Venema:
> Why mess with NDRs, when you could reduce the intensity of the flow
> to the mbox servers?
>

As usual thanks to Wietse for putting me in the right direction. :-)
It was not the amount of msg but the message size itself which was
problematic.

My sieve script calls external commands (my scripts) to parse out urls
from content and ips from received headers for such messages. After
looking at the queue I saw that messages which stuck were always bigger
than 2mb
So looking deeper at my scripts I found that they were veeeeery slow in
reading the message from stdin. After optimizing the read from stdin and
some other little changes even huge messages are now processed in quite
short time.
My scripts now use only the first 1024 lines from message content to
look for urls instead the whole content. And in sieve script I added a
size limit that messages over 2mb are not even passed to my scripts

Again thanks for your help Wietse

Cheers

tobi
Loading...