<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Thu, 18 Oct 2018 at 15:32, Matus UHLAR - fantomas <<a href="mailto:uhlar@fantomas.sk">uhlar@fantomas.sk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I am trying to get rid of annoying "Open relay?" messages and later set up<br>
DKIM signing, which both I believe are doable by properly setting<br>
@mynetworks.<br>
<br>
the README.lookups says:<br>
<br>
@mynetworks_maps = (read_array('/etc/amavisd-mynetworks'), \@mynetworks);<br>
<br>
or<br>
<br>
@mynetworks_maps = (read_hash('/etc/amavisd-mynetworks'), \@mynetworks);<br>
<br>
and <a href="https://sourceforge.net/p/amavis/mailman/message/24573173/" rel="noreferrer" target="_blank">https://sourceforge.net/p/amavis/mailman/message/24573173/</a> recommends<br>
"not to forget to re-evaluate the @client_ipaddr_policy after/if<br>
@mynetworks_maps is changed:"<br>
<br>
@client_ipaddr_policy = map(($_,'MYNETS'), @mynetworks_maps);<br>
<br>
<br>
I have tried it all.<br>
<br>
I have even assigned direct IP addresses to @mynetworks:<br>
<br>
@mynetworks = qw(127.0.0.1 192.168.20.40 );<br>
<br>
but the message still appears:<br>
<br>
Oct 18 16:15:48 smtp2 amavis[1814]: (01814-15) Checking: WwuVqzvm1fVY AM.PDP-SOCK [192.168.20.40] <censored> -> <censored><br>
Oct 18 16:15:48 smtp2 amavis[1814]: (01814-15) Open relay? Nonlocal recips but not originating: censored<br>
<br>
I am using amavisd-milter to process mail at SMTP level. <br>
do I need to play with policy banks? <br>
<br>
amavisd-new-2.10.1, Debian 8.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">I too have had this problem. But now, based on studying amavisd.conf-default, I think the problem is that when we set a policy_bank it overwrites (for emails that are covered by it) with default values many variables that may be specifically defined by us outside the policy bank - which is not the behaviour you or I would expect. This includes @mynetworks; so you need to define @mynetworks *inside* the policy bank for it to be effective for these emails - in your case this means inside $policy_bank { 'AM.PDP-SOCK' }.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">HTH, Dominic</div></div></div></div>