Allow Multiple HTML Signatures, not working?

Markus Nilsson markus at markusoft.se
Fri Mar 18 14:56:08 GMT 2011


> Hi!
> 
> I am having problems with
> 
> Allow Multiple HTML Signatures = no
> 
> I always get multiple image signatures in my mails Looks like the same
> problems as
> 
> http://article.gmane.org/gmane.mail.virus.mailscanner/73770/match=multiple+inline+html+signatures
> 
> 
> Is anyone successfully using this feature?
> 
> 
> I tried to do some debugging of this, and found that the signature
> image is successfully detected by the
> 
> sub DisarmTagCallback {
> 
> function, but the variable SigImageFound is still 0 in
> 
> sub DisarmHTML {
> 
> I made log prints in these two locations, and see that they are done
> in different threads, and that value seems not to be passed between
> them. Could this be a bug? (Notice the different pids in the log
> below)
> 
> 30574:Mar 18 09:34:23 xxx MailScanner[23120]: SigImage: 1 <-- From
> DisarmTagCallback
> 30579:Mar 18 09:34:23 xxx MailScanner[23093]: sigimagepresent: 0 <--
> From DisarmHTML
> 
> 
> BR/
> 
> Markus
> 
> 

Hi,

I'm not sure if I am alone with this problem, but I worked a bit with this on my end, and have come up with a patch to get it to work.

The problem as I see it, is that the HTML parser runs in one thread, and does not tell the main thread about the signature finding. This patch below adds information about the found signature to the pipe from the parser, and sets the global variable in the main thread.

6796a6797,6798
>     #Add SignatureImageIsFound Magic text if the sig is found
>     print $pipe "SignatureImageIsFound\n" if ($SigImageFound == 1);
6815c6817,6818
<       push @DisarmDoneSomething, $pipedata;
---
>       $SigImageFound = 1 if($pipedata eq "SignatureImageIsFound");
>       push @DisarmDoneSomething, $pipedata unless ($pipedata eq "SignatureImageIsFound");


The patch is against 
#   $Id: Message.pm 4986 2010-01-18 14:52:38Z sysjkf


This feature would actually be very useful to make replied messages not grow in size!

Thanks
/Markus

 
 
--
This message has been scanned for viruses and dangerous content by CronLab
(www.cronlab.com), and is believed to be clean.



More information about the MailScanner mailing list