FileType rules show executable even though file shows data --Please help fix.

Mark Sapiro mark at msapiro.net
Wed Jul 7 23:49:42 IST 2010


Peter Ong wrote:
>
>> I think the reason your "allow - text/x-mail - -" rules don't work is
>> that
>> FileType Rules is an "all match" ruleset and not a "first match"
>> ruleset.
>
>What do you mean by this? Does it go down the lines and stop at the first match or does it behave differently?


See
<http://www.mailscanner.info/MailScanner.conf.index.html#Filetype%20Rules>.
This says that Filetype Rules is an "All Match" rule set.

MailScanner rulesets are either "First Match" or "All Match". In
processing a First Match ruleset, MailScanner goes through the rules
in order and does what ever is specified in the first rule that
matches. In processing an All Match ruleset, MailScanner matches all
the rules and from the matching rules, picks one. In the case of
Yes/No rules, it does Yes if any Yes rule matches, even if No rules
also match. (See "Further Information" near the top of
<<http://www.mailscanner.info/MailScanner.conf.index.html>)

It is not at all clear to me how Allow/Deny rules are supposed to work
in an All Match context, but your experience seems to say that if any
Deny rule matches, that's what's done.


>Do both 2/5 or 2/4 and 3/5 (fields) have to be filled out or only one? If it's regex, do I have to escape the spaces so string1\ string2 and so on?


In the 5 field rules for Filetype Rules, I *think* the second field is
ignored and only the third field counts. I also *think* that since the
fields are tab delimited, having spaces in the match field is OK.
Spaces don't need to be escaped for meaning in a regexp. They only
need to be escaped if it is necessary to treat them as part of the
field rather than a field separator.

Jules or someone else who knows this more than I may have a better
answer.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the MailScanner mailing list