[ic] [interchange-core] Encoding of mail headers
Mike Heins
mike at perusion.com
Wed Mar 4 16:51:22 UTC 2009
Quoting David Christensen (david at endpoint.com):
>
> 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.
Not at all true. If you don't rely on runtime requires, there is no problem.
> ("main" not
> necessarily being "main::" where Safe is concerned.)
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.328.4479 <mike at perusion.com>
"Laughter is inner jogging." -- Norman Cousins
More information about the interchange-users
mailing list