Allow Multiple HTML Signatures, not working?
Glenn Steen
glenn.steen at gmail.com
Fri Mar 18 21:27:21 GMT 2011
On 18 March 2011 15:56, Markus Nilsson <markus at markusoft.se> wrote:
>> 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
>
>
Without commenting on the merit of your patch (I'm a tad too tipsy to
do that:-), I know that unlesss you start doing proper context diffs,
noone (most prominently Jules) will look at them;).
Cheers
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
More information about the MailScanner
mailing list