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

Postfix Spam Filter delivering email to two imap Servers

Expand Messages
  • motty.cruz
    Hello All, I have a Postfix Spam Filter; I want to deliver email to two different imap servers, as portraint in my diagram below. ... Can this be accomplish
    Message 1 of 10 , Jul 6 9:59 AM
    • 0 Attachment
      Hello All,
      I have a Postfix Spam Filter; I want to deliver email to two different imap
      servers, as portraint in my diagram below.

      ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2

      Can this be accomplish with Postfix? Currently my spam filter is delivering
      email to one imap server but I would like to deliver to two imap servers
      because we have increase users and want to balance the load between two imap
      servers.


      Thanks for help!
      Motty
    • Jeroen Geilman
      ... The solution to increased load is not to store all email twice, as this will lead to insurmountable problems sooner rather than later. Consider deleting
      Message 2 of 10 , Jul 6 10:13 AM
      • 0 Attachment
        On 2011-07-06 18:59, motty.cruz wrote:
        > Hello All,
        > I have a Postfix Spam Filter; I want to deliver email to two different imap
        > servers, as portraint in my diagram below.
        >
        > ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2
        >
        > Can this be accomplish with Postfix? Currently my spam filter is delivering
        > email to one imap server but I would like to deliver to two imap servers
        > because we have increase users and want to balance the load between two imap
        > servers.

        The solution to increased load is not to store all email twice, as this
        will lead to insurmountable problems sooner rather than later.
        Consider deleting and/or moving messages, what goes where ?
        Are these IMAP backends then both synced with each other too ?
        If not, the next time Joe Q. connects to the other server, his email is
        all messed up - good luck explaining THAT to the users.
        If they are, why not deliver to one and sync to the other in the first
        place?

        Proper solutions focus on distributing different user accounts to
        separate storage backends (note that IMAP server != storage server), or
        scaling up your IMAP solution by, for instance, separating storage from
        the IMAP frontend(s).

        Postfix should deliver each message exactly once, so that the task of
        distributing the mail falls squarely on the chosen mail store solution
        (which can be very varied, but is never postfix).

        --
        J.
      • Wietse Venema
        ... In Postfix-out, use transport_maps to direct mail to the right IMAP server: /etc/postfix-out/main.cf: transport_maps = hash:/etc/postfix/transport
        Message 3 of 10 , Jul 6 10:20 AM
        • 0 Attachment
          motty.cruz:
          > Hello All,
          > I have a Postfix Spam Filter; I want to deliver email to two different imap
          > servers, as portraint in my diagram below.
          >
          > ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2

          In Postfix-out, use transport_maps to direct mail to the "right"
          IMAP server:

          /etc/postfix-out/main.cf:
          transport_maps = hash:/etc/postfix/transport

          /etc/postfix-out/transport:
          user1@... user1@...
          user2@... user2@...

          See also: http://www.postfix.org/DATABASE_README.html#safe_db
          for how to update Berkeley DB files safely.

          Wietse
        • motty.cruz
          Hello Jeroen, I had prefer to deliver email twice main and backup machine and then use resyn to dele emails users had deleted from their client email. In
          Message 4 of 10 , Jul 6 10:46 AM
          • 0 Attachment
            Hello Jeroen,

            I had prefer to deliver email twice main and backup machine and then use
            resyn to dele emails users had deleted from their client email.

            In /usr/local/etc/postfix-out I have a file transport
            #
            TRANSPORT(5)
            Domain2.com smtp:[xxx.xxx.xx.xx]
            Domain3.com smtp:[xxx.xxx.xx.xx]
            Domain4.com smtp:[xxx.xxx.xx.xx]

            I would like to deliver to backup machine as well; could it be done?
            Thanks,
            Motty

            -----Original Message-----
            From: owner-postfix-users@...
            [mailto:owner-postfix-users@...] On Behalf Of Jeroen Geilman
            Sent: Wednesday, July 06, 2011 10:13 AM
            To: postfix-users@...
            Subject: Re: Postfix Spam Filter delivering email to two imap Servers

            On 2011-07-06 18:59, motty.cruz wrote:
            > Hello All,
            > I have a Postfix Spam Filter; I want to deliver email to two different
            imap
            > servers, as portraint in my diagram below.
            >
            > ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2
            >
            > Can this be accomplish with Postfix? Currently my spam filter is
            delivering
            > email to one imap server but I would like to deliver to two imap servers
            > because we have increase users and want to balance the load between two
            imap
            > servers.

            The solution to increased load is not to store all email twice, as this
            will lead to insurmountable problems sooner rather than later.
            Consider deleting and/or moving messages, what goes where ?
            Are these IMAP backends then both synced with each other too ?
            If not, the next time Joe Q. connects to the other server, his email is
            all messed up - good luck explaining THAT to the users.
            If they are, why not deliver to one and sync to the other in the first
            place?

            Proper solutions focus on distributing different user accounts to
            separate storage backends (note that IMAP server != storage server), or
            scaling up your IMAP solution by, for instance, separating storage from
            the IMAP frontend(s).

            Postfix should deliver each message exactly once, so that the task of
            distributing the mail falls squarely on the chosen mail store solution
            (which can be very varied, but is never postfix).

            --
            J.

            -----
            No virus found in this message.
            Checked by AVG - www.avg.com
            Version: 10.0.1388 / Virus Database: 1516/3747 - Release Date: 07/06/11
          • Wietse Venema
            ... Should be: user1@example.com smtp:user1@imap1.example.com user2@example.com smtp:user2@imap2.example.com
            Message 5 of 10 , Jul 6 10:49 AM
            • 0 Attachment
              Wietse Venema:
              > motty.cruz:
              > > Hello All,
              > > I have a Postfix Spam Filter; I want to deliver email to two different imap
              > > servers, as portraint in my diagram below.
              > >
              > > ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2
              >
              > In Postfix-out, use transport_maps to direct mail to the "right"
              > IMAP server:
              >
              > /etc/postfix-out/main.cf:
              > transport_maps = hash:/etc/postfix/transport
              >
              > /etc/postfix-out/transport:
              > user1@... user1@...
              > user2@... user2@...

              Should be:
              user1@... smtp:user1@...
              user2@... smtp:user2@...

              > See also: http://www.postfix.org/DATABASE_README.html#safe_db
              > for how to update Berkeley DB files safely.
              >
              > Wietse
              >
              >
            • motty.cruz
              Thank you Dr.Wietse, Can I use the transport file to deliver one email to two servers? I actually meant to deliver one email twice, to imap1 and its backups
              Message 6 of 10 , Jul 6 11:12 AM
              • 0 Attachment
                Thank you Dr.Wietse,

                Can I use the transport file to deliver one email to two servers? I actually
                meant to deliver one email twice, to imap1 and its backups imap2?


                Thanks,
                Motty

                -----Original Message-----
                From: owner-postfix-users@...
                [mailto:owner-postfix-users@...] On Behalf Of Wietse Venema
                Sent: Wednesday, July 06, 2011 10:50 AM
                To: Postfix users
                Subject: Re: Postfix Spam Filter delivering email to two imap Servers

                Wietse Venema:
                > motty.cruz:
                > > Hello All,
                > > I have a Postfix Spam Filter; I want to deliver email to two different
                imap
                > > servers, as portraint in my diagram below.
                > >
                > > ---Internet-->Postfix-in--Amavisd--Poistfinx-out--> imap1 and Imap2
                >
                > In Postfix-out, use transport_maps to direct mail to the "right"
                > IMAP server:
                >
                > /etc/postfix-out/main.cf:
                > transport_maps = hash:/etc/postfix/transport
                >
                > /etc/postfix-out/transport:
                > user1@... user1@...
                > user2@... user2@...

                Should be:
                user1@... smtp:user1@...
                user2@... smtp:user2@...

                > See also: http://www.postfix.org/DATABASE_README.html#safe_db
                > for how to update Berkeley DB files safely.
                >
                > Wietse
                >
                >

                -----
                No virus found in this message.
                Checked by AVG - www.avg.com
                Version: 10.0.1388 / Virus Database: 1516/3747 - Release Date: 07/06/11
              • Victor Duchovni
                ... Two deliveries require two envelope recipients. It is not possible to deliver a single envelope recipient twice. However, you can use virtual aliases to
                Message 7 of 10 , Jul 6 11:24 AM
                • 0 Attachment
                  On Wed, Jul 06, 2011 at 11:12:42AM -0700, motty.cruz wrote:

                  > Thank you Dr.Wietse,
                  >
                  > Can I use the transport file to deliver one email to two servers? I actually
                  > meant to deliver one email twice, to imap1 and its backups imap2?

                  Two deliveries require two envelope recipients. It is not possible
                  to deliver a single envelope recipient twice. However, you can use
                  virtual aliases to map a single incoming recipient to two outgoing
                  recipients, and deliver each of those separately.

                  --
                  Viktor.
                • Charles Marcus
                  ... ASSP (anti-spam proxy) has this ability (to deliver to two different destinations) if you put it in front of your postfix server...
                  Message 8 of 10 , Jul 6 11:34 AM
                  • 0 Attachment
                    On 2011-07-06 2:12 PM, motty.cruz wrote:
                    > Can I use the transport file to deliver one email to two servers? I actually
                    > meant to deliver one email twice, to imap1 and its backups imap2?

                    ASSP (anti-spam proxy) has this ability (to deliver to two different
                    destinations) if you put it in front of your postfix server...

                    http://assp.sourceforge.net/

                    --

                    Best regards,

                    Charles
                  • Victor Duchovni
                    ... I would not recommend putting proxy code in front of Postfix, however, if ASSP is a reasonably robust transparent proxy, it could be used as an
                    Message 9 of 10 , Jul 6 2:17 PM
                    • 0 Attachment
                      On Wed, Jul 06, 2011 at 02:34:37PM -0400, Charles Marcus wrote:

                      > On 2011-07-06 2:12 PM, motty.cruz wrote:
                      > > Can I use the transport file to deliver one email to two servers? I actually
                      > > meant to deliver one email twice, to imap1 and its backups imap2?
                      >
                      > ASSP (anti-spam proxy) has this ability (to deliver to two different
                      > destinations) if you put it in front of your postfix server...
                      >
                      > http://assp.sourceforge.net/

                      I would not recommend putting proxy code in front of Postfix, however,
                      if ASSP is a reasonably robust transparent proxy, it could be used as
                      an smtpd_proxy_filter.

                      --
                      Viktor.
                    • Charles Marcus
                      ... I may try that someday - all I know is, ASSP is hands down the best anti-spam filter I ve ever used... Its scheduled *and* available on-demand end-user
                      Message 10 of 10 , Jul 7 4:54 AM
                      • 0 Attachment
                        On 2011-07-06 5:17 PM, Victor Duchovni wrote:
                        >> ASSP (anti-spam proxy) has this ability (to deliver to two different
                        >> destinations) if you put it in front of your postfix server...
                        >>
                        >> http://assp.sourceforge.net/

                        > I would not recommend putting proxy code in front of Postfix, however,
                        > if ASSP is a reasonably robust transparent proxy, it could be used as
                        > an smtpd_proxy_filter.

                        I may try that someday - all I know is, ASSP is hands down the best
                        anti-spam filter I've ever used...

                        Its scheduled *and* available on-demand end-user reports (with the
                        ability to 'resend' (release from quarantine) a message and whitelist
                        the sender from said reports) being one of its best features (can't do
                        that with postfix, as good as it is)...

                        Just set up an email template for your users, then all they have to do
                        is dbl-click on it and click send, and they get get an instant snapshot
                        of their quarantine with the ability to release/whitelist anything that
                        shouldn't be there.

                        --

                        Best regards,

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