From: "Jeff Huang" on
Hi,

I found that the Return-Path is null when postfix send bounce mail.It like this:

Return-Path: <>

And it show that from=<> from mailllog.

It means that the bounce mail has no from,and some mailServer reject these email.

How can I to set a sender address to bounce mail?
From: Mark Goodge on
On 12/03/2010 08:54, Jeff Huang wrote:
> Hi,
> I found that the Return-Path is null when postfix send bounce mail.It
> like this:
> Return-Path: <>
> And it show that from=<> from mailllog.
> It means that the bounce mail has no from,and some mailServer reject
> these email.

That's how it's supposed to work. Bounces have a null sender so that
they can be identified as bounces, as distinct from normal mail. That
allows servers to handle them differently to normal mail - including
rejecting them if they want to.

> How can I to set a sender address to bounce mail?

You shouldn't do that. If a server wants to reject bounces then it can;
you shouldn't try to fool it into thinking that bounces are actually
normal mail.

On a more general note, you should be trying to minimise the number of
bounces you send anyway. If you're generating a lot of bounces to
external addresses in response to inbound spam then that's what's
commonly called "backscatter", which is a bad thing. Some bounces are
unavoidable, as they're part of how SMTP works and there are cases where
they need to be generated, but you shouldn't be routinely bouncing spam
that hits your server - instead, you should be rejecting it first rather
than accepting and then bouncing it.

See http://www.postfix.org/BACKSCATTER_README.html for more information
on this, including some hints on how to configure your server to
minimise unnecessary bounces.

Mark

From: Wietse Venema on
Jeff Huang:
> I found that the Return-Path is null when postfix send bounce mail.It =
> like this:
>
> Return-Path: <>

This is required by the Internet mail protocol (RFC 821, RFC 2821,
RFC 5321).

> It means that the bounce mail has no from,and some mailServer reject
> these email.

Then those servers do not correclty implement the Internet mail protocol.

However, you should not be sending lots of bounce mail at all. You
are sending SPAM back to people who did not send that SPAM at all.

Instead, you should block mail before it is received. Don't accept
mail for non-existent recipients.

Wietse

From: mouss on
Jeff Huang a ��crit :
> Hi,
>
> I found that the Return-Path is null when postfix send bounce mail.It
> like this:
>
> Return-Path: <>
>
> And it show that from=<> from mailllog.
>
> It means that the bounce mail has no from,

which is exactly what the SMTP standard says.

> and some mailServer reject these email.
>

This is exactly what the "dsn" section of rfc-ignorant.org is about.
sites that reject the null sender are out of smtp...

that said, this doesn't mean you can send backscatter. please take a
look at the BACKSCATTER README. (also google for "backscatter").


> How can I to set a sender address to bounce mail?

Don't even try. the null sender address was selected to avoid inifite
loops (error on error).