when u send by localhost sendmail filters layers not raised.
you need to send mail via regular smtp 25.
El 10/2/22 a las 20:50, Edward Sandberg escribió:
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:dummy
and 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:redac...@redacted.com" redac...@redacted.com
This is the syslog outout I see:
Feb 10 19:39:03 postfix postfix/pickup[13850]: 7D1D0E0E6F: uid=0
from=<redac...@redacted.com>
Feb 10 19:39:03 postfix postfix/cleanup[13903]: 7D1D0E0E6F:
message-id=<20220210193903.7d1d0e0...@postfix.redacted.net>
Feb 10 19:39:03 postfix postfix/qmgr[13849]: 7D1D0E0E6F:
from=<redac...@redacted.com>, size=393, nrcpt=1 (queue active)
Feb 10 19:39:04 postfix postfix/smtp[13905]: 7D1D0E0E6F:
to=<redac...@redacted.com>,
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?