Attachment stripping - wrong postfix message size

Glenn Steen glenn.steen at
Fri Mar 26 11:36:37 GMT 2010

On 25 March 2010 10:29, Markus Nilsson <markus at> wrote:
> Hi again,
> Thanks for your input!, and yes I am running it now on a testbed, and
> it works very well. The size that I change to is not correct, but close
> enough for the receiver to not reject it.
Hm. That needs to be fixed then... Can't have half-measures:-).
I would think that many do it as I, that is: see to it that the "first
hurdle" is the tightest squeeze (to mix metaphores:-). So that might
explain why such a discrepancy would go undetected for ... quite a
long while:-).

> The code under test looks like this (tiny changes)
>      foreach (@{$message->{metadata}}) {
>        /^(.)(.*)$/;
>        ($type, $data) = ($1, $2);
>        $TimestampFound++ if $type eq 'T'; # Must only ever have 1 timestamp
>        #print STDERR "PreData1 Type $type Data $data\n";
>>       if($type eq 'C' and $message->{rewriteCHeader} eq 'y')
>>       {
>>         if ($data =~ m/(\D+)\d+(\D+\d+\D+\d+\D+\d+\D+)\d+/)
>>         {
>>             $data = "" . $1 . $message->{size} . $2 . $message->{size};
>>         }
>>       }
> I added the rewriteCHeader-flag, just as a precaution if there is something wrong
> with my code, I will only affect messages that I removed attachments from.
Ok. Might make sense where you're at, perhaps not if we make a more
... correct... change:-).
I still can't promise you any time, and would really love ofr someone
else to take a look (preferably Jules)... But I will try make the
time, if noone else steps up. Don't hold your breath though;-).

> What are the chances on getting something like this into SVN? :)

Jules usually accept clean context-diff patches, or well laid
arguments for how something should be done... It's his prerogative to
choose to include/decline anything though.

> Good luck with the move! And hope Stockholm is as sunny as Gothenburg today :)
Well need all the luck we can get. In a "pre-move move", kind of like
a 15-puzzle manouver to free up some equipment, we lost our SecurID
server earlier this week to the infamous "stiktion problem"... and a
combo with bad replicas... Sigh. Whatever more will go off to the
bitbucket in the sky/netherworld? Oh well. The weather is at least
acceptable (no rain/snow, some glimpses of sun and about 2 degrees

> BR
> /Markus
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se

More information about the MailScanner mailing list