Re: [AMaViS-user] Virus scanning stopped working and resolution

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 ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-08-2007
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Virus scanning stopped working and resolution

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0