Filename Rules

Rick Cooper rcooper at DWFORD.COM
Thu Jul 29 13:14:47 IST 2004


> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> Behalf Of Paul Hamilton
> Sent: Thursday, July 29, 2004 6:08 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Filename Rules
>
>
> Hi all,
>
> We currently have our 'Archive Depth' such that all exe's, pif's etc are
> detected and quarantined.
>
> We require that a certain .exe is allowed to pass through MS, which
> arrives on a daily basis from the same source, with a similar filename.
>
> Could some one assist us in determining a suitable pattern match that
> would allow the following to pass safely.
>
>  XXXXX_20040728_YYYYYY.EXE
>
> The only constant is the 'XXXXX' value.
> The date changes daily and the 'YYYYYY' value also changes daily.
>
> Both the 'X' and 'Y' values are numeric only and include zero's.
>

assuming the date in the middle uses leading zeros for month and day and
YYYYYY is, in fact, always 6 digits long

^xxxxx_[0-9]{8}_[0-9]{6}\.exe$

of course the xxxxx would be replaced with the value that is consistent. If
the date is not padded with leading zeros then {8} should become {6,8} and
if yyyyyy is not always 6 digests long replace {6} with {x,y} where x is the
shortest length value and y is the longest length value.

you could even use ^xxxxx_20[0-9]{2}[01]?[0-9][0-3]?[0-9]_[0-9]{6}\.exe$
which would require 20 two digits (yr through 2099), an option 0 or 1 for
the leading month digit, an optional 0,1, 2 or 3 for the leading day digit.
If you know the month and day are padded with leading zeros then change the
[01]? to [01] and the [0-3]? to [0-3] (so as to avoid something like
20042748 getting through)

Rick


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list