[Kolab-devel] [issue1245] Mailheader rewriting problems on folded Header "From:"-line

Torsten Irländer kolab-issues at intevation.de
Wed May 17 16:02:38 CEST 2006

New submission from Torsten Irländer <torsten.irlaender at intevation.de>:

kolab 2.0.3 without patches applied.                   
kolbafilter.php seems to have some problems on folded "From:" headerline.                             
If this line is folded e.g:                             
From: =?ISO-8859-1?Q?=22K=F6hler=2C_Manfred=22?=                            
<manfred at test.hq>                            
For me following line is problematic:                         
else if( !$headers_done && !$from && eregi( '^From: (.*)', $line, $regs ) ) {                         
    $from = $regs[1];                         
If you put in a folded "From:" here you match only the realname and not the                        
emailaddress which is on the second line. So $from will contain no valid                       
mailaddress which is used for later untrusted-checks[0].                       
So in result some mails are rewritten altough they should not.    
In addition they are badly rewritten so that you can't reply on them in some    
You can easily reproduce them by sending mails per telnet which will be                   
rewritten. Please follow instruction described below (where test.hq is the          
Connected to neso.hq.              
Escape character is '^]'.              
220 neso.test.hq ESMTP Postfix              
helo baddomain.bad              
250 neso.test.hq              
mail from: badman at baddomain.bad              
250 Ok              
rcpt to: torsten at test.hq              
250 Ok              
354 End data with <CR><LF>.<CR><LF>              
From: =?ISO-8859-1?Q?=22K=F6hler=2C_Manfred=22?=              
<manfred.koehler at test.hq>             
Subject: Hi here is Manfred             
This will produce a mail which can not be replied. Same happens with "From:"          
where the email address is completely missing (no second line).    
[0] this is triggered because "is_my_domain" seems to returns true.

assignedto: steffen
messages: 7424
nosy: bernhard, steffen, torsten
priority: bug
status: unread
title: Mailheader rewriting problems on folded Header "From:"-line
topic: server
Kolab issue tracker <kolab-issues at intevation.de>

More information about the devel mailing list