Hi there
I am working on a system-wide blacklist for exim, and I looked Nigel
Metheringham stuf for rejecting specific extentions [1].
I changed a little bit the regexp for a more generic match.
I use this regexp:
$message_body matches
"(?:Content-(?:Type:\\\\s*[\\\\w-]+/[\\\\w-]+|Disposition:\\\\s*attachment);\\\\s*(?:file)?name=|begin\\\\s+[0-7]{3,4}\\\\s+)\"?([^\"]+)\\\\.([^\"]+)\"?[\\\\s;]?"
$1 contains the filename, and $2 its extension.
I would like to get a file that contains rejected filename paterns
such as:
*.exe
poisoned.*.zip
virus.*
The problem is how can I test the file name match against each file patern?
If the matched filename is "test.exe" I want it to be drop, but if it
is good.zip I want it to be kept.
I tested some stuffs using partial- search but as explained, it only
works with dot-separated items, and does not support regexp lookup.
is there something like regexp- lookups that matches a string against
a regexp stored into a file / dbm or sql table?
TIA
[1] -
ftp://ftp.exim.org/pub/filter/system_filter.exim
--
Sebastien J. Gross