Leonardo Rodrigues, > I'm doing some file blocking with amavisd and i noticed amavisd > 2.6.0 can done file blocking on two different variables: > banned_filename_re > and > banned_namepath_re > (yes, use only one at a time, i know)
Even both at the same time may be used, but this gets excessively difficult to understand and is redundant, so it is best to stick to one or the other. > banned_namepath seems to me very complex. banned_filename is not > that simple, but at least not as complex as banned_namepath. Right. I was trying to come up with a more general-purpose sulution than banned_filename_re offes, and came up with the banned_namepath_re. The downside is that it is even harder to uderstand as you have noted, so I'm not pushing this solution. > question .... being banned_namepath the 'new' way of doing this, is > banned_filename scheduled to be removed on future releases, or both ways > will continue to exist on amavisd-new ? Seems they are both here to stay, none is scheduled for being phased out. > what are the main advantages of banned_namepath aginst > banned_filename ...... i couldnt get them ... the only difference > i can note is that banned_namepath is pretty much more complex .... The advantage of a banned_namepath is that each rule has a "bird's eye view" on the entire information about each mail part, i.e. its position in a MIME tree, file and mime types and names of all its parent nodes, etc. So a rule can potentially make more complex decision, based on the environment in which each mail part is (e.g. a.txt within z.zip is allowed, while b.txt whithin a z.zip is not, even though b.txt within some other archive is fine). The banned_filename only sees one node at a time (no parent nodes of each leaf node), but compensates for the lack of information by sticking to a pre-established top-down order of traversal of a tree. So if a rule decides for example that x.zip is allowed, the rules for checking each member of a zip archive are not even reached. Which suffices for most common needs. Mark ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/