<div dir="ltr"><p style>I&#39;m guessing that you have</p><p style></p><p>ClamAV Full Message Scan = yes</p><div style>set in MailScanner.conf ... This will make MailScanner &quot;unpack&quot; the body of the email as a file in the directory presented to ClamAV for scanning (other AVs don&#39;t seem to need this &quot;help&quot;). The goal is to catch malware that isn&#39;t &quot;properly&quot; encoded, but rather just dumped in the message body.</div>
<div style>For non-english locales, especially greek and russian locales, this can be ... less than fortunate, since the &quot;body file&quot; will be present when the file command is run on the directory, and the file command has some very naive one byte magic detection &quot;strings&quot; that will interprete common greek (or russion KOI-8) characters as being the start of an MS-DOS executable (COM-files et al).</div>
<div style>When the message is quarantined, the &quot;whole message file&quot; (including headers) is stored in the quarantine (not the file containing just the body), so a simplistic &quot;file message&quot; command will not show the root cause. You need make a copy of that file and manually remove all the headers (and the blank line separating the headers from the body), then run file (and file -i) command on that to see the gory details:).</div>
<div style><br></div><div style>Provided one has the file -i column in filetypes.rules.conf (it is an optional fifth column, meaning that you likely don&#39;t have it and need add it yourself... The columns are &lt;TAB&gt; -separated!), you can use the file -i commands &quot;findings&quot; in that column, for the line that triggers the blocking.... Having lines with file -i &quot;syntax&quot; will make the file -i take precedence ... I think, at least.</div>
<div style>The common practice of changing the &quot;File Command = &quot; setting to the file -i command is perhaps less work, but it is also less secure, since the string matching on the result may be even less reliable than usual. Then again, file type checking is more of an art than a science:-):-).</div>
<div style><br></div><div style>As I&#39;m sure you&#39;ve noticed, this isn&#39;t a new problem, it has been with MailScanner for quite a few years (if not since the very begining). The methods for fixing the problem has varied over the years (editing the magic file, reporting it to the file command maintainers as a bug, using file -i straight up etc), but the interface Jules has provided is actually the very best imaginable, so do explore that... In a stock filetype.rules.conf file there is even an example for the DOS executables that file -i might find (hopefully a bit more securely than the plain file command... Though the commands are actually one and the same, the -i uses a different magic file, not just different descriptive strings).</div>
<div style><br></div><div style>Changing the ClamAV setting shown above to &quot;no&quot; will make this problem a lot less common (read: go away completely:-), as well, so that might be another very viable option... If you use more than one AV, you don&#39;t lose that much security by doing so.</div>
<div style><br></div><div style>Cheers!</div><div style>-- </div><div style>-- Glenn</div><p></p><div class="gmail_quote">Den 22 mar 2013 16:40 skrev &quot;Nikolaos Pavlidis&quot; &lt;<a href="mailto:Nikolaos.Pavlidis@beds.ac.uk" target="_blank">Nikolaos.Pavlidis@beds.ac.uk</a>&gt;:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello all,<br>
<br>
I&#39;m having an issue with Mailscanner which weirdly enough has been already discussed here<br>
<a href="http://markmail.org/message/56fofuvh4tzde7hz#query:+page:1+mid:mu77m5qs6zjhh2jx+state:results" target="_blank">http://markmail.org/message/56fofuvh4tzde7hz#query:+page:1+mid:mu77m5qs6zjhh2jx+state:results</a><br>


<br>
The problem is:<br>
<br>
Mar 22 15:00:18 smtp1 MailScanner[17935]: Filetype Checks: No executables (r2JAPluH011324 )<br>
Mar 22 15:00:46 smtp1 MailScanner[17935]: Saved entire message to /var/spool/MailScanner/quarantine/20130322/r2JAPluH011324<br>
<br>
And:<br>
<br>
[root@smtp1 r2JAPluH011324]# pwd<br>
/var/spool/MailScanner/quarantine/20130322/r2JAPluH011324<br>
[root@smtp1 r2JAPluH011324]# ll<br>
total 28K<br>
-rw------- 1 root root  22K Mar 22 15:00 dfr2JAPluH011324<br>
-rw------- 1 root root 3.7K Mar 22 15:00 qfr2JAPluH011324<br>
[root@smtp1 r2JAPluH011324]# file -i *<br>
dfr2JAPluH011324: text/plain; charset=us-ascii<br>
qfr2JAPluH011324: text/plain; charset=unknown<br>
<br>
But I have also added the lines suggested in the previous thread so my filetype.rules.conf looks like:<br>
<br>
&lt;snip&gt;<br>
allow   text            -                       -<br>
allow   -       text/plain      -                       -<br>
allow   -       text/x-mail     -                       -<br>
allow   -       message/rfc822  -                       -<br>
allow   \bscript        -                       -<br>
allow   archive         -                       -<br>
allow   postscript      -                       -<br>
deny    self-extract    No self-extracting archives     No self-extracting archives allowed<br>
deny    executable      No executables          No programs allowed<br>
&lt;snip&gt;<br>
<br>
I have restarted mailscanner before re-queuing the message but always the same result...<br>
<br>
Any ideas/recommendations would be much appreciated,<br>
<br>
Kind regards,<br>
<br>
Nik<br>
<br>
--<br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br>
Before posting, read <a href="http://wiki.mailscanner.info/posting" target="_blank">http://wiki.mailscanner.info/posting</a><br>
<br>
Support MailScanner development - buy the book off the website!<br>
</blockquote></div>
</div>