Issue with parsing of forwarded messages with attachments and quotes in the subject
Timo Sirainen
tss at iki.fi
Tue May 2 12:13:08 EEST 2017
On 2 May 2017, at 11.21, Giovanni Salvatore Fois <giovannisalvatore.fois at eng.it> wrote:
>
> Hi all,
> at work we use Roundcube acting as a mail client for the Dovecot Imap server.
>
> In Roundube the messages are parsed through the Imap BODYSTRUCTURE command
> If a message contains forwarded messages and attachments and some of the messages contains
> a quote (") in the subject, then the resulting BODYSTRUCTURE appears to be malformed.
> ---
> After some digging through the code of Dovecot, it seems to me that the problem is related to the function: imap_append_string_for_humans
> defined at the line 120 of the file src/lib-imap/imap-quote.c (dovecot sources v. 2.2.29)
>
> Said function is supposed to return a quoted version of the input string while removing unwanted
> characters from the input data.
>
> But, if I call it with a string containing quotes as argument (eg: I am a lazy " programmer) in
> the resulting output the quotes aren't escaped and the output string is not quoted.
It's then written as a literal, so it actually looks correct to me.
More information about the dovecot
mailing list