BAD FILENAME DETECTED: something.[common-extension].pdf

Glenn Steen glenn.steen at
Fri Sep 4 08:52:58 IST 2009

2009/9/3 Kevin Miller <Kevin_Miller at>:
> Robert Lopez wrote:
>> Thanks Kevin.  So I should be concerned I will sooner or later get
>> complaints as this may be interfering in business.
>> At first thoughts I do not want to change the file name rule but I
>> may have to white list those government agencies.
> So far I've just explained to the sender why it's a good idea for them to change their filenames.
> Guess I could add an exception to filename.rules.conf but there are .pdf exploits so I kind of hesitate to.  If you get enough flak for pushing the problem back on the source, you could create a ruleset for the particular .gov (sub)domains and add that into fileame.rules.
> Best...
> ...Kevin
You can actually put something like:
# Allow .doc.pdf ... Bloody MorganStanley
allow   \.[a-z0-9]{3,4}\.pdf$   -       -

just above the double extension test in filename.rules.conf (adjust
the comment to suit your irritant;-):-) ... There's also a standard
example in there, from Jules, on how to do this (the <weekday>.doc and
<month>.doc thing).

Be careful to separate columns with <TAB> characters, and be sure to
run "MailScanner --lint" after doing your edits ... and you should be

-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se

More information about the MailScanner mailing list