Maurizio,

> can i configure which mime type i want allow, not which ones are banned?

Sure. The regexp lookup table is described in README.lookups,
it applies to $banned_filename_re too.

> can i insert a *negate* operator inside
> $banned_filename_re  = new_RE( ....) exression, so that all mime type are
> banned, doc and jpg (for example) ara allowed?

Yes, just mind the syntax.

The usual lookup rules apply: entries are checked one after another
in sequence, until one matches. Its right-hand side determines whether
the result is true or false. Missing righthand side implies true.

Something along the lines:

$banned_filename_re = new_RE(
  [ qr'^message/multpart$'i => 0 ],  # allow
  [ qr'^text/plain$'i       => 0 ],  # allow
  [ qr'^\.(empty|txt|html)$ => 0 ],
  [ qr'^\.(doc|jpg)$'       => 0 ],
  [ qr'^\.(Z|gz|bz2)$       => 0 ],  # allow any in Unix-compressed
  qr'^',  # block everything else
);

It is very likely the above example is too restrictive.
Consider mime types, short file types and 'suggested' file names.
Kee in mind a tree structure of MIME. If your rules seem to behave
unexpectedly, check the log at level 5 for explanations.

  Mark

  Mark


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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