[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: i want to hide return path...

On Tue, 2004-05-04 at 14:45, Marcin wrote:

> I am using debian postfix. When a mail from the PHP (under apache) the mail header contain:
> -------
> Return-Path: <www-data@my.server.com>
> -------
> I want to hide only this ONE user.
> It is possible ?
> header_checks with:
> /^Return-Path: <www/ IGNORE
> /^Return-Path: <www-data/ IGNORE
> /^Return-Path: <www-data@my.server.com>/ IGNORE
> is not working :(
> why ?
> and how to ignore it ?

It can't ignore something that isn't there.... Return-Path is not an
header used by the MTA (like Postfix), but is a header added by the MDA
when the mail is delivered. It uses the value of the enveloppe from
address (MAIL FROM in the smtp session). Because it is not in a header,
you can't use header_checks for it.
All you can do with Postfix (AFAIK) is to reject mail from this sender.
You can rewrite the entire domain, using the Address Masquerading
functionality in Postfix.

> The best solution will be replacing
> <www-data@my.server.com>
> with for example
> <blabla@my.server.com>

Add -fblabla@my.server.com to the sendmail_path in php.ini or use: 
mail($to,$subject,$message,$headers,'-fblabla@my.server.com'); to send
mail in the php scripts.

Tot ziens,


Reply to: