Maximum Filename Length

Julian Field mailscanner at ecs.soton.ac.uk
Tue Jan 14 16:40:48 GMT 2003


I have found the problem. To protect against nasty things in filenames,  I
munge the filenames to "sanitise" them. Unfortunately, the filename checks
are done on the new names not the old ones. One of the checks it does is to
chop off the filename (but leave filename extensions) if the filename is
very long. So your long filename becomes a nice, safe, short filename
before this check is done.

I clearly need to fix this, just need to work out exactly how. Expect it to
be fixed in the next release.

At 15:16 14/01/2003, you wrote:
>I'm trying to write a rule in filename.rules.conf that will block all
>attachments over a certain number of characters (in this case, 100).
>However, I've been unsuccessful.  I've tried
>
>deny    .{100,} Filename over 100 characters    Filename over 100 characters
>
>and
>
>deny    ^.{100,}$       Filename over 100 characters    Filename over 100
>characters
>
>neither of which work (the e-mail just goes through normally).  I'm not an
>expert at regular expressions, so maybe I just didn't write it properly.
>This entry is the first entry in the file, there are tabs between all of the
>fields, and I have rebooted the server between changes, but I when I sent
>through an attachment with a filename over 100 characters, it goes through
>without being blocked.  Other rules I have written work as expected.
>
>What should I do to get the functionality I want?
>
>Jeremy Evans
>Information Systems Analyst
>California State Auditor
>916-445-0255 phone
>916-322-7801 fax

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list