.o. / \ Server: marzen.de | | Datum: 12.10.2024 | | Zeit: 04:41:37 /_______\ `o [Startseite] [Holger] [fixqp] ------------------------------------------------------------------------------ Fixing broken QP-encodings in mail headers Holger Marzen2011-01-09 Some old email clients (e.g. Apple Mail 2.753.1) and some web applications send e-mails with headers containing spaces in Quoted Printable encoded sections. This is a violation of RFC 2047: RFC 2047: IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's by an RFC 822 parser. As a consequence, unencoded white space characters (such as SPACE and HTAB) are FORBIDDEN within an 'encoded-word'. For example, the character sequence =?iso-8859-1?q?this is some text?= would be parsed as four 'atom's, rather than as a single 'atom' (by an RFC 822 parser) or 'encoded-word' (by a parser which understands 'encoded-words'). The correct way to encode the string "this is some text" is to encode the SPACE characters as well, e.g. =?iso-8859-1?q?this=20is=20some=20text?= The characters which may appear in 'encoded-text' are further restricted by the rules in section 5. Such e-mails can be fixed with procmail and a Perl script. ------------------------------------------------------------------------------ [Startseite] [Holger] [fixqp]