Problems with file detecting non-ASCII characters
Andreas Kasenides
Andreas.Kasenides at cs.ucy.ac.cy
Wed Nov 21 10:42:30 EET 2007
Hi all.
I am using MailScanner as part of our email services which uses "file"
to detect (and thus reject) any potnetnially malicious file attachments
to email messages (such as .exe .com etc.). Unfortunately "file" will
also mark some purely text messages as "COM executable for DOS"
resulting in MailScanner rejecting the messages. This is not good at all.
Here is some info:
[root at iolaos-new src]# uname -a
Linux iolaos-new 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:28 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
which is a CentOS 5 system.
With the installed file command:
[root at iolaos-new src]# file -v
file-4.17
magic file from /usr/share/file/magic
[root at iolaos-new src]# file
/var/spool/MailScanner/quarantine/20071106/4EBAA26C61.636E7/msg-15753-12.txt
/var/spool/MailScanner/quarantine/20071106/4EBAA26C61.636E7/msg-15753-12.txt:
COM executable for DOS
With a compiled "file":
[root at iolaos-new src]# ./file -v
lt-file-4.21
magic file from /usr/local/share/file/magic
[root at iolaos-new src]# ./file -m ../magic/magic
/var/spool/MailScanner/quarantine/20071106/4EBAA26C61.636E7/msg-15753-12.txt
/var/spool/MailScanner/quarantine/20071106/4EBAA26C61.636E7/msg-15753-12.txt:
COM executable for DOS
And a 256-byte file dump (below and above the ======:
[root at iolaos-new src]# head -c 256
/var/spool/MailScanner/quarantine/20071106/4EBAA26C61.636E7/msg-15753-12.txt
=========
Έμπλεξα εγώ;
Αλλά πέμου τζίνος που εν μές τη μέση πάντα την τρώει..
Τέλος πάντον εδεήσαν να στείλουν τα έντυπα στο Συμβούλιο.
-----Original Message-----
From: Andreas Kasenides [mailto:Andreas.Kasenides at cs.ucy.ac.cy]
==========
The above is pure text but alas! the unreadable part (for you) in Greek
(ISO-8859-7).
Any idea on how to get this fixed.
Thank you
Andreas Kasenides
More information about the File
mailing list