Blocking WMV files in filetype.rules.conf

Mariano Absatz mailscanner at LISTS.COM.AR
Mon Sep 22 16:24:53 IST 2003


You should use filenames.rules.conf rather than filetypes.rules.conf.

As was discussed on the list at the time that Julian implemented it, the 
filetypes.rules.conf is matched against the output of a "file" command (see 
"man file").

However, "file" does not recognize every possible format (though you can 
teach it by editing the "magic" file accordingly -see "man 4 magic").

FYI, in a RedHat 6.1 distro I get:
# file *.wmv
somefile.wmv: data

and in a RedHat 7.3:
# file *.wmv
somefile.wmv: Microsoft ASF

If your "magic" file supports it, see the output of it, to put it in 
filetypes.rules.conf, otherwise, put something like this in 
filenames.rules.conf:
deny    \.wmv$  Windows Media Video     We don't allow MS media videos!

(the long spaces MUST be ONE TAB each)

El 22 Sep 2003 a las 10:37, Norman Schmidt Jr escribió:

> How can I block .WMV files in the filetypes.rules.conf file?
> I tried with "WMV", "x-msvideo" and "msvideo" as the regular expression
> in a new entry, but the .WMVs still getting thru... Isnt the regular
> expression evaluated against the mime type of the file?
> Any tips?
> Regards
> Norman


--
Mariano Absatz
El Baby
----------------------------------------------------------
Real programmers use: cat > a.out




More information about the MailScanner mailing list