I've verified I have the correct config file. Via checking the amavisd.service
file. And, if I make an error in the config file, amavis won't start (via
systemctl restart amavisd).
I changed my policy bank a little to add some logging (I thought):
$policy_bank{'MYNETS'} = { # mail originating from @mynetworks
originating => 1, # is true in MYNETS by default, but let's make it explicit
syslog_ident => 'amavis-mynet',
syslog_priority => 'warn',
os_fingerprint_method => undef, # don't query p0f for internal clients
bypass_spam_checks_maps => [1], # don't spam-check internal mail
bypass_banned_checks_maps => [1], # don't banned-check internal mail
bypass_header_checks_maps => [1], # don't header-check internal mail
};
Restart amavisd then send myself a message locally using:
echo test | mail -s test techht
It still looks like it gets checked
X-Virus-Scanned: amavisd-new at myserver.com
X-Spam-Flag: NO
X-Spam-Score: -0.001
X-Spam-Level:
X-Spam-Status: No, score=-0.001 tagged_above=-9999 required=5
tests=[NO_RELAYS=-0.001] autolearn=no autolearn_force=no
And shouldn't there be something in the log from this: syslog_ident =>
'amavis-mynet' ?
Aug 7 19:56:12 mail2 postfix-pickup/pickup[24645]: A1C431373: uid=0 from=<root>
Aug 7 19:56:12 mail2 postfix-preF/cleanup[25868]: A1C431373:
message-id=<[email protected]>
Aug 7 19:56:12 mail2 postfix/qmgr[7199]: A1C431373:
from=<[email protected]>, size=466, nrcpt=1 (queue active)
Aug 7 19:56:12 mail2 amavis[25775]: (25775-01) LMTP :10024
/var/spool/amavisd/tmp/amavis-20170807T195612-25775-xDXH2JAb:
<[email protected]> -> <[email protected]> SIZE=466 Received:
from mail2.myserver.com ([127.0.0.1]) by localhost (mail2.myserver.com
[127.0.0.1]) (amavisd-new, port 10024) with LMTP for
<[email protected]>; Mon, 7 Aug 2017 19:56:12 -0500 (CDT)
Aug 7 19:56:12 mail2 amavis[25775]: (25775-01) Checking: aihxlsgLi-8P
[127.0.0.1] <[email protected]> -> <[email protected]>
Aug 7 19:56:13 mail2 postfix-from-amavis/smtpd[25879]: connect from
localhost[127.0.0.1]
Aug 7 19:56:13 mail2 postfix-from-amavis/smtpd[25879]: 44DA69E8:
client=localhost[127.0.0.1], orig_client=unknown[127.0.0.1]
Aug 7 19:56:13 mail2 postfix-postF/cleanup[25880]: 44DA69E8:
message-id=<[email protected]>
Aug 7 19:56:13 mail2 postfix/qmgr[7199]: 44DA69E8:
from=<[email protected]>, size=1136, nrcpt=1 (queue active)
Aug 7 19:56:13 mail2 postfix-from-amavis/smtpd[25879]: disconnect from
localhost[127.0.0.1] ehlo=1 xforward=1 mail=1 rcpt=1 data=1 quit=1 commands=6
Aug 7 19:56:13 mail2 amavis[25775]: (25775-01) aihxlsgLi-8P FWD from
<[email protected]> -> <[email protected]>, BODY=7BIT 250
2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 44DA69E8
Aug 7 19:56:13 mail2 amavis[25775]: (25775-01) Passed CLEAN {RelayedInbound},
[127.0.0.1] <[email protected]> -> <[email protected]>,
Message-ID: <[email protected]>, mail_id:
aihxlsgLi-8P, Hits: -0.001, size: 466, queued_as: 44DA69E8, 615 ms
Aug 7 19:56:13 mail2 postfix-smtp-amavis/lmtp[25870]: A1C431373:
to=<[email protected]>, orig_to=<localuser>,
relay=127.0.0.1[127.0.0.1]:10024, delay=0.68, delays=0.03/0.01/0.02/0.61,
dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0
Ok: queued as 44DA69E8)
Aug 7 19:56:13 mail2 postfix/qmgr[7199]: A1C431373: removed
Aug 7 19:56:13 mail2 postfix/local[25881]: 44DA69E8:
to=<[email protected]>, relay=local, delay=0.07,
delays=0.02/0.04/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Aug 7 19:56:13 mail2 postfix/qmgr[7199]: 44DA69E8: removed
Scott