As far as I could find in the source when I was configuring it, any maps from policy banks are merged with the default or custom map.<br><br><div class="gmail_quote">On 18 September 2014 14:20, Christian Rößner <span dir="ltr"><<a href="mailto:c@roessner-network-solutions.com" target="_blank">c@roessner-network-solutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi again,<br>
<span class=""><br>
Am 18.09.2014 um 10:41 schrieb Joolee <<a href="mailto:amavisd@joolee.nl">amavisd@joolee.nl</a>>:<br>
<br>
</span><div><div class="h5">> Which version of Amavisd-new are you running? The final_destiny_maps_by_ccat setting is only available since v2.9<br>
><br>
> The default value of the map variable is as listed below. The first 5 entries specify that the value has to be retrieved from the old-style variables. You are overwriting this default value and using the old-style variables in your ORIGINATING policy bank. Without looking at the code for parsing the policy banks, I dare to say that this is your problem. Try overwriting the map values in your ORIGINATING policy bank as you did in your EICAR_TEST bank. Although I do wonder why you have function brackets after "CC_VIRUS"<br>
><br>
>   # build backward-compatible settings hashes<br>
>   #<br>
>   %final_destiny_maps_by_ccat = (<br>
>     # value is normally a list of by-recipient lookup tables, but for compa-<br>
>     # tibility with old %final_destiny_by_ccat a value may also be a scalar<br>
>     CC_VIRUS,       sub { c('final_virus_destiny') },<br>
>     CC_BANNED,      sub { c('final_banned_destiny') },<br>
>     CC_UNCHECKED,   sub { c('final_unchecked_destiny') },<br>
>     CC_SPAM,        sub { c('final_spam_destiny') },<br>
>     CC_BADH,        sub { c('final_bad_header_destiny') },<br>
>     CC_MTA.',1',    D_TEMPFAIL,  # MTA response was 4xx<br>
>     CC_MTA.',2',    D_REJECT,    # MTA response was 5xx<br>
>     CC_MTA,         D_TEMPFAIL,<br>
>     CC_OVERSIZED,   D_BOUNCE,<br>
>     CC_CATCHALL,    D_PASS,<br>
>   );<br>
> On 18 September 2014 08:31, Christian Rößner <<a href="mailto:c@roessner-network-solutions.com">c@roessner-network-solutions.com</a>> wrote:<br>
> Hi,<br>
><br>
> I have two Postfix instances. One is submission, the other a combined mxin/mxout/hub.<br>
><br>
> I do amavisd-milter on incoming and outgoing mail on the mxin/mxout.<br>
><br>
> On the mxout I give a ORIGINATINg macro to do a special policy-bank for submission users that does not check spam (for legal reasons). But it does check for viruses. I have set the final_virus_destiny to D_BOUNCE.<br>
><br>
> I also have a special policy-bank for the EICA-test virus. That should also do a D_BOUNCE.<br>
><br>
> Sep 18 08:18:33 mx amavis[4588]: (04588-01) Blocked INFECTED (Eicar-Test-Signature) {NoBounceOutbound,Quarantined}, AM.PDP-SOCK/ORIGINATING/EICAR_TEST LOCAL [193.239.107.42] [193.239.106.201] <<a href="mailto:c@roessner-network-solutions.com">c@roessner-network-solutions.com</a>> -> <<a href="mailto:cr@deltaweb.de">cr@deltaweb.de</a>>, quarantine: nErWWT6nkl_s, Queue-ID: 3hz7KN0rRqzGp0j, Message-ID: <<a href="mailto:209C73CC-2067-44C9-AAAE-5F5D68790090@roessner-network-solutions.com">209C73CC-2067-44C9-AAAE-5F5D68790090@roessner-network-solutions.com</a>>, mail_id: nErWWT6nkl_s, Hits: -, size: 6628, 1400 ms, EICAR test message, not to worry<br>
> Sep 18 08:18:33 mx amavis[4588]: (04588-01) Blocked INFECTED (Eicar-Test-Signature), <<a href="mailto:c@roessner-network-solutions.com">c@roessner-network-solutions.com</a>> -> <<a href="mailto:cr@deltaweb.de">cr@deltaweb.de</a>>, Hits: -, tag=0, tag2=0, kill=0, 0/0/0/0<br>
> Sep 18 08:18:33 mx amavisd-milter[2425]: 3hz7KN0rRqzGp0j: log_id=04588-01<br>
> Sep 18 08:18:33 mx amavisd-milter[2425]: 3hz7KN0rRqzGp0j: return_value=discard<br>
> Sep 18 08:18:33 mx postfix/cleanup[4642]: 3hz7KN0rRqzGp0j: milter-discard: END-OF-MESSAGE from <a href="http://mail.roessner-net.de" target="_blank">mail.roessner-net.de</a>[193.239.107.42]: milter triggers DISCARD action; from=<<a href="mailto:c@roessner-network-solutions.com">c@roessner-network-solutions.com</a>> to=<<a href="mailto:cr@deltaweb.de">cr@deltaweb.de</a>> proto=ESMTP helo=<<a href="http://mail.roessner-net.de" target="_blank">mail.roessner-net.de</a>><br>
><br>
> Unfortunately it is not bounced and it gets discarded. Only the postmaster does get a notify that a virus was caught.<br>
><br>
> Here are the settings that I focused on:<br>
><br>
> $policy_bank{'ORIGINATING'} = {<br>
>   originating                     => 1,<br>
>   final_banned_destiny            => D_BOUNCE,<br>
>   final_virus_destiny             => D_BOUNCE,<br>
>   allow_disclaimers               => 1,<br>
>   bypass_spam_checks_maps         => [1],<br>
>   enable_ldap                     => 0,<br>
> };<br>
><br>
> $policy_bank{'EICAR_TEST'} = {<br>
>   log_templ => $log_short_templ . ', EICAR test message, not to worry',<br>
>   final_destiny_maps_by_ccat      => { CC_VIRUS() => D_BOUNCE },<br>
> };<br>
><br>
> $warn_offsite = 0;<br>
> $warnbannedsender = 0;<br>
> $warnbannedrecip = 1;<br>
> $warnvirussender = 0;<br>
> $warnvirusrecip = 1;<br>
> $warnbadhsender = 0;<br>
> $warnbadhrecip = 0;<br>
><br>
> $final_virus_destiny = D_REJECT;<br>
><br>
> %final_destiny_maps_by_ccat = (<br>
>   CC_VIRUS,             sub { c('final_virus_destiny') },<br>
>   CC_BANNED,            sub { c('final_banned_destiny') },<br>
>   CC_UNCHECKED,         sub { c('final_unchecked_destiny') },<br>
>   CC_UNCHECKED.',1',    D_PASS,<br>
>   CC_SPAM,              sub { c('final_spam_destiny') },<br>
>   CC_BADH,              sub { c('final_bad_header_destiny') },<br>
>   CC_MTA.',1',          D_TEMPFAIL,<br>
>   CC_MTA.',2',          D_REJECT,<br>
>   CC_OVERSIZED,         D_BOUNCE,<br>
>   CC_CATCHALL,          D_PASS,<br>
> );<br>
><br>
> %admin_maps_by_ccat = (<br>
>   CC_VIRUS,       sub { ca('virus_admin_maps') },<br>
>   CC_BANNED,      sub { ca('banned_admin_maps') },<br>
>   CC_UNCHECKED,   sub { ca('virus_admin_maps') },<br>
>   CC_UNCHECKED.',1',    undef,<br>
>   CC_SPAM,        sub { ca('spam_admin_maps') },<br>
>   CC_BADH,        sub { ca('bad_header_admin_maps') },<br>
> );<br>
><br>
> I probably do not understand all meaning here, so I guess I misconfigured something. Does the order play a role, in which settings have been done here? I have copied all relevant snippets in the order they appear in my config file.<br>
><br>
> Can I turn a NoBounceOutbound?<br>
<br>
</div></div>I have modified my config. I also removed the enable_ldap=0 variable in the policy-bank, because I thought that amavis would not know, if mail is going outbound or inbound.<br>
<br>
Still no luck at all.<br>
<br>
I attached my whole config now. I am pretty sure, I have missed something and I do not see where. Probably looked too long at the lines :-)<br>
<br>
One question to the new maps_cc stuff: What happens to all the other CC_* things, if I overload it in a policy-bank? As a python developer I would expect that the map is a reference and gets replaced. So not using the old-style variables would mean to define the whole map each time. Am I right? How is Perl doing this?<br>
<br>
<br><br>
<br>
Thanks for help in advance<br>
<br>
Christian<br>
--<br>
Bachelor of Science Informatik<br>
Erlenwiese 14, 36304 Alsfeld<br>
T: <a href="tel:%2B49%206631%2078823400" value="+49663178823400">+49 6631 78823400</a>, F: <a href="tel:%2B49%206631%2078823409" value="+49663178823409">+49 6631 78823409</a>, M: <a href="tel:%2B49%20171%209905345" value="+491719905345">+49 171 9905345</a><br>
USt-IdNr.: DE225643613, <a href="http://www.roessner-network-solutions.com" target="_blank">http://www.roessner-network-solutions.com</a><br>
<br>
<br></blockquote></div><br>