[Dovecot] ENVELOPE mishandling of Subject lines with quote(s)?

Michael M Slusarz slusarz at curecanti.org
Mon Feb 6 22:45:46 EET 2012


Quoting Dinh Le <dinh at flic.net>:


> * 89 FETCH (ENVELOPE ("29 Oct 2008 15:44:03 -0500" {65}
> 2nd Edition of Brennesholtz/Stupp "Projection Displays" Available
>  (("Insight Media" NIL "administrator" "insightmedia.info"))  
> (("Insight Media" NIL "administrator" "insightmedia.info"))  
> (("Insight Media" NIL "administrator" "insightmedia.info")) ((NIL  
> NIL "dinh" "flic.net")) NIL NIL NIL  
> "<20081029154358.0C359AE169595F1B at insightmedia.info>"))

[snip]

> Notice that message 89's Subject line
>
> Subject: 2nd Edition of Brennesholtz/Stupp "Projection Displays" Available
>
> has quotes and this dovecot's ENVELOPE response failed to get parsed by
> a popular Perl module (Mail::IMAPClient::BodyStructure::Envelope).   
> I have a hunch that this is dovecot's fault but I could be wrong.   
> How should dovecot (or any imap server) deal with Subject lines with  
> quotes inside ENVELOPE?

The subject, because it contains quotes, can't be expressed in a  
quoted string so it is instead sent in a literal string.  In a literal  
string, the data is exactly what appears in the original message.  No  
post-processing mechanism should be stripping quotes or anything from  
this data - it is already in its canonical state.

Dovecot is 100% correct in its return.

michael



More information about the dovecot mailing list