Hi Wietse,

Le 27/05/2014 16:12, Wietse Venema a écrit :
St?phane MERLE:
I use postfix for a while as a "direct" mailer, but I have to setup a
postfix box as relay ... and It look like postfix rewrite the
Return-Path header.
The Return-Path header is READ-ONLY.

Setting the Return-Path header HAS NO EFFECT.

The Return-Path header shows the ENVELOPE SENDER ADDRESS.  Your PHP
app must provide the correct ENVELOPE SENDER when posting mail.

http://us2.php.net/manual/en/function.mail.php

Begin quote
additional_parameters (optional)

... For example, this can be used to set the envelope sender address ....
End quote.

Thanks for your fast reply, I hope I am not wasting your time !

in fact, I use PHPMailer because it can handle the connexion directly in SMTP and not with the php mail() function.

if I understood you correctly, what i am doing right now (and since about 8 years ...) is wrong. I got this kind of headers (sender domain <> return path domain as use de same return path domain for common treatment ) :

Return-Path:*newsletter_id1_id2_...@maindomain.com*
Received: from id0019.domainesender.com (id0019.domainesender.com 
[XXX.XXX.XXX.XXX])
        by mail.domainereceiver.com with ESMTP
        ; Tue, 27 May 2014 05:31:58 +0200
Received: by id0019.domainesender.com (Postfix, from userid 0)
        id 04EF83945C56; Tue, 27 May 2014 05:31:19 +0200 (CEST)
DomainKey-Signature: a=rsa-sha1; s=dkim.maindomain.key; d=maindomain.com; 
c=simple; q=dns;
        b=TgLj5KbVOh+On9dZQlbqvdDS0b6R1wmMEv0h3Oe8u2Yc6Hs36thKFVJeuQTHY0GJl
        3G8rviVx4r3uG1p5B3Qd3xWCwOFkDKpsGAkNvA4fq+Dxg7OJRiYnwOnZPeAiQ/nt3kD
        Ytl9Bl1Ph1SOjsKCDDn8vcQw27yjS5DbWzefSzE=
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=maindomain.com;
        s=dkim.maindomain.key; t=1401161480;
        bh=Ntyfl2eDwVj+SG+OhZJek3G0/3k7E6VbHxW9sTP7jsM=;
        h=To:Subject:From:MIME-Version:Content-Type:Message-Id:Date;
        b=SSpZTklmAxg+f/Bf82Z5zsM2XwHANzPpbhWpfUrDvM4eHlAxoIN6IPJN3dEu64FHK
         6Uol6Kyn29Wm+MAusqTNq1648KAROIV9qA5gC/xQowAXeMdddKb5CAfHZPqP0xuyL2
         qMoCNb3VjRu4MshwTgzf3B64aSrAfnERMn1D0bbg=
To: destemail@destdomaine
Subject: bonjour, ceci est le sujet
*From: "ne pas louper" <courr...@maindomain.com>*
X-abuse-contact: ab...@autredomaine.com


but ... it's working ... my emails are arriving correctly and I have a perl 
script which parse the postfix logs for stats ...


Stéphane

        Wietse

Reply via email to