[Dovecot] should dovecot store maildir files with CRLF or LF?

Timo Sirainen tss at iki.fi
Wed May 22 20:06:39 EEST 2013


On 22.5.2013, at 1.45, Christoph Anton Mitterer <calestyo at scientia.net> wrote:

> Hi.
> 
> I've made a strange observation.
> When having Dovecot (at least) with maildir and moving (via IMAP) mail
> received by some client (Evolution 3.4) into it the following happens:
> 
> Regardless of whether the mail was originally(!) set with CRLF or LF
> (i.e. when I use netcat to submit the plain SMTP to the relaying MTA).
> 
> When the client (Evolution) had received the mail via POP3 before moving
> it via IMAP into Dovecot... then the maildir file within dovecot is all
> LF.

mail_save_crlf setting controls if mails are saved as CRLF or LF to storage.

> When the client however received it via IMAP, before in turn moving it
> on via IMAP into Dovecot, then the maildir file is mixed CRLF and LF,
> i.e. the body is CRLF, the headers are terminated…

Sounds like the client was saving mails using CRCRLF, and Dovecot changed that to CRLF. Perhaps Dovecot should have changed the other CR to some other character.. You could verify by looking at the IMAP traffic, e.g. http://wiki2.dovecot.org/Debugging/Rawlog




More information about the dovecot mailing list