mynetworks not triggering spam check bypass via policy bank

Indunil Jayasooriya indunil75 at gmail.com
Tue Aug 8 04:47:45 CEST 2017


pls try these


to disable amavis / content filter on the pickup service we simply
overwrite the default via


*pickup    fifo  n       -       n       60      1       pickup   -o
content_filter=*

or we could also define filtering on a different post and specify a policy
bank












*pickup    fifo  n       -       n       60      1       pickup   -o
content_filter=amavis:[127.0.0.1]:10026$inet_socket_port = [10024,10026];
 # listen on multiple TCP ports$interface_policy{'10026'} =
'LOCALHOST';$policy_bank{'LOCALHOST'} = {   # mail originating from
@localhost postfix pickup service  originating => 1,  # is true in MYNETS
by default, but let's make it explicit  os_fingerprint_method => undef,  #
don't query p0f for internal clients  bypass_spam_checks_maps   => [1],  #
don't spam-check};*



source -
http://amavis-users.amavis.narkive.com/lFgDTqZm/mail-from-localhost-is-not-local





On Tue, Aug 8, 2017 at 6:50 AM, Scott Techlist <techlist06 at msws.org> wrote:

> 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=<
> 20170808005612.A1C431373 at mail2.myserver.com>
> Aug  7 19:56:12 mail2 postfix/qmgr[7199]: A1C431373: from=<
> root at mail2.myserver.com>, 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: <
> root at mail2.myserver.com> -> <localuser at mail2.myserver.com> 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 <
> localuser at mail2.myserver.com>; 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] <root at mail2.myserver.com> -> <localuser at mail2.myserver.com>
> 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=<
> 20170808005612.A1C431373 at mail2.myserver.com>
> Aug  7 19:56:13 mail2 postfix/qmgr[7199]: 44DA69E8: from=<
> root at mail2.myserver.com>, 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 <
> root at mail2.myserver.com> -> <localuser at mail2.myserver.com>, 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] <root at mail2.myserver.com> -> <
> localuser at mail2.myserver.com>, Message-ID: <20170808005612.A1C431373 at mail
> 2.myserver.com>, 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=<
> localuser at mail2.myserver.com>, 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=<
> localuser at mail2.myserver.com>, 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
>
>
>
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20170808/40cc7ac4/attachment.html>


More information about the amavis-users mailing list