* Don Walker [2005-02-22 11:00]:
> >> I can't figure out how to check attached file extensions
> >>using a MIME ACL. What am I missing? Thanks.
> >
[...]
> >Here's exim.conf stuff:
> >
> ># main
> >BLACKLIST_FILES = /etc/exim/blacklist_files
> >FILENAME_EXT = ${sg{$mime_filename}{^.+\\.([a-z0-9]+)\$}{\$1}}
> >
[...]
>
> A follow-up: I think your scheme would not catch upper-case file
> extensions. At least it didn't in my testing. So I changed your
> FILENAME_EXT definition to:
>
> FILENAME_EXT = ${lc:${sg{$mime_filename}{^.+\\.([a-zA-Z0-9]+)\$}{\$1}}}
Then it's better to use
FILENAME_EXT = ${sg{${lc:$mime_filename}}{^.+\\.([a-z0-9]+)\$}{\$1}}
Lowercase $mime_filename and don't care about A-Z in the extension. :-)
> The file still contains only lower-case extensions to be blocked.
That's not a problem as you're lowercasing the extension before the
lookup is done.
--
-- Kirill Miazine <km@???>