<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hello all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Many thanks Glenn for the very detailed explanation! I have made the changes and I am holding my breath to see what happens.. after all.. I cannot test it with
 the email that is in the quarantine.. it is already buggered! Many thanks for all your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Final question:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Is disabling that option going to affect the
<a href="http://www.inetmsg.com/pub/">http://www.inetmsg.com/pub/</a> unofficial signature databases I am using with ClamAV?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks again.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Nik<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> mailscanner-bounces@lists.mailscanner.info [mailto:mailscanner-bounces@lists.mailscanner.info]
<b>On Behalf Of </b>Glenn Steen<br>
<b>Sent:</b> 05 April 2013 10:11<br>
<b>To:</b> MailScanner discussion<br>
<b>Subject:</b> Re: Filetype Checks: No executables on Greek Emails<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">BTW, when stripping down the body, you may need &quot;de-MIME&quot; a bit as well, to get the actual thing that file sees... Can be a bit tricky:-).<o:p></o:p></p>
<div>
<p class="MsoNormal">IIRC there is a common greek greeting phrase that will start with a character that is guaranteed to be interpreted as a DOS executable... so you might not need go through the trouble of the copy/edit thing, just put that greeting in a (text)
 file and run file/file -i on that... or just cut'n'paste from your MUA, or similar.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I mentioned russion and greek specifically, but this has been reported for other non-english languages as well (french and some south east asian language, at least... for french the culprit was an É or Ë or similar).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">--&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Glenn<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On 5 April 2013 10:54, Glenn Steen &lt;<a href="mailto:glenn.steen@gmail.com" target="_blank">glenn.steen@gmail.com</a>&gt; wrote:<o:p></o:p></p>
<div>
<p>I'm guessing that you have<o:p></o:p></p>
<p>ClamAV Full Message Scan = yes<o:p></o:p></p>
<div>
<p class="MsoNormal">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't seem to need this &quot;help&quot;). The goal is to catch malware that isn't &quot;properly&quot;
 encoded, but rather just dumped in the message body.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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:).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Provided one has the file -i column in filetypes.rules.conf (it is an optional fifth column, meaning that you likely don'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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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:-):-).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">As I'm sure you've noticed, this isn'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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">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't lose that much security
 by doing so.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">--&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">-- Glenn<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="hoenzb"><span style="color:#888888">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;:</span></span><o:p></o:p></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hello all,<br>
<br>
I'm having an issue with Mailscanner which weirdly enough has been already discussed here<br>
<a href="http://markmail.org/message/56fofuvh4tzde7hz#query:&#43;page:1&#43;mid:mu77m5qs6zjhh2jx&#43;state:results" target="_blank">http://markmail.org/message/56fofuvh4tzde7hz#query:&#43;page:1&#43;mid:mu77m5qs6zjhh2jx&#43;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 &nbsp;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 &nbsp; text &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; - &nbsp; &nbsp; &nbsp; text/plain &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; - &nbsp; &nbsp; &nbsp; text/x-mail &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; - &nbsp; &nbsp; &nbsp; message/rfc822 &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; \bscript &nbsp; &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; archive &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
allow &nbsp; postscript &nbsp; &nbsp; &nbsp;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br>
deny &nbsp; &nbsp;self-extract &nbsp; &nbsp;No self-extracting archives &nbsp; &nbsp; No self-extracting archives allowed<br>
deny &nbsp; &nbsp;executable &nbsp; &nbsp; &nbsp;No executables &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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!<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">-- <br>
-- Glenn<br>
email: glenn &lt; dot &gt; steen &lt; at &gt; gmail &lt; dot &gt; com<br>
work: glenn &lt; dot &gt; steen &lt; at &gt; ap1 &lt; dot &gt; se <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>