I am attempting to configure content filtering by following this guide:
http://www.postfix.org/FILTER_README.html I have added the filter service and modified the smtp service in master.cf: filter unix - n n - 10 pipe flags=Rq user=filter null_sender= argv=/home/filter/filter.sh -f ${sender} -- ${recipient} smtp inet n - y - - smtpd -o content_filter=filter:dummyand reloaded postfix. When that didn't work I tried editing master.cf.proto instead but still no change in behavior. I also tried adding the filter option to these services:
smtp unix - - y - - smtp
-o content_filter=filter:dummy
relay unix - - y - - smtp
-o syslog_name=postfix/$service_name
-o content_filter=filter:dummy
but no joy.
The mail is being sent but the filter is not being used. I can delete
the filter script, mail still gets sent and no difference in behavior
occurs. I would expect some kind of error if the filter script can't be
found so I think its not even trying to use the filter.
When I run the following command:echo "body of your email" | mail -s "This is a subject too" -a "From:[email protected]" [email protected]
This is the syslog outout I see:Feb 10 19:39:03 postfix postfix/pickup[13850]: 7D1D0E0E6F: uid=0 from=<[email protected]> Feb 10 19:39:03 postfix postfix/cleanup[13903]: 7D1D0E0E6F: message-id=<[email protected]> Feb 10 19:39:03 postfix postfix/qmgr[13849]: 7D1D0E0E6F: from=<[email protected]>, size=393, nrcpt=1 (queue active) Feb 10 19:39:04 postfix postfix/smtp[13905]: 7D1D0E0E6F: to=<[email protected]>, relay=ASPMX.L.GOOGLE.com[173.194.219.26]:25, delay=0.61, delays=0.03/0.03/0.24/0.31, dsn=2.0.0, status=sent (250 2.0.0 OK 1644521944 i1si9676536ybt.537 - gsmtp)
Feb 10 19:39:04 postfix postfix/qmgr[13849]: 7D1D0E0E6F: removed What am I missing?
OpenPGP_signature
Description: OpenPGP digital signature
