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

Header Checks: PREPEND

Expand Messages
  • Michael Nguyen
    Hi guys, So, I m trying to use PREPEND to add in a custom header so that support can easily track what email address was used in RCPT TO. I ve tried the
    Message 1 of 2 , Jun 1, 2009
    View Source
    • 0 Attachment
      Hi guys,

      So, I'm trying to use PREPEND to add in a custom header so that support
      can easily track what email address was used in RCPT TO. I've tried the
      following:

      main.cf:
      smtpd_data_restrictions = check_recipient_access
      regexp:/etc/postfix/header-checks

      header-checks
      /^(.*)/ PREPEND X-SA-DELIVERED-TO: <$1>

      The idea being that if michaeln-postfix@... was used in RCPT
      TO, they'd see:

      X-SA-DELIVERED-TO: <michaeln-postfix@...>

      The problem is that this doesn't seem to work on BCC emails and I'm not
      certain why. I'm using Postfix 2.2.0. Any ideas?


      Michael
    • Victor Duchovni
      ... This is not a header check, it is access(5) envelope check that prepends a header. Given the *data* restrictions cotext, this check will only fire for
      Message 2 of 2 , Jun 1, 2009
      View Source
      • 0 Attachment
        On Mon, Jun 01, 2009 at 05:36:13PM -0700, Michael Nguyen wrote:

        >
        > main.cf:
        > smtpd_data_restrictions =
        > check_recipient_access regexp:/etc/postfix/header-checks
        >
        > header-checks
        > /^(.*)/ PREPEND X-SA-DELIVERED-TO: <$1>

        This is not a header check, it is access(5) envelope check that prepends
        a header. Given the *data* restrictions cotext, this check will only
        fire for messages with a single recipient.

        > The idea being that if michaeln-postfix@... was used in RCPT TO,
        > they'd see:
        >
        > X-SA-DELIVERED-TO: <michaeln-postfix@...>

        Now not recording more recipients in headers is reasonable, since
        otherwise you break Bcc confidentiality. This said, if there is just
        one recipient, Postfix already records it in the Received header, so
        the whole thing is a waste of time.

        > The problem is that this doesn't seem to work on BCC emails and I'm not
        > certain why. I'm using Postfix 2.2.0. Any ideas?

        Yes, stop doing what you are doing, and build something to extract data
        from your logs.

        --
        Viktor.

        Disclaimer: off-list followups get on-list replies or get ignored.
        Please do not ignore the "Reply-To" header.

        To unsubscribe from the postfix-users list, visit
        http://www.postfix.org/lists.html or click the link below:
        <mailto:majordomo@...?body=unsubscribe%20postfix-users>

        If my response solves your problem, the best way to thank me is to not
        send an "it worked, thanks" follow-up. If you must respond, please put
        "It worked, thanks" in the "Subject" so I can delete these quickly.
      Your message has been successfully submitted and would be delivered to recipients shortly.