Bypass filtetype or filename blocking and quarantine

Mark Sapiro mark at
Fri Nov 30 16:48:25 UTC 2018

On 11/30/18 5:41 AM, George Papamichelakis wrote:
> I'm trying to bypass filename checking  using the examples mentioned in
> the book
> in Appendix C  .

Which is quite old.

> In particular I have created the three mentioned files
> (filename.rules.allowall.conf,
> filetype.rules.allowall.conf and filename.rules).

What about filetype.rules?

And did you create these in the appropriate (/etc/MailScanner/ and
/etc/MailScanner/rules/) directories, not literally %etc-dir% and %rules%?

> The only different
> thing I have done
> different is that I specify a complete mail address instead of the
> domain eg:
> FromOrTo:  user at email.tld %etc-dir%/filename.rules.allowall.conf

I think you may need /etc/MailScanner/filename.rules.allowall.conf
instead of %etc-dir%/filename.rules.allowall.conf.

And did you make the appropriate Filename Rules and FileType Rules
settings in MailScanner.conf or better in a file in

> (I don't want the whole domain to go unchecked, only some users) . But
> the rule don't seem to work
> Is this the expected behavior ? If not can I somehow trace why the rule
> doesn't apply ?

First make sure everything is as indicated above. Then if there are
still problems, post the the actual file path names and their contents
(you can obfuscate actual email addresses) and your config settings for
Filename Rules and FileType Rules.

> Also can I specify in the rule  that I want to bypass the filename (or
> type) checks when the user is the sender but not when the user is the
> recipient ?

Instead of FromOrTo, just use From.

See the files README and EXAMPLES in /etc/MailScanner/rules.

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

More information about the MailScanner mailing list