Can I prevent the caching of SQL results?

Daniel Funke daniel at dhag.net
Wed May 18 15:40:15 CEST 2016


Hello,

I want to do a sql query for every policy bank. It works fine basically. 
But when I switch the policy bank with @virus_name_to_policy_bank_maps 
the sql of the new policy bank is not executed and the old values are used.

Any nice ideas?

Bye, Daniel


$policy_bank{'IN_PRE_QUEUE'} = {
   syslog_ident              => 'amavis-prequeue',
   sql_clause  =>  { 'sel_policy' => "SELECT * FROM 
amavisd_select_policy WHERE policy_bank='IN_PRE_QUEUE' AND email IN (%k)" },
   enable_dkim_verification  => 0,
   final_virus_destiny       => D_REJECT,
   final_banned_destiny      => D_REJECT,
   final_spam_destiny        => D_REJECT,
   final_bad_header_destiny  => D_REJECT,
   forward_method           => 'smtp:[127.0.0.1]:11025',
};

@virus_name_to_policy_bank_maps =
   (new_RE(
   [ qr'^Heuristics.OLE2.ContainsMacros$' => 'IN_MACRO' ],
   [ qr'^Sanesecurity.Badmacro.Doc.CreObj.UNOFFICIAL$' => 'IN_MACRO' ],
));

$policy_bank{'IN_MACRO'} = {
   syslog_ident              => 'amavis-macro',
   sql_clause  =>  { 'sel_policy' => "SELECT * FROM 
amavisd_select_policy WHERE policy_bank='IN_MACRO' AND email IN (%k)" },
   enable_dkim_verification  => 0,
   final_virus_destiny       => D_DISCARD,
   final_banned_destiny      => D_PASS,
   final_spam_destiny        => D_PASS,
   final_bad_header_destiny  => D_PASS,
   forward_method            => 'smtp:[127.0.0.1]:11025',
};



More information about the amavis-users mailing list