catching files with a different filename ending than they should have.

Julian Field mailscanner at
Thu Apr 24 14:16:22 IST 2003

This really needs to become part of a generic content filter system I was
thinking about writing. An external program would be called. It would be
passed MIME information about each attachment, and the filename where that
attachment is stored. At that point the external program can do what it
likes with the file. Quite how it might replace MIME information is another
matter, I haven't got that sorted yet.

Then all I need is some time to write it :-)

One of my demo applications for this was an English --> Geordie translator
for text messages. But you may also want to throw away attachments whose
content doesn't match their filename, remove all content from images with
lots of skin tones in them, all sorts of stuff.

I need to make it general enough that it will do what 99% of people want to
do without making it impossible to write (or use). Perhaps the filter
doesn't need the ability to replace MIME information at all, just the
actual content?

At 13:47 24/04/2003, you wrote:
>Julian can you add a function to check the file with the program
>"/usr/bin/file". then mailscanner
>can detect the right type of the programm and block or allow the file.
>David wrote:
>>Hash: RIPEMD160
>>I was wondeirng if this is a job for a custom function.
>>Is there a way to somehow check a file's mimetype (or file output)
>>rather than rely on the extension to allow or reject it. Some people
>>tend to send myMP3File.doc which is in reality an mp3 file.
>>Any pointers how to solve this?
>>Thank you
>>- -d
>>Version: GnuPG v1.2.1 (Darwin)

Julian Field
MailScanner thanks transtec Computers for their support

More information about the MailScanner mailing list