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