On 05.02.20 11:47, Sig Pam wrote:
The current documentation <http://www.postfix.org/FILTER_README.html> states:

   The "-o content_filter" line causes Postfix to add one content filter 
request record to each incoming mail message ...

Q1: Is it still true you can not give a list of content filters which are
processed one after the other?

it doesn't make sense. content filter is expected to push mail  back to
postfix other way, so message can't get to second filter.

Q2: Assuming this is still true and content_filter does not take a list of
filters, is there a better technique than creating a "wrapper script" to
call the multiple filters one after the other?

you can create filter chain in postfix by pushing mail to multiple ports
each having own filter.

Background: I currently pipe my mail to spamassassin, but I also want to
call a program adding a boilerplate for each outgoing mail (legal reason),
and I think about a script which modifies incoming mails to strip html
links to prevent my users clicking on them.  These are three filters which
should run on each mail.

Bonus question: I can configure a content_filter for each service defined
in master.cf, but there is also a parameter content_filter in main.cf. What does the latter refer to, and in which order are they processed? I'm
confused ...

options in master.cf are used to override those in main.cf.
if you don't override it in master.cf for a service, that service uses
main.cf value.

smtp       inet  n       -       y       -       -       smtpd
        -o content_filter=spamassassin

spamassassin unix - n n - - pipe
        user=spamd argv=/usr/bin/spamc --max-size 5242880 -d 127.0.0.1 -f -e 
/usr/sbin/sendmail -oi -f ${sender} ${recipient}

main.cf:

content_filter = smtp-amavis:127.0.0.1:10024

apparently amavis is only used when receiving mail other way than smtp (on
port 25).

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux IS user friendly, it's just selective who its friends are...

Reply via email to