[Dovecot] When the subject portion of an e-mail contains a control character, dovecot.sieve terminates unexpectatedly.

Timo Sirainen tss at iki.fi
Mon May 5 12:24:44 UTC 2014


On 2.5.2014, at 11.27, Atsuko Tanaka <tanaka at designet.co.jp> wrote:

> We have currently set dovecot.sieve to insert the text "[SPAM]" at the
> beginning of an e-mail's subject when it's X-Spam-Score is above 80%.
> After we set our system as stated the following errors occur:
> 
> 1) When an e-mail's subject contains control characters like
> [Ctrl+V|^V], dovecot.sieve terminates with an error and an e-mail is not
> able to be sent. When a MIME encoded Subject like [TEST^VMAIL] is sent
> we're not able to edit the subject and dovecot ends with an error.
..
> Aside from [Ctrl + V] the following control charcters also cause errors:
> backspace
> Ctrl + A
> Ctrl + C
> Ctrl + [
> Ctrl + X
> Ctrl + Y
> 
> 2) When an e-mail's subject line contains a "\0" character, everything
> following the null character is deleted.

Is there a reason why mails contain these kind of control characters? Is it commonly used? And is it OK if Dovecot translates them to UTF-8 for the rewritten header, or would the subject have to stay ISO-2022-JP encoded?



More information about the dovecot mailing list