Filetypes in email attachments.

justin.vanwinkle at gmail.com justin.vanwinkle at gmail.com
Thu Aug 25 18:05:16 CEST 2005


Hello everyone,

I'm writing a simple spam filter as a project, partly to learn python.
I want to filter by filetype, however, the mime content type I get
using .get_content_type gives limited and possibly bogus information,
especially when trying to detect viruses or spam.

I would like to use the magic file to detect the filetype, if this is
possible.  I have the attachement stored and (generally) decoded in a
variable.

Justin




More information about the Python-list mailing list