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

Milter: Change Routing?

Expand Messages
  • Patrick Ben Koetter
    Is it possible to change mail routing within a milter without modifying recipient addresses? I need to reroute messages based on their sender, recipient or
    Message 1 of 3 , Sep 9, 2013
    • 0 Attachment
      Is it possible to change mail routing within a milter without modifying
      recipient addresses?

      I need to reroute messages based on their sender, recipient or some MIME type.
      If a certain criteria is met, the milter should reroute the message to an
      external applicance. The message itself should not be modified.

      Does anyone have an idea if that's possible with milters? The Postfix
      MILTER_README <http://www.postfix.org/MILTER_README.html> mentions:

      {mail_host} MAIL (Postfix ≥ 2.6, only with smtpd_milters) Sender next-hop destination
      {mail_mailer} MAIL (Postfix ≥ 2.6, only with smtpd_milters) Sender mail delivery transport

      But, as I understand it, the macros apply only to what the MILTER sees and not
      what it can modify.

      At the moment my understanding is I would have to implement a SMTP routine
      myself and call it from within the MILTER.

      p@rick

      --
      [*] 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: Florian Kirstein
    • Wietse Venema
      ... No. The Milter protocol has an API to change envelope sender/recipient and header/body content. You can, however, add a message header, and use
      Message 2 of 3 , Sep 9, 2013
      • 0 Attachment
        Patrick Ben Koetter:
        > Is it possible to change mail routing within a milter without modifying
        > recipient addresses?

        No. The Milter protocol has an API to change envelope sender/recipient
        and header/body content.

        You can, however, add a message header, and use milter_header_checks
        to trigger a FILTER action that sends mail to the appliance.

        Wietse

        > I need to reroute messages based on their sender, recipient or some MIME type.
        > If a certain criteria is met, the milter should reroute the message to an
        > external applicance. The message itself should not be modified.
        >
        > Does anyone have an idea if that's possible with milters? The Postfix
        > MILTER_README <http://www.postfix.org/MILTER_README.html> mentions:
        >
        > {mail_host} MAIL (Postfix ? 2.6, only with smtpd_milters) Sender next-hop destination
        > {mail_mailer} MAIL (Postfix ? 2.6, only with smtpd_milters) Sender mail delivery transport
        >
        > But, as I understand it, the macros apply only to what the MILTER sees and not
        > what it can modify.
        >
        > At the moment my understanding is I would have to implement a SMTP routine
        > myself and call it from within the MILTER.
        >
        > p@rick
        >
        > --
        > [*] 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: Florian Kirstein
        >
        >
      • Patrick Ben Koetter
        ... That s it! Thanks p@rick -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München,
        Message 3 of 3 , Sep 9, 2013
        • 0 Attachment
          * Wietse Venema <wietse@...>:
          > Patrick Ben Koetter:
          > > Is it possible to change mail routing within a milter without modifying
          > > recipient addresses?
          >
          > No. The Milter protocol has an API to change envelope sender/recipient
          > and header/body content.
          >
          > You can, however, add a message header, and use milter_header_checks
          > to trigger a FILTER action that sends mail to the appliance.

          That's it! Thanks

          p@rick

          --
          [*] 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: Florian Kirstein
        Your message has been successfully submitted and would be delivered to recipients shortly.