On Thursday 17 September 2009 00:14:19 Mike Cappella wrote:
> It sounds like you don't want to change $sa_tag2_level_deflt, as it is a
> single, default value (although it is a member of a policy_bank), but
> instead want per-recipient tag2 levels.
> 
> You can read values into a maps array via read_array() (or into a hash
> with read_hash()). If believe this is the (unchecked/untested) syntax:
> /etc/amavisd.conf:
>      @spam_tag2_level_maps  = (read_array('/var/amavis/tag2_maps.dat')); 
> /var/amavis/tag2_maps.dat:
>     { '[email protected]' => 8.0, '.example.com'      => 6.0 }
>      \$sa_tag2_level_deflt
> one array entry per line.  Note the first line is an anonymous hash ref,
> containing two mappings. Since we are mapping address to value, a hash
> is used.  The second line here contains the fallback default mapping.
> No hash required since the bare value (reference to
> $sa_tag2_level_deflt) is used for everything else.

This isn't right. The read_array and read_hash do not read and parse
perl syntax, instead they read a plain unstructured file, with one entry
per line, and in case of a read_hash this means a key and its value,
separated by whitespace. E.g.:

@spam_tag2_level_maps = ( read_hash('/var/amavis/tag2_maps.dat') );

while the file would look like:

[email protected] 7.5
[email protected] 8
.example.com 6
. 6.3


Mark

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to