[Mimedefang] only permit "good" extension
Jason Englander
jason at englanders.cc
Thu Apr 3 11:43:00 EST 2003
On Thu, 3 Apr 2003, Ueli Kessler wrote:
> can you please provide a piece of perl code, which
> will do that in mimedefang-filter??
>
> thank you very much.
I haven't tried it myself, but you could probably just take
filter_bad_filename() from the sample filter, duplicate it, and replace
every occurance of "bad" with "good". (and of course set $good_exts to
the extensions you want to allow)
Then in filter():
if (! filter_good_filename($entity)) {
# Drop it, quarantine it, ...
}
Jason
--
Jason Englander <jason at englanders.cc>
394F 7E02 C105 7268 777A 3F5A 0AC0 C618 0675 80CA
More information about the MIMEDefang
mailing list