| 1 |
Why does Cyrus reject 8-bit characters in the headers of my messages? |
| 2 |
--------------------------------------------------------------------- |
| 3 |
|
| 4 |
8-bit characters are not allowed in the headers of an :rfc:`822` |
| 5 |
message. |
| 6 |
|
| 7 |
## Until release 3.0 |
| 8 |
We're not about to consider a patch to "fix" the problem of replacing |
| 9 |
8-bit characters with 'X's that doesn't at least supply a default |
| 10 |
character set and properly QP-encode the nonconforming header. |
| 11 |
|
| 12 |
Another possibility is suggested by Chris Newman:: |
| 13 |
|
| 14 |
The correct long term thing to do is to interpret unlabelled 8-bit as |
| 15 |
UTF-8 if it meets the UTF-8 syntax, and otherwise give it the "unknown" |
| 16 |
charset label and downconvert to 7-bit using RFC 2047. |
| 17 |
|
| 18 |
If you want to do |
| 19 |
something really fancy, you might allow a mapping from the hostname in |
| 20 |
the envelope from address to a default 8-bit charset (Innosoft's MTA |
| 21 |
includes an equivalent facility) so the administrator can set up private |
| 22 |
agreements with specific hosts. |
| 23 |
|
| 24 |
## Release 3.0 and later |
| 25 |
All the rationale for pre-3.0 8-bit character support still applies. |
| 26 |
|
| 27 |
However, Cyrus now optionally *does* accept 8-bit characters in MIME header values |
| 28 |
for internal processing, if they are valid UTF-8. For example, this allows Cyrus |
| 29 |
to index 8-bit message header values for search or emit them on the JMAP or RSS |
| 30 |
interfaces. |
| 31 |
|
| 32 |
Please note that the original message header values are left as-is. That is, |
| 33 |
Cyrus does not attempt to repair improperly encoded headers. |
| 34 |
|
| 35 |
To enable this feature one must enable the `rfc2047_utf8` config option. This |
| 36 |
causes Cyrus to interpret any high-bit character as UTF-8. Invalid UTF8 |
| 37 |
characters are internally processed with the UTF-8 replacement character. |