Rafael Azevedo via Postfix-users:
> Hi there,
> 
> I've made a milter that replaces some strings on specific message patterns.
> 
> Now, I need to change the return-path accordingly to the VERP pattern
> for each sent mail.

The Return-Path header is added upon DELIVERY (it contains the
envelope sender). It DOES NOT control where a message is delvered.

Quotes from RFC 5321 (see also RFC 5322).

   When the delivery SMTP server makes the "final delivery" of a
   message, it inserts a return-path line at the beginning of the mail
   data.  This use of return-path is required; mail systems MUST support
   it.  The return-path line preserves the information in the <reverse-
   path> from the MAIL command.  Here, final delivery means the message
   has left the SMTP environment.  Normally, this would mean it had been
   delivered to the destination user or an associated mail drop, but in
   some cases it may be further processed and transmitted by another
   mail system.

   A message-originating SMTP system SHOULD NOT send a message that
   already contains a Return-path header field.  SMTP servers performing
   a relay function MUST NOT inspect the message data, and especially
   not to the extent needed to determine if Return-path header fields
   are present.  SMTP servers making final delivery MAY remove Return-
   path header fields before adding their own.

To change the envelope sender with a milter use the CHGFROM primitive.

To specify the envelope sender with the Postfix sendmail command
use the -f command-line option.

sendmail -f u...@example.com ...

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to