Michael,

> What I want to do, is to bann the .exe files.
>
> $banned_filename_re = new_RE(
>   qr'^\.(exe)$'i,
> )

Ok. This tests on classifications made by a file(1) utility
(not on a name of a file).

> what about the double extensions, is it usefull to add them??
>   qr'\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)
>[.\s]*$'i,

I find it useful.

> what i also don't understand is why sth like
>   [ qr'^\.(rpm|cpio|tar)$' => 0 ],  # allow any in Unix-type archives
> should be written. i mean where's the difference to a blanc raw
> instead of "=> 0" or is it thought as preparation to easily change
> the boolean? 

Absence of =>0 would imply =>1.


README_FILES/README.lookups says:

  REGULAR EXPRESSION LOOKUPS
  [...]
  Each element of the list can be a ref to a pair, or directly a regexp
  ('Regexp' object created by qr operator, or just a (less efficient)
  string containing a regular expression). If it is a pair, the first
  element is treated as a regexp, and the second provides a return value
  in case the regexp matches. If not a pair, the implied result value
  of a match is 1.


> What do you think should i add sth else to the banned_filename_re.

If you are blocking executables, consider also blocking related MIME types:

  qr'^application/x-msdownload$'i,        # block these MIME types
  qr'^application/x-msdos-program$'i,


Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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