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

Address Rewriting

Expand Messages
  • Rob Becker
    Hi everyone. Quick question someone can hopefully help me with. I need to change the header info on a few select emails depending on where they are coming
    Message 1 of 5 , Feb 11, 2008
    • 0 Attachment
      Hi everyone. Quick question someone can hopefully help me with. I need
      to change the header info on a few select emails depending on where they
      are coming from.

      For example.


      If email comes in:

      From: account1@...
      To: account2@...
      BCC:



      I want it to change to:

      From: account1@...
      To: <nobody>
      BCC: account3@..., account4@... account5@......



      Is this possible and if so how?

      Thanks.

      -
      Rob
    • Robert Vangel
      ... check out header_checks (man 5 header_checks also)
      Message 2 of 5 , Feb 11, 2008
      • 0 Attachment
        On Feb 11, 2008 11:05 PM, Rob Becker <robert_becker@...> wrote:
        Hi everyone.  Quick question someone can hopefully help me with.  I need
        to change the header info on a few select emails depending on where they
        are coming from.

        For example.


        If email comes in:

        From: account1@...
        To: account2@...
        BCC:



        I want it to change to:

        From: account1@...
        To: <nobody>
        BCC: account3@..., account4@... account5@......



        Is this possible and if so how?

        Thanks.

        -
        Rob

        check out header_checks (man 5 header_checks also)
      • mouss
        ... why would one do this? In general, you get better results when asking the original question: what is the problem you are trying to solve? ... you ll need
        Message 3 of 5 , Feb 11, 2008
        • 0 Attachment
          Rob Becker wrote:
          > Hi everyone. Quick question someone can hopefully help me with. I need
          > to change the header info on a few select emails depending on where they
          > are coming from.
          >
          > For example.
          >
          >
          > If email comes in:
          >
          > From: account1@...
          > To: account2@...
          > BCC:
          >
          >
          >
          > I want it to change to:
          >
          > From: account1@...
          > To: <nobody>
          > BCC: account3@..., account4@... account5@......
          >

          why would one do this? In general, you get better results when asking
          the "original" question: what is the problem you are trying to solve?
          > Is this possible and if so how?
          >

          you'll need to write a content filter or do this at delivery stage. note
          that the BCC header is useless and can be removed at once.

          postfix header checks apply on individual headers only (no combination
          of headers).
        • test test
          Hi, I have a setup with several virtual mailboxes, e.g. local1@, local2@. Now I would like the local mail addresses to have some kind of mapping to external
          Message 4 of 5 , Apr 11 3:16 AM
          • 0 Attachment
            Hi,
             
            I have a setup with several virtual mailboxes, e.g. local1@, local2@.
             
            Now I would like the local mail addresses to have some kind of mapping to external addresses:
            local1@postfixserver <-> external1@externaldomain1
            local2@postfixserver <-> external2@externaldomain2
             
            If a mail arrives at postfix from external2 to recipient local1, I would like the following to happen: The mail should be forwarded with sender local2@ to recipient external1@ .
            So incoming header looks like this: from external2, to local1
            Outgoing header looks liks this: from local2, to external1
             
            Does anyone know, if I can achieve this with postfix?
             
            E.g. with some address rewriting feature? http://www.postfix.org/ADDRESS_REWRITING_README.html
            I am very new to postfix, so I don't completely understand the manual here.  I could imagine, that I need to put the mapping local<->external into some configuration file?
             
            I could imagine, that for incoming mails, adress rewriting will be done for the sender: if external2@externaldomain2 is found as sender, then sender will be rewritten to local2.
            And for all incoming mails to local1 a copy is forwarded to external1
             
            Kind Regards
            Henning
          • Henning
            Sorry, my last mail was Html only. I hope it s better now :-) Hi,   I have a setup with several virtual mailboxes, e.g. local1@, local2@.   Now I would like
            Message 5 of 5 , Apr 11 4:22 AM
            • 0 Attachment
              Sorry, my last mail was Html only. I hope it's better now :-)

              Hi,
               
              I have a setup with several virtual mailboxes, e.g. local1@, local2@.
               
              Now I would like the local mail addresses to have some kind of mapping to external addresses:
              local1@postfixserver <-> external1@externaldomain1
              local2@postfixserver <-> external2@externaldomain2
               
              If a mail arrives at postfix from external2 to recipient local1, I would like the following to happen: The mail should be forwarded with sender local2@ to recipient external1@ .
              So incoming header looks like this: from external2, to local1
              Outgoing header looks liks this: from local2, to external1
               
              Does anyone know, if I can achieve this with postfix?
               
              E.g. with some address rewriting feature? http://www.postfix.org/ADDRESS_REWRITING_README.html
              I am very new to postfix, so I don't completely understand the manual here.  I could imagine, that I need to put the mapping local<->external into some configuration file?
               
              I could imagine, that for incoming mails, adress rewriting will be done for the sender: if external2@externaldomain2 is found as sender, then sender will be rewritten to local2.
              And for all incoming mails to local1 a copy is forwarded to external1
               
              Kind Regards
              Henning
            Your message has been successfully submitted and would be delivered to recipients shortly.