Question about line length limit in lmtp.
I have postfix + dovecot server. Mail for local users are saved by dovecot lmtp. Recently I got some messages from postfix:
--8<---------------cut here---------------start------------->8--- 4NQ07L4h4LztXXr: breaking line > 998 bytes with <CR><LF>SPAC --8<---------------cut here---------------end--------------->8---
This is because postfix has configured with default value lmtp_line_length_limit (990). I can turn off this limit (set to 0) but I am curious if dovecot lmtp will accept so lengthty lines? Does dovecot lmtp has any line limits?
KJ
On 04/12/2022 18:25 EET Kamil Jońca kjonca@o2.pl wrote:
I have postfix + dovecot server. Mail for local users are saved by dovecot lmtp. Recently I got some messages from postfix:
--8<---------------cut here---------------start------------->8--- 4NQ07L4h4LztXXr: breaking line > 998 bytes with <CR><LF>SPAC --8<---------------cut here---------------end--------------->8---
This is because postfix has configured with default value lmtp_line_length_limit (990). I can turn off this limit (set to 0) but I am curious if dovecot lmtp will accept so lengthty lines? Does dovecot lmtp has any line limits?
KJ
Dovecot LMTP and Submission enforce the RFC line length, which is 1000, including \r\n.
Aki
On 12/8/22 17:29, Aki Tuomi wrote:
Dovecot LMTP and Submission enforce the RFC line length, which is 1000, including \r\n.
Can you elaborate on this?
I often get mail coming in from the wild with long lines and I find the most practical approach is to pass it on to dovecot LMTP as is, and it just works, and the message is stored with long lines, not folded.
I haven't tried dovecot's submission yet.
What exactly can you tell me about line length limits in LMTP and submission and can it be configured?
On 08/12/2022 11:39 EET Gedalya gedalya@gedalya.net wrote:
On 12/8/22 17:29, Aki Tuomi wrote:
Dovecot LMTP and Submission enforce the RFC line length, which is 1000, including \r\n.
Can you elaborate on this?
I often get mail coming in from the wild with long lines and I find the most practical approach is to pass it on to dovecot LMTP as is, and it just works, and the message is stored with long lines, not folded.
I haven't tried dovecot's submission yet.
What exactly can you tell me about line length limits in LMTP and submission and can it be configured?
This is something that is usually handled automatically and does not affect the mails you see in your MUA. The folding is done within the protocol.
Aki
On 12/8/22 17:41, Aki Tuomi wrote:
This is something that is usually handled automatically and does not affect the mails you see in your MUA. The folding is done within the protocol.
Again, I find this statement quite strange. I'm not relying on any MUA when I say long lines appear to be kept unfolded in storage.
The scenario is an MTA e.g. exim delivering mail with long lines to dovecot LMTP. If you're saying I'm definitely wrong then I'd have to test again.
As for submission, are you saying that if a client is submitting mail with long lines, submission will fold the lines before passing it on? And this would make sense because DKIM signing occurs later?
Aki Tuomi aki.tuomi@open-xchange.com writes:
On 08/12/2022 11:39 EET Gedalya gedalya@gedalya.net wrote:
On 12/8/22 17:29, Aki Tuomi wrote:
Dovecot LMTP and Submission enforce the RFC line length, which is 1000, including \r\n.
Can you elaborate on this?
I often get mail coming in from the wild with long lines and I find the most practical approach is to pass it on to dovecot LMTP as is, and it just works, and the message is stored with long lines, not folded.
I haven't tried dovecot's submission yet.
What exactly can you tell me about line length limits in LMTP and submission and can it be configured?
This is something that is usually handled automatically and does not affect the mails you see in your MUA. The folding is done within the protocol.
Hm. Confused by some post in thread I make test I tested with then I issued:
- dovecot with lmtp and maildir as storage.
- postfix configured to pass messages with line folding turned off.
$for ((i=1;i<=1100;i++)); do echo -n "." ; done|mail kjonca
mail was delivered and in maildir file line was stored "as is" - without any breaking newline. So I believe dovecot-lmtp does not break the lines. And please do not change this :)
KJ
the issue is that some mail clients, namely apple mail on ios, send header lines that are too long for longer mail threads or while forwarding mails. Didn't find a way to handle those clients yet. Did anyone?
participants (4)
-
Aki Tuomi
-
Gedalya
-
info@joergschulz.de
-
Kamil Jońca