bounce processing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

bounce processing

Stefan Palme-2
Hi all,

Our mail server is configured to use special envelope sender addresses
for some outgoing mail so that bounces can be processed automatically.

The "bounce processor" is a self-made script. Are there any hints what
to look for in a bounced mail to be sure, that it really is a bounce
caused by "undeliverable mail" (and not only a vacation message), and
how to clearly detect the email address that bounced? My goal is to
collect invalid email addresses, but not email addresses that only send
a vacation message or other auto-reply-stuff.

I guess I have to look which formats of bounce messages I receive and
make my bounce processor detect the various formats and extract the
relevant information from it. Maybe there is a more general approach?

Thanks and regards
-stefan-


Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

Wietse Venema
Stefan Palme:

> Hi all,
>
> Our mail server is configured to use special envelope sender addresses
> for some outgoing mail so that bounces can be processed automatically.
>
> The "bounce processor" is a self-made script. Are there any hints what
> to look for in a bounced mail to be sure, that it really is a bounce
> caused by "undeliverable mail" (and not only a vacation message), and
> how to clearly detect the email address that bounced? My goal is to
> collect invalid email addresses, but not email addresses that only send
> a vacation message or other auto-reply-stuff.

Use an envelope sender address that does not appear in From: or reply-To:.

        Wietse

> I guess I have to look which formats of bounce messages I receive and
> make my bounce processor detect the various formats and extract the
> relevant information from it. Maybe there is a more general approach?
>
> Thanks and regards
> -stefan-
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

Stefan Palme-2
On Fri, 2008-09-05 at 06:52 -0400, Wietse Venema wrote:

> Stefan Palme:
> > Hi all,
> >
> > Our mail server is configured to use special envelope sender addresses
> > for some outgoing mail so that bounces can be processed automatically.
> >
> > The "bounce processor" is a self-made script. Are there any hints what
> > to look for in a bounced mail to be sure, that it really is a bounce
> > caused by "undeliverable mail" (and not only a vacation message), and
> > how to clearly detect the email address that bounced? My goal is to
> > collect invalid email addresses, but not email addresses that only send
> > a vacation message or other auto-reply-stuff.
>
> Use an envelope sender address that does not appear in From: or reply-To:.

I do. But not only "real bounces" are sent back to the envelope sender
address, but vacation-auto-replies too. See thread with subject
"where to send auto-replies?".

Regards
-stefan-


Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

mouss-2
Stefan Palme wrote:

> On Fri, 2008-09-05 at 06:52 -0400, Wietse Venema wrote:
>> Stefan Palme:
>>> Hi all,
>>>
>>> Our mail server is configured to use special envelope sender addresses
>>> for some outgoing mail so that bounces can be processed automatically.
>>>
>>> The "bounce processor" is a self-made script. Are there any hints what
>>> to look for in a bounced mail to be sure, that it really is a bounce
>>> caused by "undeliverable mail" (and not only a vacation message), and
>>> how to clearly detect the email address that bounced? My goal is to
>>> collect invalid email addresses, but not email addresses that only send
>>> a vacation message or other auto-reply-stuff.
>> Use an envelope sender address that does not appear in From: or reply-To:.
>
> I do. But not only "real bounces" are sent back to the envelope sender
> address, but vacation-auto-replies too. See thread with subject
> "where to send auto-replies?".

- make sure to set the Auto-Submitted and Precedence headers. this will
reduce the number of auto-responses.
- try to parse your postfix logs for invalid addresses.
This way, you can ignore bounces

with these, you are left with
- systems that bounce later
- systems that auto-respond when they should not.

if your mailing is not too frequent, you can simply look for addresses
that bounce systematically. few people would go on vacation for 3
months! you can also send a "failure notification" so that if it's a
vacation problem, the user can resubscribe after his return. but don't
abuse these!

note that you don't need to unsubscribe an address because of a single
bounce. even a "user unknown..." may be a transient misconfiguration error.

anyway, mass mail is not easy...

Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

Wietse Venema
In reply to this post by Stefan Palme-2
Stefan Palme:

> On Fri, 2008-09-05 at 06:52 -0400, Wietse Venema wrote:
> > Stefan Palme:
> > > Hi all,
> > >
> > > Our mail server is configured to use special envelope sender addresses
> > > for some outgoing mail so that bounces can be processed automatically.
> > >
> > > The "bounce processor" is a self-made script. Are there any hints what
> > > to look for in a bounced mail to be sure, that it really is a bounce
> > > caused by "undeliverable mail" (and not only a vacation message), and
> > > how to clearly detect the email address that bounced? My goal is to
> > > collect invalid email addresses, but not email addresses that only send
> > > a vacation message or other auto-reply-stuff.
> >
> > Use an envelope sender address that does not appear in From: or reply-To:.
>
> I do. But not only "real bounces" are sent back to the envelope sender
> address, but vacation-auto-replies too. See thread with subject
> "where to send auto-replies?".

Bounce messages are defined in RFC 3462/3464, and have Content-Type:
multipart/report; report-type=delivery-status.

Mail software that produces its own home-grown format requires that
you maintain an increasingly complex tangle of regular expressions.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

Bastian Blank-3
In reply to this post by mouss-2
On Fri, Sep 05, 2008 at 01:39:41PM +0200, mouss wrote:
> - try to parse your postfix logs for invalid addresses.
> This way, you can ignore bounces

Why do you want to pull data you normally get pushed free house?

Bastian

--
We Klingons believe as you do -- the sick should die.  Only the strong
should live.
                -- Kras, "Friday's Child", stardate 3497.2
Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

mouss-2
Bastian Blank wrote:
> On Fri, Sep 05, 2008 at 01:39:41PM +0200, mouss wrote:
>> - try to parse your postfix logs for invalid addresses.
>> This way, you can ignore bounces
>
> Why do you want to pull data you normally get pushed free house?


because parsing the logs is trivial compared to parsing a message.




Reply | Threaded
Open this post in threaded view
|

Re: bounce processing

Wietse Venema
mouss:
> Bastian Blank wrote:
> > On Fri, Sep 05, 2008 at 01:39:41PM +0200, mouss wrote:
> >> - try to parse your postfix logs for invalid addresses.
> >> This way, you can ignore bounces
> >
> > Why do you want to pull data you normally get pushed free house?
>
>
> because parsing the logs is trivial compared to parsing a message.

If you can get the bounced recipient from Postfix-produced logging,
then you can also get the recipient from the Postfix-produced
RFC-compliant bounce message. Which you will be getting anyway.

        Wietse