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

enabling double delivery for some users

Expand Messages
  • Patrick Proniewski
    Hello, I want to enable double delivery for selected users into my MX servers. My MX servers (I have two, load balanced through a Cisco ACE) are only relay
    Message 1 of 7 , Nov 24, 2012
      Hello,

      I want to enable double delivery for selected users into my MX servers.
      My MX servers (I have two, load balanced through a Cisco ACE) are only relay servers, once filtered and accepted, emails are transported to a gateway that performs, if needed address rewrite, and dispatch.
      On MX servers, users do not exists. I have:

      - a list of relay_domains,
      - a big relay_recipient_maps (62K lines),
      - a single transport rule relay_transport = smtp:[mailgw.my.domain]

      I would like those MX servers to duplicate the entering emails for a handful of users, and send these duplicates to another server. The purpose is to provide those users with a "webmail" interface where they would be able to tag incoming email "spam" or "ham", in order to train the antispam system.

      I can create a unix account for each user on the training server, with Maildir, IMAP server, and webmail interface. That's no big deal.

      The question is: what is the best way to duplicate incoming emails on both MX servers and deliver them on my training server? It must be foolproof, ie. if the duplicate delivery fails, the primary delivery must work.
      I would like the duplicated emails to be identical, as much as possible, as the primary delivery email.

      What would be the best way to do this?

      I've though about using bcc maps, something like this:

      user1@domain user1@...
      user2@domain user2@...

      but in case of failure on the training server side, the From: address would get an delivery error message, right?

      Any help greatly appreciated!
      Patrick
    • Wietse Venema
      ... Postfix built-in mechanisms to add recipients are reliable in the sense that the sender will be informed of delivery errors. To add a recipient without
      Message 2 of 7 , Nov 24, 2012
        Patrick Proniewski:
        > What would be the best way to do this?
        >
        > I've though about using bcc maps, something like this:
        >
        > user1@domain user1@...
        > user2@domain user2@...
        >
        > but in case of failure on the training server side, the From:
        > address would get an delivery error message, right?
        >
        > Any help greatly appreciated! Patrick

        Postfix built-in mechanisms to add recipients are "reliable" in the
        sense that the sender will be informed of delivery errors.

        To add a recipient without notification, use an smtpd_proxy_filter
        that copies command and replies without modification, and that adds
        the additional recipients as

        RCPT TO:<additional-recipient> NOTIFY=NONE

        (this requires Postfix 2.3 or later).

        SMTP proxies take a few lines of Perl, Python, etc.

        Wietse
      • Wietse Venema
        ... Plus, it requires that all systems down-stream from Postfix correctly implement RFC 3461 (the SMTP DSN extension). ... Wietse
        Message 3 of 7 , Nov 24, 2012
          Wietse Venema:
          > Patrick Proniewski:
          > > What would be the best way to do this?
          > >
          > > I've though about using bcc maps, something like this:
          > >
          > > user1@domain user1@...
          > > user2@domain user2@...
          > >
          > > but in case of failure on the training server side, the From:
          > > address would get an delivery error message, right?
          > >
          > > Any help greatly appreciated! Patrick
          >
          > Postfix built-in mechanisms to add recipients are "reliable" in the
          > sense that the sender will be informed of delivery errors.
          >
          > To add a recipient without notification, use an smtpd_proxy_filter
          > that copies command and replies without modification, and that adds
          > the additional recipients as
          >
          > RCPT TO:<additional-recipient> NOTIFY=NONE
          >
          > (this requires Postfix 2.3 or later).

          Plus, it requires that all systems down-stream from Postfix correctly
          implement RFC 3461 (the SMTP DSN extension).

          > SMTP proxies take a few lines of Perl, Python, etc.

          Wietse
        • Viktor Dukhovni
          ... I believe the same properties hold with recipients added via recipient_bcc_maps (automatic NOTIFY=NEVER up to the last forward-path MTA that supports DSN).
          Message 4 of 7 , Nov 24, 2012
            On Sat, Nov 24, 2012 at 03:09:59PM -0500, Wietse Venema wrote:

            > > > Any help greatly appreciated! Patrick
            > >
            > > Postfix built-in mechanisms to add recipients are "reliable" in the
            > > sense that the sender will be informed of delivery errors.
            > >
            > > To add a recipient without notification, use an smtpd_proxy_filter
            > > that copies command and replies without modification, and that adds
            > > the additional recipients as
            > >
            > > RCPT TO:<additional-recipient> NOTIFY=NONE
            > >
            > > (this requires Postfix 2.3 or later).
            >
            > Plus, it requires that all systems down-stream from Postfix correctly
            > implement RFC 3461 (the SMTP DSN extension).

            I believe the same properties hold with recipients added via
            recipient_bcc_maps (automatic NOTIFY=NEVER up to the last forward-path
            MTA that supports DSN). Therefore, it may be simpler to use bcc maps,
            rather than implement a proxy filter or similar.

            --
            Viktor.
          • Wietse Venema
            ... This is not well documented. I have done another documentation bugfix. Wietse
            Message 5 of 7 , Nov 24, 2012
              Viktor Dukhovni:
              > On Sat, Nov 24, 2012 at 03:09:59PM -0500, Wietse Venema wrote:
              >
              > > > > Any help greatly appreciated! Patrick
              > > >
              > > > Postfix built-in mechanisms to add recipients are "reliable" in the
              > > > sense that the sender will be informed of delivery errors.
              > > >
              > > > To add a recipient without notification, use an smtpd_proxy_filter
              > > > that copies command and replies without modification, and that adds
              > > > the additional recipients as
              > > >
              > > > RCPT TO:<additional-recipient> NOTIFY=NONE
              > > >
              > > > (this requires Postfix 2.3 or later).
              > >
              > > Plus, it requires that all systems down-stream from Postfix correctly
              > > implement RFC 3461 (the SMTP DSN extension).
              >
              > I believe the same properties hold with recipients added via
              > recipient_bcc_maps (automatic NOTIFY=NEVER up to the last forward-path
              > MTA that supports DSN). Therefore, it may be simpler to use bcc maps,
              > rather than implement a proxy filter or similar.

              This is not well documented. I have done another documentation bugfix.

              Wietse
            • Wietse Venema
              ... I have updated the postconf(5) text for always_bcc, recipient_bcc_maps and sender_bcc_maps. These three primitives use the same code to add an envelope
              Message 6 of 7 , Nov 24, 2012
                Wietse Venema:
                > Viktor Dukhovni:
                > > On Sat, Nov 24, 2012 at 03:09:59PM -0500, Wietse Venema wrote:
                > >
                > > > > > Any help greatly appreciated! Patrick
                > > > >
                > > > > Postfix built-in mechanisms to add recipients are "reliable" in the
                > > > > sense that the sender will be informed of delivery errors.
                > > > >
                > > > > To add a recipient without notification, use an smtpd_proxy_filter
                > > > > that copies command and replies without modification, and that adds
                > > > > the additional recipients as
                > > > >
                > > > > RCPT TO:<additional-recipient> NOTIFY=NONE
                > > > >
                > > > > (this requires Postfix 2.3 or later).
                > > >
                > > > Plus, it requires that all systems down-stream from Postfix correctly
                > > > implement RFC 3461 (the SMTP DSN extension).
                > >
                > > I believe the same properties hold with recipients added via
                > > recipient_bcc_maps (automatic NOTIFY=NEVER up to the last forward-path
                > > MTA that supports DSN). Therefore, it may be simpler to use bcc maps,
                > > rather than implement a proxy filter or similar.
                >
                > This is not well documented. I have done another documentation bugfix.

                I have updated the postconf(5) text for always_bcc, recipient_bcc_maps
                and sender_bcc_maps. These three primitives use the same code to add
                an envelope recipient address.

                Old:
                Note: if mail to the BCC address bounces it will be returned to
                the sender.

                New:
                Note: with Postfix 2.3 and later the BCC address is added as if it
                was specified with NOTIFY=NONE. The sender will not be notified
                when the BCC address is undeliverable, as long as all down-stream
                software implements RFC 3461.

                Note: with Postfix 2.2 and earlier the sender will be notified
                when the BCC address is undeliverable.

                I've been fixing documentation bugs as I run into them, time
                permitting.

                Wietse
              • Patrick Proniewski
                ... Ok, that looks great. I ll go with bcc maps then. I m running Postfix 2.9.x on MX and training servers, so it should be ok. Thank you very much for your
                Message 7 of 7 , Nov 24, 2012
                  On 24 nov. 2012, at 23:40, Wietse Venema wrote:

                  >>> I believe the same properties hold with recipients added via
                  >>> recipient_bcc_maps (automatic NOTIFY=NEVER up to the last forward-path
                  >>> MTA that supports DSN). Therefore, it may be simpler to use bcc maps,
                  >>> rather than implement a proxy filter or similar.
                  >>
                  >> This is not well documented. I have done another documentation bugfix.
                  >
                  > I have updated the postconf(5) text for always_bcc, recipient_bcc_maps
                  > and sender_bcc_maps. These three primitives use the same code to add
                  > an envelope recipient address.
                  >
                  > Old:
                  > Note: if mail to the BCC address bounces it will be returned to
                  > the sender.
                  >
                  > New:
                  > Note: with Postfix 2.3 and later the BCC address is added as if it
                  > was specified with NOTIFY=NONE. The sender will not be notified
                  > when the BCC address is undeliverable, as long as all down-stream
                  > software implements RFC 3461.
                  >
                  > Note: with Postfix 2.2 and earlier the sender will be notified
                  > when the BCC address is undeliverable.


                  Ok, that looks great. I'll go with bcc maps then. I'm running Postfix 2.9.x on MX and training servers, so it should be ok.
                  Thank you very much for your help.

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