Email with chinese writing saying No Program Allowed

Randal, Phil prandal at
Wed Aug 26 15:05:28 IST 2009

Your example will allow everything, not quite what you had in mind.


allow	-	text/plain	-	-




Phil Randal | Networks Engineer
Herefordshire Council | Deputy Chief Executive's Office | I.C.T.
Services Division
Thorn Office Centre, Rotherwas, Hereford, HR2 6JT
Tel: 01432 260160
email: prandal at

Any opinion expressed in this e-mail or any attached files are those of
the individual and not necessarily those of Herefordshire Council.

This e-mail and any attached files are confidential and intended solely
for the use of the addressee. This communication may contain material
protected by law from being passed on. If you are not the intended
recipient and have received this e-mail in error, you are advised that
any use, dissemination, forwarding, printing or copying of this e-mail
is strictly prohibited. If you have received this e-mail in error please
contact the sender immediately and destroy all copies of it.

-----Original Message-----
From: mailscanner-bounces at
[mailto:mailscanner-bounces at] On Behalf Of Paul
Sent: 26 August 2009 14:51
To: MailScanner discussion
Subject: Re: Email with chinese writing saying No Program Allowed

>> I have someone sending me an email with chinese writing in it.
>> The problem is mailscanner blocks it as it thinks its a program - No 
>> programs allowed (msg-10911-621.txt)
>> I ran the file command on the quarantined file and it does indeed 
>> think its an program
>> [root at venice n7OEIC6o017365]# file msg-10911-621.txt
>> msg-10911-621.txt: COM executable for DOS
>> But it just contains chinese characters.
>> This seems to be happening on quite a few emails with chinese writing

>> in them - has anyone seen this before? or got a solution to stop them

>> being blocked?
>> Kind Regards
>> Paul
> Not only chinese, but basically any language containing non-ascii 
> characters can fall afoul of these "opportunistic" magic codes. Either

> switch to using file -i, or edit/recompile your file commands magic 
> file... For more details, I suggest you do some mailing list 
> searches;-).
> Cheers
Hi Glenn

Thanks for your response, I did some searches and saw mention of adding
a fifth field in filetype.rules.conf

The output of "file -i" on the message in question is

[root at venice n7OEIC6o017365]# file -i msg-10911-621.txt
msg-10911-621.txt: text/plain; charset=iso-8859-1

So I added

allow   -   -   -   text/plain  

to filetype.rules.conf and it seems to have solved my problem.

Thanks for your help


MailScanner mailing list
mailscanner at

Before posting, read

Support MailScanner development - buy the book off the website! 

More information about the MailScanner mailing list