[ic] [interchange-core] Encoding of mail headers

David Christensen david at endpoint.com
Wed Mar 4 16:47:28 UTC 2009


On Mar 4, 2009, at 10:27 AM, Mike Heins wrote:

> Quoting David Christensen (david at endpoint.com):
>>
>> On Mar 4, 2009, at 9:27 AM, Stefan Hornburg wrote:
>>
>>> David Christensen wrote:
>>>> On Mar 4, 2009, at 2:52 AM, Stefan Hornburg (Racke) wrote:
>>>>
>>>>> According to RFC 2047 mail headers with characters other than US-
>>>>> ASCII needs
>>>>> to be escaped. Interchange fails to do so, resulting in emails
>>>>> delivered
>>>>> which will be tagged by Spamassassin with SUBJECT_NEEDS_ENCODING  
>>>>> and
>>>>> SUBJ_ILLEGAL_CHARS.
>>>>>
>>>>> I wrote a simple filter which addresses this problem:
>>>>>
>>>>> CodeDef mime_encode_words Filter
>>>>> CodeDef mime_encode_words Description Find MIME type of filename
>>>>> CodeDef mime_encode_words Routine <<EOR
>>>>>
>>>>> use MIME::EncWords;
>>>>>
>>>>> sub {
>>>>> 	return MIME::EncWords::encode_mimewords(shift);
>>>>> }
>>>>> EOR
>>>>>
>>>>> Of course the whole IC email infrastructure needs to be adjusted  
>>>>> to
>>>>> use
>>>>> this.
>>>>
>>>> The Encode module also offers this capability, and has the  
>>>> benefit of
>>>> being core.  While we're doing this, we should revisit the body
>>>> encoding as well.  I definitely agree that this should be done.
>>>>
>>>
>>> How would this work with Encode?
>>>
>>> Regards
>>> 	Racke
>>
>>
>> use Encode qw(encode);
>>
>> sub mime_encode_header {
>>     return encode('MIME-Header',shift);
>> }
>>
>
> Why would we prefer the Encode module, which has known problems
> with Safe?

This will need to be resolved, but any module which does not import  
into the main namespace will have the same issues.  ("main" not  
necessarily being "main::" where Safe is concerned.)

Regards,

David
--
David Christensen
End Point Corporation
david at endpoint.com
212-929-6923
http://www.endpoint.com/






More information about the interchange-users mailing list