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

Re: FROM: Address re-writing using regexp:/etc/postfix/sender_canonical for particular emails.

Expand Messages
  • mouss
    ... looks like your gmail posting pollutes your message. anyway, /^myself@example .com$/ someone@example.net works. but you probably want smtp_generic_maps
    Message 1 of 4 , Nov 12, 2012
      Le 12/11/2012 14:21, Prashanth P.Nair a écrit :
      > great..
      >
      > will this also possible in regexp?..change both domain and user part of
      > email address ?
      >
      > From:myself@... to yourself@thatdomain.
      > <1%7D@...>
      >

      looks like your gmail posting pollutes your message.

      anyway,

      /^myself@example\.com$/ someone@...

      works. but you probably want smtp_generic_maps inetas of canonical_*
      http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
      http://www.postfix.org/postconf.5.html#smtp_generic_maps




      > On Mon, Nov 12, 2012 at 6:29 PM, Ralf Hildebrandt <r@...> wrote:
      >
      >> * Prashanth P.Nair <prashanthppp@...>:
      >>> How to re-write "From: My Self <myself@...>" to From: My
      >> Self <
      >>> myself@...> using regexp .
      >>>
      >>> I know the sender_canonical_maps changes both the envelop sender address
      >>> and header sender address according to the sender_canonical_classes.
      >>>
      >>> Below regexp is converting all the emails from @... to
      >>> @... i need only for specif email address.Any way to
      >> achieve
      >>> using regexp?
      >>>
      >>>
      >>> /^(.*@)thisdomain.com$/ ${1}thatdomain.com
      >>
      >> /^(myself|somebodyelse)@...$/ ${1}@...
      >>
      >> --
      >> [*] sys4 AG
      >>
      >> http://sys4.de, +49 (89) 30 90 46 64
      >> Franziskanerstraße 15, 81669 München
      >>
      >> Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
      >> Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
      >> Aufsichtsratsvorsitzender: Joerg Heidrich
      >>
      >>
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.