Assigning a virus scanner to a policy bank (AV: Not an ARRAY reference...)
Antoine Nguyen
tonio at ngyn.org
Wed Jun 13 11:10:33 CEST 2012
Le 12/06/2012 23:57, Patrick Ben Koetter a écrit :
> I'd like to use different virus scanners for different policy banks, but I
> fail to specify them correctly in a $policy_bank.
>
> From reading amavisd-new code I can tell @av_scanners is part of
> 'dynamic_confvars' and that makes it a candidate for per-policy bank settings,
> but how do I do specify the virus scanner?
>
> Here's what I have at the moment, which causes errors:
>
> $interface_policy{'10024'} = 'avira';
> $policy_bank{'avira'} = {
> av_scanners => ['Avira SAVAPI', \&ask_daemon,
> ["*", 'savapi:/var/run/avira/savapi.sock', '000000'],
> qr/^(200|210) /m, qr/^(310|420|319) /m,
> qr/^(310|420) (.+?) ; \S* ; (?:.*)$/m ]
> };
>
> It causes these log messages:
>
> Jun 12 11:52:23 scanner amavis[19678]: (19678-19) (!!)AV: Not an ARRAY reference at (eval 125) line 919.
> Jun 12 11:52:23 scanner amavis[19678]: (19678-19) (!!)TROUBLE in check_mail: virus_scan FAILED: AV: 1
>
Patrick,
have you already tried like this ?
$policy_bank{'avira'} = {
av_scanners => (
['Avira SAVAPI', \&ask_daemon,
["*", 'savapi:/var/run/avira/savapi.sock', '000000'],
qr/^(200|210) /m, qr/^(310|420|319) /m,
qr/^(310|420) (.+?) ; \S* ; (?:.*)$/m ],
),
};
Antoine
http://modoboa.org/
More information about the amavis-users
mailing list