filtering file types vs. extensions

Julian Field mailscanner at
Mon Jun 23 10:26:38 IST 2003

At 23:21 22/06/2003, you wrote:
>On Fri, 2003-06-06 at 14:16, Julian Field wrote:
> > Not a good start.
> > The latest File::MMagic module does not understand Linux /usr/share/magic
> > files. It complains a lot about them, which makes it useless.
> > So I will have to use the "file" command, with a timeout and all that c**p
> > to stop DoS attacks on the file command.
> >
> > Does everyone's "file" command output the filename followed by a ":"
> > followed by 1 or more spaces followed by the file type?
>Just wondered how this ended up going.  Did it prove more trouble than
>it's worth?

I haven't done much more on this. I need to play around with the file
command on a bunch of different OS's to see if the output format is vaguely
consistent. If so, then it is possible and I'll take another look at this.
Bear in mind that it will take noticeable CPU to do it, as it involves a
"file" command for each batch of messages. Cheap compared to spam detection
Julian Field
Professional Support Services at
MailScanner thanks transtec Computers for their support

More information about the MailScanner mailing list