Jacek Wieczorek wrote:
> Hi,
> 
> I'm writing cause we think we have found some kind of issue.
> 
> When we recieved email from one of the biggest Polish email company 
> (www.onet.pl 
> ), we have noticed, that ezMail have problems with recogniting  
> headers, here is example:
> 
> (raw header)
> 
> Received: from 88.199.50.179 by 192.168.240.158 with HTTP; Fri, 16 Nov  
> 2007 10:27:54 +0100Date: Fri, 16 Nov 2007 10:27:55 +0100From: [EMAIL 
> PROTECTED] 
> : [EMAIL PROTECTED]
> Subject: test from onet
> 
> (some headers are concatenated)
> 
> We have found that onet.pl replaced space after colon in header's  
> field with tab, ie. From:\x20 was replaced with From:\x09
> 
> When we changed regular expressions in files:
> - ezcMailDeliveryStatusParser (line 77)
> - ezcMailPartParser (line 175)
> - ezcMailStorageSet (line 150)
> 
> from:
> 
> preg_match_all( "/^([\w-_]*): (.*)/", $line, $matches, PREG_SET_ORDER )
> 
> to:
> 
> preg_match_all( "/^([\w-_]*):[ \t](.*)/", $line, $matches,  
> PREG_SET_ORDER ),
> 
> all headers have been recognized well.
> 
> It's possible that onet.pl generate non-standard headers, but maybe  
> onet.pl is not the only one.

Hi Jacek,

Thanks for submitting this problem and a solution for it. Indeed it is 
possible that some mails which are created without following the 
standards are unable to be parsed by ezcMail.

There was another problem recently that some mails cannot be parsed 
because they don't have a space between the colon and the header value 
(eg. Subject:test).

Most probably this will make it in the next release of Mail, if the fix 
does not affect the present functionality.

Cheers,
Alex.

-- 
Alexandru Stanoi
eZ Components System Developer
eZ Systems | http://ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to