Re: urgend file type detection
Tom Kistner <[email protected]> Tue, 19 Oct 2004 11:34:45 +0200
| Newsgroups | gmane.mail.exim.exiscan.user |
|---|---|
| Message-ID | <[email protected]> |
Steffen Heil wrote: > I want to allow only mail through my sarge exim 4.34 heavy daemon server > with clamav that have > - NO attachments > - ONLY rtf, doc, pdf, txt, xls attachments Everything else should be > blocked. Use the MIME ACL. > However, I do not want to determine this by extension, but by content. > rfc, doc, pdf als xls should be detectable, as they have special file > structures. txt will propably more complicated. Matching content-type headers is useless with MS software. You can apply clever mime_regex checks to determine the real file content. With .txt, check if the file does not contain binary zeroes. Not 100% secure but should catch most of possible fakes. /tom