Postfix Message Size Wrong

Scott Silva ssilva at sgvwater.com
Mon Oct 17 20:02:12 IST 2011


on 10/17/2011 9:18 AM --[ UxBoD ]-- spake the following:
>> From what I can see it is a trivial fix. In PFDiskStore.pm around line 359 it has:
>
>    printf $Tf "%15ld %15ld %15ld", $HeaderLength, $HeaderStartPos, $recipcounter;
>    printf $Tf " %15ld", $message->{PostfixQmgrOpts}
>      if $message->{PostfixQmgrOpts} ne "";
>    seek $Tf, 0, 0;
>
> I believe this needs to become:
>
>    printf $Tf "%15ld %15ld %15ld", $HeaderLength, $HeaderStartPos, $recipcounter;
>    printf $Tf " %15ld", $message->{PostfixQmgrOpts}
>      if $message->{PostfixQmgrOpts} ne "";
>    printf $Tf " %15ld", $HeaderLength;
>    seek $Tf, 0, 0;
>
> This then sets the actual content length in field 5 of the queue file. I am not sure why the line above is there though as Postfix.pm always appears to set PostfixQmgrOpts to at least zero:
>
>      if (defined $numbers[3]) {
>        $MailScanner::Postfix::DataStructure = 1;
>        $message->{PostfixQmgrOpts} = $numbers[3]+0;
>      }
>
> I have tested this and it appears to work fine. Thoughts Jules or anybody else ?
I haven't seen a post from Julian in quite a while... I sure hope he is just 
busy...





More information about the MailScanner mailing list