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

Selective transport_maps

Expand Messages
  • Peter Rabbitson
    Hi, I need to protect a specific local address by defining a very low message_size_limit applicable only to this particular address. What I did is set up a
    Message 1 of 9 , Sep 23, 2008
    • 0 Attachment
      Hi,

      I need to protect a specific local address by defining a very low
      message_size_limit applicable only to this particular address. What I
      did is set up a second smtpd daemon listening on a weird address on
      localhost, with a message_size_limit set to whatever I want it.

      The problem I am having is that I can not seem to route the message to
      this secondary smtpd instance. I can not use transport_maps because it
      is consulted by the transport daemon, and I can not assign a second
      transport daemon to talk to the second smtpd instance.

      Is there a way to do this at all?

      Thanks

      Peter
    • Ralf Hildebrandt
      ... Not possible in general. Only possible if the client uses ESMTP -- then you can use a policy server to restrict a combination of sender & size -- Ralf
      Message 2 of 9 , Sep 23, 2008
      • 0 Attachment
        * Peter Rabbitson <rabbit+list@...>:
        > Hi,
        >
        > I need to protect a specific local address by defining a very low
        > message_size_limit applicable only to this particular address.

        Not possible in general. Only possible if the client uses ESMTP --
        then you can use a policy server to restrict a combination of sender &
        size

        --
        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
        I have never seen anything fill up a vacuum so fast and still suck.
        -- Rob Pike, commenting on the X Window System.
      • Peter Rabbitson
        ... Not possible in general is a bit harsh. After all I can set up another instance of the postfix suite and just route the mail in question to it. It is
        Message 3 of 9 , Sep 23, 2008
        • 0 Attachment
          Ralf Hildebrandt wrote:
          > * Peter Rabbitson <rabbit+list@...>:
          >> Hi,
          >>
          >> I need to protect a specific local address by defining a very low
          >> message_size_limit applicable only to this particular address.
          >
          > Not possible in general. Only possible if the client uses ESMTP --
          > then you can use a policy server to restrict a combination of sender &
          > size
          >

          "Not possible in general" is a bit harsh. After all I can set up another
          instance of the postfix suite and just route the mail in question to it.
          It is however not very optimal. I really feel that with the modularity
          of postfix there should be a way to deliver a message in this manner
          without causing a loop, I just do not know what it is.
        • Wietse Venema
          Peter Rabbitson: [ Charset UTF-8 unsupported, converting... ] ... You can do per-user routing when mail LEAVES Postfix, but not when Postfix re-injects mail
          Message 4 of 9 , Sep 23, 2008
          • 0 Attachment
            Peter Rabbitson:
            [ Charset UTF-8 unsupported, converting... ]
            > Ralf Hildebrandt wrote:
            > > * Peter Rabbitson <rabbit+list@...>:
            > >> Hi,
            > >>
            > >> I need to protect a specific local address by defining a very low
            > >> message_size_limit applicable only to this particular address.
            > >
            > > Not possible in general. Only possible if the client uses ESMTP --
            > > then you can use a policy server to restrict a combination of sender &
            > > size
            > >
            >
            > "Not possible in general" is a bit harsh. After all I can set up another
            > instance of the postfix suite and just route the mail in question to it.
            > It is however not very optimal. I really feel that with the modularity
            > of postfix there should be a way to deliver a message in this manner
            > without causing a loop, I just do not know what it is.

            You can do per-user routing when mail LEAVES Postfix, but not when
            Postfix re-injects mail into itself.

            You can set a per-user FILTER action with access/header/body maps
            etc. but that action will affect all recipients of that message.

            Wietse
          • Peter Rabbitson
            ... Well... this might very well work. A descriptive reject message will take care of the fact that all recipients are affected, as the sender will know it. I
            Message 5 of 9 , Sep 23, 2008
            • 0 Attachment
              Wietse Venema wrote:
              > Peter Rabbitson:
              > [ Charset UTF-8 unsupported, converting... ]
              >> Ralf Hildebrandt wrote:
              >>> * Peter Rabbitson <rabbit+list@...>:
              >>>> Hi,
              >>>>
              >>>> I need to protect a specific local address by defining a very low
              >>>> message_size_limit applicable only to this particular address.
              >>> Not possible in general. Only possible if the client uses ESMTP --
              >>> then you can use a policy server to restrict a combination of sender &
              >>> size
              >>>
              >> "Not possible in general" is a bit harsh. After all I can set up another
              >> instance of the postfix suite and just route the mail in question to it.
              >> It is however not very optimal. I really feel that with the modularity
              >> of postfix there should be a way to deliver a message in this manner
              >> without causing a loop, I just do not know what it is.
              >
              > You can do per-user routing when mail LEAVES Postfix, but not when
              > Postfix re-injects mail into itself.
              >
              > You can set a per-user FILTER action with access/header/body maps
              > etc. but that action will affect all recipients of that message.
              >

              Well... this might very well work. A descriptive reject message will
              take care of the fact that all recipients are affected, as the sender
              will know it. I looked at http://www.postfix.org/header_checks.5.html,
              but it is not clear to me how can I say 'IF message size > x'. Can
              someone help me with this?

              Thank you
            • Duane Hill
              ... You could create a policy service and use it in smtpd_end_of_data_restrictions. The size attribute is known at that stage of the game depending upon what
              Message 6 of 9 , Sep 23, 2008
              • 0 Attachment
                On Tue, 23 Sep 2008, Peter Rabbitson wrote:

                > Ralf Hildebrandt wrote:
                >> * Peter Rabbitson <rabbit+list@...>:
                >>> Hi,
                >>>
                >>> I need to protect a specific local address by defining a very low
                >>> message_size_limit applicable only to this particular address.
                >>
                >> Not possible in general. Only possible if the client uses ESMTP --
                >> then you can use a policy server to restrict a combination of sender &
                >> size
                >>
                >
                > "Not possible in general" is a bit harsh. After all I can set up another
                > instance of the postfix suite and just route the mail in question to it.
                > It is however not very optimal. I really feel that with the modularity
                > of postfix there should be a way to deliver a message in this manner
                > without causing a loop, I just do not know what it is.

                You could create a policy service and use it in
                smtpd_end_of_data_restrictions. The 'size' attribute is known at that
                stage of the game depending upon what version of Postfix you are using.

                Postfix documentation states:

                The "size" attribute value specifies the message size that the client
                specified in the MAIL FROM command (zero if none was specified). With
                Postfix 2.2 and later, it specifies the actual message size when the
                client sends the END-OF-DATA command.

                -d
              • Wietse Venema
                ... The idea is to specify your SMTP server with restricted message size limit as a FILTER action in an SMTP server access map. access: user@example.com FILTER
                Message 7 of 9 , Sep 23, 2008
                • 0 Attachment
                  Peter Rabbitson:
                  > > You can do per-user routing when mail LEAVES Postfix, but not when
                  > > Postfix re-injects mail into itself.
                  > >
                  > > You can set a per-user FILTER action with access/header/body maps
                  > > etc. but that action will affect all recipients of that message.
                  > >
                  >
                  > Well... this might very well work. A descriptive reject message will
                  > take care of the fact that all recipients are affected, as the sender
                  > will know it. I looked at http://www.postfix.org/header_checks.5.html,
                  > but it is not clear to me how can I say 'IF message size > x'. Can
                  > someone help me with this?

                  The idea is to specify your SMTP server with restricted message size
                  limit as a FILTER action in an SMTP server access map.

                  access:
                  user@... FILTER smtp:localhost:12345

                  master.cf:
                  localhost:12345 ... smtpd -o message_size_limit=54321

                  Wietse
                • Reinaldo de Carvalho
                  ... backscatter? -- Reinaldo de Carvalho http://korreio.sf.net http://python-cyrus.sf.net
                  Message 8 of 9 , Sep 23, 2008
                  • 0 Attachment
                    > > Well... this might very well work. A descriptive reject message will
                    > > take care of the fact that all recipients are affected, as the sender
                    > > will know it. I looked at http://www.postfix.org/header_checks.5.html,
                    > > but it is not clear to me how can I say 'IF message size > x'. Can
                    > > someone help me with this?
                    >
                    >
                    > The idea is to specify your SMTP server with restricted message size
                    > limit as a FILTER action in an SMTP server access map.
                    >
                    > access:
                    > user@... FILTER smtp:localhost:12345
                    >
                    > master.cf:
                    > localhost:12345 ... smtpd -o message_size_limit=54321
                    >
                    >
                    > Wietse
                    >

                    backscatter?

                    --
                    Reinaldo de Carvalho
                    http://korreio.sf.net
                    http://python-cyrus.sf.net
                  • Wietse Venema
                    ... It is not in the spammer s interest to send large email messages. Wietse
                    Message 9 of 9 , Sep 23, 2008
                    • 0 Attachment
                      Reinaldo de Carvalho:
                      > > > Well... this might very well work. A descriptive reject message will
                      > > > take care of the fact that all recipients are affected, as the sender
                      > > > will know it. I looked at http://www.postfix.org/header_checks.5.html,
                      > > > but it is not clear to me how can I say 'IF message size > x'. Can
                      > > > someone help me with this?
                      > >
                      > >
                      > > The idea is to specify your SMTP server with restricted message size
                      > > limit as a FILTER action in an SMTP server access map.
                      > >
                      > > access:
                      > > user@... FILTER smtp:localhost:12345
                      > >
                      > > master.cf:
                      > > localhost:12345 ... smtpd -o message_size_limit=54321
                      > >
                      > >
                      > > Wietse
                      > >
                      >
                      > backscatter?

                      It is not in the spammer's interest to send large email messages.

                      Wietse
                    Your message has been successfully submitted and would be delivered to recipients shortly.