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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|