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

Re: content_filter for outbound messages

Expand Messages
  • Darvin Denmian
    Ralf, I m testing this using: master.cf : # Inbound smtp inet n - - - - smtpd -v -o content_filter=filter:dummy filter
    Message 1 of 7 , Oct 1, 2009
    • 0 Attachment
      Ralf,

      I'm testing this using:

      master.cf :

      # Inbound

      smtp inet n - - - - smtpd -v
      -o content_filter=filter:dummy

      filter unix - n n - 10 pipe
      flags=Rq user=filter null_sender=
      argv=/usr/bin/filter.sh -f ${sender} -- ${recipient}


      How can I apply something like this for outbound?

      Thanks.



      On Thu, Oct 1, 2009 at 12:47 PM, Ralf Hildebrandt
      <Ralf.Hildebrandt@...> wrote:
      > * Darvin Denmian <darvin.denmian@...>:
      >> Hello,
      >>
      >> Currently I'm using "content_filter" to filter inbound messages.
      >
      > How?
      >
      >> Now I need to know if is possible to do something like content_filter
      >> for outbound messages.
      >
      > Every outbound message was inbound once, no?
      > --
      > Ralf Hildebrandt
      >  Geschäftsbereich IT | Abteilung Netzwerk
      >  Charité - Universitätsmedizin Berlin
      >  Campus Benjamin Franklin
      >  Hindenburgdamm 30 | D-12203 Berlin
      >  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
      >  ralf.hildebrandt@... | http://www.charite.de
      >
      >
    • mouss
      ... unless you use a specific smtpd for outbound, the above applies to all mail submitted via smtp. if you want this to apply to all mail, including mail
      Message 2 of 7 , Oct 1, 2009
      • 0 Attachment
        Darvin Denmian wrote:
        > Ralf,
        >
        > I'm testing this using:
        >
        > master.cf :
        >
        > # Inbound
        >
        > smtp inet n - - - - smtpd -v
        > -o content_filter=filter:dummy
        >
        > filter unix - n n - 10 pipe
        > flags=Rq user=filter null_sender=
        > argv=/usr/bin/filter.sh -f ${sender} -- ${recipient}
        >
        >
        > How can I apply something like this for outbound?
        >

        unless you use a specific smtpd for outbound, the above applies to all
        mail submitted via smtp. if you want this to apply to all mail,
        including mail submitted via the sendmail command, just put the
        content_filter= statement in main.cf. however, you can't do this if your
        filter.sh resubmits mail via sendmail because you'd get an infinite loop.
      • Darvin Denmian
        mouss, as you said , if I use content_filter=filter:localhost: and my filter is able to reinject the message in postfix queue, Postfix will check inbound
        Message 3 of 7 , Oct 1, 2009
        • 0 Attachment
          mouss,

          as you said , if I use content_filter=filter:localhost:<port>
          and my filter is able to reinject the message in postfix queue,
          Postfix will check inbound and outbound messages, right?

          Thanks!!!




          On Thu, Oct 1, 2009 at 6:46 PM, mouss <mouss@...> wrote:
          > Darvin Denmian wrote:
          >> Ralf,
          >>
          >> I'm testing this using:
          >>
          >> master.cf :
          >>
          >> # Inbound
          >>
          >> smtp      inet  n       -       -       -       -       smtpd -v
          >>    -o content_filter=filter:dummy
          >>
          >> filter    unix  -       n       n       -       10      pipe
          >>     flags=Rq user=filter null_sender=
          >>     argv=/usr/bin/filter.sh -f ${sender} -- ${recipient}
          >>
          >>
          >> How can I apply something like this for outbound?
          >>
          >
          > unless you use a specific smtpd for outbound, the above applies to all
          > mail submitted via smtp. if you want this to apply to all mail,
          > including mail submitted via the sendmail command, just put the
          > content_filter= statement in main.cf. however, you can't do this if your
          > filter.sh resubmits mail via sendmail because you'd get an infinite loop.
          >
        • Darvin Denmian
          mouss, as you said , if I use content_filter=3Dfilter:localhost: and my filter is able to reinject the message in postfix queue, Postfix will check
          Message 4 of 7 , Oct 1, 2009
          • 0 Attachment
            mouss,

            as you said , if I use content_filter=3Dfilter:localhost:<port>
            and my filter is able to reinject the message in postfix queue,
            Postfix will check inbound and outbound messages, right?

            Thanks!!!


            On Thu, Oct 1, 2009 at 6:46 PM, mouss <mouss@...> wrote:
            > Darvin Denmian wrote:
            >> Ralf,
            >>
            >> I'm testing this using:
            >>
            >> master.cf :
            >>
            >> # Inbound
            >>
            >> smtp      inet  n       -       -       -       -       smtpd -v
            >>    -o content_filter=filter:dummy
            >>
            >> filter    unix  -       n       n       -       10      pipe
            >>     flags=Rq user=filter null_sender=
            >>     argv=/usr/bin/filter.sh -f ${sender} -- ${recipient}
            >>
            >>
            >> How can I apply something like this for outbound?
            >>
            >
            > unless you use a specific smtpd for outbound, the above applies to all
            > mail submitted via smtp. if you want this to apply to all mail,
            > including mail submitted via the sendmail command, just put the
            > content_filter= statement in main.cf. however, you can't do this if your
            > filter.sh resubmits mail via sendmail because you'd get an infinite loop.
            >
          • mouss
            ... yes. by default, postfix has no inbound vs outbound. _you_ tell postfix what kind of mail it is.
            Message 5 of 7 , Oct 2, 2009
            • 0 Attachment
              Darvin Denmian wrote:
              > mouss,
              >
              > as you said , if I use content_filter=3Dfilter:localhost:<port>
              > and my filter is able to reinject the message in postfix queue,
              > Postfix will check inbound and outbound messages, right?
              >

              yes. by default, postfix has no inbound vs outbound. _you_ tell postfix
              what kind of mail it is.
            Your message has been successfully submitted and would be delivered to recipients shortly.