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

Forward or BCC email

Expand Messages
  • Jeroen van Aart
    I would like to know what is the simplest way to do the following: Assuming my server is an MTA for domain example.net with local delivery to mostly virtual
    Message 1 of 3 , Sep 24, 2012
    • 0 Attachment
      I would like to know what is the simplest way to do the following:

      Assuming my server is an MTA for domain example.net with local delivery
      to mostly virtual users. Virtual user addresses look like
      virtualX@.... These users often get emails from the example.org
      domain.

      Email received only from sender@... by one specific virtual user
      with address virtual1@... needs to be BCC'ed or forwarded to
      virtual1@.... The email for example.com is not handled by me.


      I have read the available documentation for a while but haven't been
      able to find a satisfactory solution. One solution that looks promising
      was to use "sender_bcc_maps" however it appears that this can not be
      used on a per (virtual) user basis, or recipient address.

      I thought some kind of content inspection could work but that seems the
      wrong approach.

      Using a .forward file doesn't appear to work either because it will
      forward everything and not differentiate based on the sender address.

      For now it appears piping email to an external command using the users
      .forward file is the only solution.

      I may have just overlooked something obvious, but I got stuck.
      Could anyone point to solution other than using piping in the .forward file?


      Thanks,
      Jeroen

      --
      Earthquake Magnitude: 5.3
      Date: Sunday, September 23, 2012 06:40:53 UTC
      Location: Fiji region
      Latitude: -16.7502; Longitude: 175.5428
      Depth: 22.60 km
    • Noel Jones
      ... To add a bcc: address for a specific sender+recipient combination, you could use a restriction class that checks for that condition and then returns the
      Message 2 of 3 , Sep 24, 2012
      • 0 Attachment
        On 9/24/2012 5:19 PM, Jeroen van Aart wrote:
        > I would like to know what is the simplest way to do the following:
        >
        > Assuming my server is an MTA for domain example.net with local
        > delivery to mostly virtual users. Virtual user addresses look like
        > virtualX@.... These users often get emails from the
        > example.org domain.
        >
        > Email received only from sender@... by one specific virtual
        > user with address virtual1@... needs to be BCC'ed or
        > forwarded to virtual1@.... The email for example.com is not
        > handled by me.
        >

        To add a bcc: address for a specific sender+recipient combination,
        you could use a restriction class that checks for that condition and
        then returns the BCC access table action. This works nicely for a
        small number of conditions, but quickly gets awkward if you have
        lots of sender+recipient combos to check.

        documentation:
        http://www.postfix.org/RESTRICTION_CLASS_README.html
        http://www.postfix.org/access.5.html

        A more flexible and scalable approach is to use an external policy
        service. You could probably convince postfwd to do this without
        much effort, or use it as a starting point for your own creation.
        http://www.postfix.org/SMTPD_POLICY_README.html
        http://www.postfix.org/addon.html#policy


        -- Noel Jones
      • Jeroen van Aart
        ... Thank you, that gives me enough information to make something work. I will report back what I did to make it work. Thanks, Jeroen -- Earthquake Magnitude:
        Message 3 of 3 , Sep 25, 2012
        • 0 Attachment
          Noel Jones wrote:
          > To add a bcc: address for a specific sender+recipient combination,
          > you could use a restriction class that checks for that condition and

          > documentation:
          > http://www.postfix.org/RESTRICTION_CLASS_README.html
          > http://www.postfix.org/access.5.html
          >
          > A more flexible and scalable approach is to use an external policy
          > service. You could probably convince postfwd to do this without
          > much effort, or use it as a starting point for your own creation.
          > http://www.postfix.org/SMTPD_POLICY_README.html
          > http://www.postfix.org/addon.html#policy

          Thank you, that gives me enough information to make something work. I
          will report back what I did to make it work.

          Thanks,
          Jeroen

          --
          Earthquake Magnitude: 5.2
          Date: Tuesday, September 25, 2012 19:42:32 UTC
          Location: Solomon Islands
          Latitude: -9.7643; Longitude: 159.7576
          Depth: 27.50 km
        Your message has been successfully submitted and would be delivered to recipients shortly.