Re: [AMaViS-user] Banned files and SQL

This is a discussion on Re: [AMaViS-user] Banned files and SQL within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Chris, > I'm struggling to understand the documentation relating to the > banned_rulenames field in SQL tables. See release ...


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-31-2005
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Banned files and SQL

Chris,

> I'm struggling to understand the documentation relating to the
> banned_rulenames field in SQL tables.


See release notes of 2.3.0.

> The best I've been able to get to is this, and I wonder if someone can let
> me know if I'm heading in the right direction before I spend too much time
> on this.
>
> I need to set up a pile of different REs, each in a reference with an
> arbitary name:
>
> eg
> $banned_re_1 = [qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i =>
> 1]; $banned_re_2 = [qr'^\.(exe-ms)$]' => 1];


Yes, almost. You should use new_RE() constructor instead of [],
because what you need to assign to $banned_re_1 should be
a reference to an object of type Amavis::Lookup::RE
(which is a list, but 'coloured'), instead of a plain list.

> Then I need to set up a hash which maps names to these:
> eg
>
> %banned_rules = {'double_extensions' => $banned_re_1,
> 'ms_executables' => $banned_re_2 };
>
> And then use these names in a comma separated list in the SQL table field
> banned_rulenames. Am I anywhere near?


Right. If there is more than one rules-set in a list, these are traversed
in order (i.e. glued together and given to a lookup subroutine).

Mark


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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
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

vB 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 04:21 PM.


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