8-bit characters in headers

Henrique de Moraes Holschuh hmh at debian.org
Thu Apr 28 11:33:18 EDT 2005

On Thu, 28 Apr 2005, Igor Belikov wrote:
>   After all I make patch, that adds option "ignore8bit" into
>   imapd.conf. If this option set to "true" - Cyrus don't pay attention
>   to 8-bit characters in headers at all, and our customers receive
>   readable from, to and subject fields. If this option set to false or
>   omitted - Cyrus do as before (as without this patch) and make its
>   job directed by "reject8bit" option.
>   So I want to know to whom I must send that patch to see it in next
>   release of Cyrus.

To the bitbucket, it will not be accepted.

What you *have* to do to get such a thing accepted is to, instead, write
something that *fixes* the headers with the following capabilities:

1. Notion of a default source charset, which is a hint of the charset to
   encode *from* (because the input data does not have that information)
2. Either a configurable destination charset, or use UTF-8 (I would much
   rather you went the full way and made it configurable, I believe at
   least the CJK people would appreciate that a lot).
3. Functionality:
   3.1:  Detect illegal 8-bit in headers, and apply the correction
         algorithm described below (configurable)
   3.2:  Pass-through any non-8bit headers.
   3.3:  Reject messages with 8-bit headers.

Algo for charset conversion:

Step 1:  Look for certain hints of charsets, to try do determine the
  correct source charset: UTF signatures, ISO-2022 escape sequences, etc.

Step 2:  If not found, use the default source charset.

Step 3:  Verify if the input sequence is *100% valid and correct* in the
  choosen/detected charset.  If it is not, reject the message.

Step 4:  Convert to the destination charset (option: detected
  charset, configured destination charset), and RFC-2047 encode the

This needs to be done *before* any sieve processing, etc.

So far, nobody that keeps complaining about the "X" things has taken the
time to do the above.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

More information about the Info-cyrus mailing list