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

smtp_generic_maps and localhost/content_filter

Expand Messages
  • Ralf Hildebrandt
    One user on the german mailing list observered that any SMTP delivery (even to 127.0.0.1 and to a content_filter in his case) causes mailaddresses to be
    Message 1 of 4 , Sep 1, 2008
      One user on the german mailing list observered that any SMTP delivery
      (even to 127.0.0.1 and to a content_filter in his case) causes
      mailaddresses to be rewritten according to smtp_generic_maps

      Alas, the docs say:

      smtp_generic_maps: Address mapping lookup table for envelope and header sender and
      recipient addresses while delivering mail via SMTP.

      Correct.

      "ADDRESS_REWRITING_README" on the other hand says:
      "... when mail leaves the machine via SMTP"
      (emphasis on "leave")

      and in "STANDARD_CONFIGURATION_README" we see:
      "This mapping happens ONLY when mail leaves the machine"
      (emphasis on "leave")

      One might argue that a delivery to "127.0.0.1" and/or "localhost" does
      not really make the mail "leave" the machine.

      That particular user now uses an lmtp transport to feed his
      content_filter and all is well, but either the docs could be made to
      match the behaviour (or the other way round).

      --
      Ralf Hildebrandt (Ralf.Hildebrandt@...) snickebo@...
      Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
      http://www.arschkrebs.de I'm looking for a job
      It's not that I'm so smart , it's just that I stay with problems longer.
      -- Albert Einstein
    • mouss
      ... shouldn t == main.cf content_filter=filter:[127.0.0.1]:10024 == master.cf filter ..... smtp -o smtp_generic_maps= ... do?
      Message 2 of 4 , Sep 1, 2008
        Ralf Hildebrandt wrote:
        > One user on the german mailing list observered that any SMTP delivery
        > (even to 127.0.0.1 and to a content_filter in his case) causes
        > mailaddresses to be rewritten according to smtp_generic_maps
        >
        > Alas, the docs say:
        >
        > smtp_generic_maps: Address mapping lookup table for envelope and header sender and
        > recipient addresses while delivering mail via SMTP.
        >
        > Correct.
        >
        > "ADDRESS_REWRITING_README" on the other hand says:
        > "... when mail leaves the machine via SMTP"
        > (emphasis on "leave")
        >
        > and in "STANDARD_CONFIGURATION_README" we see:
        > "This mapping happens ONLY when mail leaves the machine"
        > (emphasis on "leave")
        >
        > One might argue that a delivery to "127.0.0.1" and/or "localhost" does
        > not really make the mail "leave" the machine.
        >
        > That particular user now uses an lmtp transport to feed his
        > content_filter and all is well, but either the docs could be made to
        > match the behaviour (or the other way round).
        >

        shouldn't

        == main.cf

        content_filter=filter:[127.0.0.1]:10024

        == master.cf
        filter ..... smtp
        -o smtp_generic_maps=
        ...

        do?
      • Ralf Hildebrandt
        ... Let s ask :) -- Ralf Hildebrandt (Ralf.Hildebrandt@charite.de) snickebo@charite.de Postfix - Einrichtung, Betrieb und Wartung Tel. +49
        Message 3 of 4 , Sep 1, 2008
          * mouss <mouss@...>:

          > == main.cf
          >
          > content_filter=filter:[127.0.0.1]:10024
          >
          > == master.cf
          > filter ..... smtp
          > -o smtp_generic_maps=
          > ...
          >
          > do?

          Let's ask :)

          --
          Ralf Hildebrandt (Ralf.Hildebrandt@...) snickebo@...
          Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
          http://www.arschkrebs.de I'm looking for a job
          Die Sinnlosigkeit einer Erfindung wird erst dann vollends
          deutlich, wenn sie zertifiziert ist.
        • mouss
          ... I just tested it and it works. I think it s worth adding to the docs, including amavisd-new postfix readme. by default, the sender is rewritten (the
          Message 4 of 4 , Sep 1, 2008
            Ralf Hildebrandt wrote:
            > * mouss <mouss@...>:
            >
            >> == main.cf
            >>
            >> content_filter=filter:[127.0.0.1]:10024
            >>
            >> == master.cf
            >> filter ..... smtp
            >> -o smtp_generic_maps=
            >> ...
            >>
            >> do?
            >
            > Let's ask :)
            >

            I just tested it and it works. I think it's worth adding to the docs,
            including amavisd-new postfix readme.


            by default, the sender is rewritten (the "foobar" address was just added
            to generic).

            Sep 1 22:36:45 imlil amavis[1607]: (01607-05) Passed CLEAN, [127.0.0.1]
            [127.0.0.1] <mouss-foobar@...> -> <mouss@...>,
            Message-ID: ...

            with it -o smtp_generic_maps=, the filter sees the original sender:

            Sep 1 22:38:19 imlil amavis[1643]: (01643-06) Passed CLEAN, [127.0.0.1]
            [127.0.0.1] <foobar@...> -> <mouss@...>, Message-ID: ...
          Your message has been successfully submitted and would be delivered to recipients shortly.