Brian,

> Thanks for the hint, but this specific example doesnt work because you
> must enclose the regular expression in the new_RE() function call in
> order for it to match correctly. More like
>
> @bypass_banned_checks_maps = (
>           { 'example.com'      => 0,  # this domain, but not its subdomains
>             '.example.com'     => 0,  # this domain, including subdomains
>           }, 
>           new_RE ( [qr/^/ => 1] ),   # true by default
>         );

If you know it always evaluates to true, why not just supply a constant
instead of computing the true every time :-)

@bypass_banned_checks_maps = (
    { '.example.com' => 0, }  # this domain with its subdomains
    1,   # true for everything else
);

Hint: README.lookups:
  A CONSTANT
  Specifying a Perl scalar as an argument to lookup() is a degenerate
  case of a lookup table: it matches any key, and the value of the
  scalar is returned as the match value.

Mark



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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