Banned Rules

Deeztek Support support at deeztek.com
Thu Jul 24 22:24:41 CEST 2014


Hello,

In the amavis config file, if I want to implement banned rules, from 
what I understand I have to do something along these lines.

Add an entry such as the one below in the amavis config file:

%banned_rules = (
   'TEST1' => new_RE( [qr'.\.(zip)$'i => 0],[qr'.\.(exe)$'i => 
1],[qr'.\.(bat)$'i => 1],[qr'.\.(cmd)$'i => 1],[qr'.\.(com)$'i => 
1],[qr'.\.(dll)$'i => 1] ),
   'TEST2' => new_RE( [qr'.\.(zip)$'i => 0],[qr'.\.(exe)$'i => 
1],[qr'.\.(bat)$'i => 1] ),
   'DEFAULT' => $banned_filename_re,
);

then if I need them on a per-user basis, I need to add the name of the 
rule in the "banned_rulenames" column of the policy table.

so, I have two questions. First, instead of editing the amavis config 
file and entering the entry above, is there a way to define banned rules 
in the database somewhere. If not, instead of adding the above entry in 
the amavis config file, can I add the rules to a separate file and 
simply point to that file from the amavis config file?

Thanks for your help in advance.



More information about the amavis-users mailing list