Loading ...
Sorry, an error occurred while loading the content.
 

Re: notification messages

Expand Messages
  • DTNX Postmaster
    ... If the application sets both to the same value, you may be able to use the sender_canonical_maps feature to rewrite the envelope sender to an address
    Message 1 of 10 , May 1, 2012
      On Apr 30, 2012, at 18:02, Amira Othman wrote:

      > I changes return path from application but it's now writing in log that mail
      > from is the same mail for return path which is not correct in my case. How
      > can I separate return path and mail from to be different

      If the application sets both to the same value, you may be able to use the 'sender_canonical_maps' feature to rewrite the envelope sender to an address that is local;

      http://www.postfix.org/postconf.5.html#sender_canonical_maps

      However, if the user of the application that sends the e-mail has control over the 'From:' address, they may reset it to a value that your workaround does not account for. So the preferred solution is to resolve this problem in the application itself, or at the next 'layer' within your application stack.

      For example, if the application uses PHP, you can force an envelope sender like this;

      sendmail_path = /usr/sbin/sendmail.postfix -t -i -r bounce.address@...

      Where 'server.domain.tld' is your local server, and 'bounce.address' is a working, local account on that server.

      The application may still specify its own header values, but it will not be able to override the envelope sender, and bounces return to you.

      Cya,
      Jona
    • Reindl Harald
      ... as said in your application From: is only a header which does not interest the MTA
      Message 2 of 10 , May 1, 2012
        Am 30.04.2012 18:02, schrieb Amira Othman:
        >> this has NOTHING to do with postfix-configuration the sender/envelope is
        >> controlled by the application sending mail
        >
        > I changes return path from application but it's now writing in log that mail
        > from is the same mail for return path which is not correct in my case. How
        > can I separate return path and mail from to be different

        as said in your application

        "From:" is only a header which does not interest the MTA
      • Wietse Venema
        ... The envelope sender may also be specified via additional parameters to the mail() function. http://us3.php.net/manual/en/function.mail.php Wietse
        Message 3 of 10 , May 1, 2012
          DTNX Postmaster:
          > For example, if the application uses PHP, you can force an envelope sender like this;
          >
          > sendmail_path = /usr/sbin/sendmail.postfix -t -i -r bounce.address@...

          The envelope sender may also be specified via additional
          parameters to the mail() function.

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

          Wietse
        • Wietse Venema
          ... The envelope sender address, used in MAIL FROM (SMTP), is used for non-delivery notification as required by the SMTP standard. Postfix will log the
          Message 4 of 10 , May 2, 2012
            Wietse:
            > > For example, if the application uses PHP, you can force an envelope sender
            > > like this;
            > >
            > > sendmail_path = /usr/sbin/sendmail.postfix -t -i -r
            > bounce.address@...
            >
            > The envelope sender may also be specified via additional
            > parameters to the mail() function.
            >
            > http://us3.php.net/manual/en/function.mail.php

            Amira Othman:
            > My problem is at log file .from address line in log is written as return
            > path(envelope sender address(bounce address)) which is not correct in my
            > case and not appearing in the sent message .how can I make from address in
            > log not envelope sender but to be actual sender

            The envelope sender address, used in MAIL FROM (SMTP), is used for
            non-delivery notification as required by the SMTP standard. Postfix
            will log the envelope sender and recipient addresses, and this will
            not be changed.

            So all you need to do is specify the correct envelope sender address.
            See http://en.wikipedia.org/wiki/Bounce_address for a tutorial
            text on bounce address versus message header addresses.

            Wietse
          Your message has been successfully submitted and would be delivered to recipients shortly.