amavis-user March 2012 archive
Main Archive Page > Month Archives  > amavis-user archives
amavis-user: [Solved]: policy_bank reports unknown field

[Solved]: policy_bank reports unknown field

From: Christian Schmidt <Christian.Schmidt_at_nospam>
Date: Mon Mar 19 2012 - 09:17:29 GMT
To: amavis-users@amavis.org

Hello Mark,

Mark Martinec, 17.03.2012 (d.m.y):

> Leave out a dollar prefix in key names. A policy bank is an
> associative array (a hash). Its elements are key/value pairs.
> Each key is a name of a variable, but without its $ or @ or % prefix.
>
> What happened in your case is the $final_virus_destiny was
> first evaluated to its current value (D_REJECT is -3), then
> the result was used as a key - and the '-3' is not a known
> name of a setting.
>
> Use this instead:
>
> $policy_bank{'SUBMIT'} = {
> originating => 1,
> virus_admin_maps => ["itadmin\@$mydomain"],
> spam_admin_maps => ["itadmin\@$mydomain"],
> spam_kill_level_maps => [7.5],
> final_virus_destiny => D_BOUNCE,
> final_banned_destiny => D_BOUNCE,
> final_spam_destiny => D_BOUNCE,
> };

Great, thank you very much!

Gruss/Regards,
Christian Schmidt

-- It were not best that we should all think alike; it is difference of opinion that makes horse-races. -- Mark Twain, "Pudd'nhead Wilson's Calendar"