This is a discussion on Re: [AMaViS-user] Virus scanning stopped working and resolution within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Adam, > I had: > @bypass_virus_checks_maps = ( > 'virusalert\@$mydomain' => 1, > ); > I changed it to the below config ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Adam,
> I had: > @bypass_virus_checks_maps = ( > 'virusalert\@$mydomain' => 1, > ); > I changed it to the below config after looking at the samples again: > @bypass_virus_checks_maps = ( > { "virusalert\@$mydomain" => 1, > }, > ); > AV is working again. I assume it was the missing {} that disabled > antivirus completely but I am not perl savy enough to understand what value > amavisd-new got when reading it without them. Lesson learned... be VERY > VERY careful when modifying these variables :). Yes, it was the missing {}, which constructs a ref to an associative array (a hashref). The @*_maps arrays are lists of lookup tables, each can be a hashref, an arrayref, a regexp list object, or a constant (see README.lookups). In your case it was a constant (actually two of them), so the result of a lookup was always this constant (a string 'virusalert\@$mydomain'), which when interpreted as a boolean is always true. Having perl code as a configuration program is both a strength and a weekness of this approach. Mark ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |