Duplicate headers, Exim WriteHeader using Sendmail::CreateQf

Julian Field MailScanner at ecs.soton.ac.uk
Mon Sep 21 12:14:52 IST 2009


Fixed.

I have added a "quotemeta" round the string I'm comparing with lc $key 
in the header comparison loop, as you suggested.

Cheers!
Jules.

On 09/09/2009 17:33, Chris Audley wrote:
>    
>> The key is that there is no "Exim::CreateQf" at all, all the MTAs are
>> called "Sendmail" internally (as that's the first one I implemented).
>>      
> [snip]
>
> Thanks for the explanation, shows how poor my perl knowledge is! :)
>
> This is what is getting written to the queue if the subject has a trailing
> space:
>
> 023T To: chris at navaho.co.uk
> 015  Subject: test
> 018  MIME-Version: 1.0
> 092  X-navaho-Colo-Information: Please contact support at navaho.co.uk for
> more information
> 050  X-navaho-MailScanner-ID: 1MlPZ9-0007TR-C8
> 041  X-navaho-Colo: Found to be clean
> 140  X-navaho-Colo-SpamCheck: not spam, SpamAssassin (score=-2.18,
> required 1,
>          ALL_TRUSTED -1.80, BAYES_00 -2.60, TVD_SPACE_RATIO 2.22)
> 042  X-navaho-colo-From: root at mx3.colo
> 023  Subject: test
> 026  X-Spam-Status: No
>
> There should be a * after 015 on the first Subject header to ask exim to
> delete the header.
>
> The problem appears to be this line in DeleteHeader in Exim.pm:
>
>    $key = quotemeta($key) unless $usingregexp;
>
> This is escaping the colon on the end of header and preventing it from
> being matched in the header comparison loop and being marked for deletion.
> Commenting out the quotemeta makes MailScanner generate the correct exim
> spool file.
>
> I guess doing quotemeta on the headers in the header comparison loop is
> probably the best fix?
>
> Regards,
>    

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list