On 08.02.21 12:47, Nikolaos Milas wrote:
We have a mail gateway server (for incoming email) with postfix 3.5.8,
amavisd, clamd on CentOS 8.3.2011.
Postfix sends incoming mail to amavisd via (in main.cf):
smtpd_milters =
unix:/run/amavisd/amavisd-milter.sock
After checking, amavisd delivers mail directly using amavisd-milter daemon.
that's not how milter works, unless you instructed amavisd-milter to deliver
mail by server via "-D server" option.
The default is "-D client", which means, amavisd instructs postfix what to
do with the mail - reject/quarantine/pass it, add/remove/modify the headers
etc.
My problem is that under our current setup it seems that amavisd will
not receive mail to port 10028 (used as a bypass, to disable all
scanning), although it is listening.
How should I modify postfix config so that it sends successfully mail
to port 10028 as configured?
1. does amavisd-new listen on port 10028?
2. IIUC FILTER applies after message is queued - after milter was applied.
I am trying the following mechanism to bypass amavisd scans for
particular senders:
smtpd_recipient_restrictions =
check_sender_access hash:/etc/postfix/amavis_bypass_senders
...
/etc/postfix/amavis_bypass_senders:
[email protected] FILTER smtp:[127.0.0.1]:10028
[email protected] FILTER smtp:[127.0.0.1]:10028
However, the amavis policy bank listening at 10028 is never triggered.
The log states:
...
Feb 8 01:54:55 mailgw1 postfix/smtpd[202464]: NOQUEUE: filter: RCPT
from hedgehog.birch.relay.mailchannels.net[23.83.209.81]:
<[email protected]>: Sender address triggers FILTER
smtp:[127.0.0.1]:10028; from=<[email protected]>
to=<[email protected]> proto=ESMTP
helo=<hedgehog.birch.relay.mailchannels.net>
Feb 8 01:54:55 mailgw1 postfix/smtpd[202464]: 4DYmH36X5JzLlrw:
client=hedgehog.birch.relay.mailchannels.net[23.83.209.81]
Feb 8 01:54:56 mailgw1 postfix/cleanup[202468]: 4DYmH36X5JzLlrw:
message-id=<[email protected]>
...
again, FILTER applies after mail is received, so next lines in log should
show how the mail is delivered to amavis on port 10028
--
Matus UHLAR - fantomas, [email protected] ; 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.
Honk if you love peace and quiet.