Antony.Stone at mailscanner.open.source.it
Thu Nov 12 10:26:53 GMT 2009
On Thursday 12 November 2009 09:59, Paul wrote:
> Ive been down this road before and thought I fixed it, however am
> getting some complaints from users again that chinese email is being
> blocked as the filetype rules are saying its a program.
> When I run just "file" on the message it returns its an executable,
> however "file -i" returns its text/plain
> [root at geneva nAB8qd2B008626]# file msg-23153-1986.txt
> msg-23153-1986.txt: COM executable for DOS
> [root at geneva nAB8qd2B008626]# file -i msg-23153-1986.txt
> msg-23153-1986.txt: text/plain; charset=iso-8859-1
Both of those would seem to be incorrect to me, since you say it isn't an
executable, but it can't possibly be ISO-8859-1 if it's in Chinese...
> I have added
> allow - text/plain - -
> To the top of my filetype.rules.conf - however the message is still
> being blocked with "No Programs Allowed"
Have you changed "File Command" in MailScanner.conf to include the -i option?
> Im running version 4.74.16.
> Any ideas?
"man file" suggests that one of the things the -i option does is tell file to
use a different source of magic data (/usr/share/file/magic.mime instead
of /usr/share/file/magic on my Debian system) - perhaps you could just rename
these files to achieve what you want without needing the -i option? The
files look to be compatible in format with each other.
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.
Please reply to the list;
please don't CC me.
More information about the MailScanner