Re: Outgoing message truncated at dot wrapped on single line



On 10/22/2011 03:31:22 PM, Carlos Franke wrote:
Dear Balsa developers,

I came across a severe bug connected to Balsa and one of my email providers, Lavabit. It does not occur with my other provider, so something might well be wrong at Lavabit, but it does not occur with my other MUA either. If it turns out to be Balsa's fault, I will be happy to open a report in the bug tracker.

This is the bug:
Some messages get truncated without warning before they reach their recipient, while appearing untruncated in Balsa's outbox.

This is how to trigger it:
Send a message…
 – using Lavabit's SMTP server.
– containing a line with a specific length, ending in a dot. This is where the message will be truncated: the line gets through, the dot does not.
For me, the following line triggers the bug:
kann ich natürlich versuchen, so früh wie möglich da zu sein.

I do *not* have word wrap activated in Edit->Preferences->Mail options->Outgoing , however I *do* have "Wrap text at [79] characters" active in Edit->Preferences->Display options->Message (but that is just for local display, I assume). It does not make any difference if I use "Format = Flowed" or not.

Looking at the source of the (untruncated) message in my outbox, I find that the trailing dot is wrapped on a single line. Putting a dot on a single line is the SMTP signal for "end of message", so I strongly suspect that Balsa should not do this. (I wonder why Balsa does line wrapping anyway in my setup, but that is a different matter…) Or should it? Im not sure, as my other mail provider plays well with Balsa.

Libestmp is supposed to transform lines containing single '.' to two dots. This is even used as a test case in libesmtp. The first step is to enable Debug on Misc page and look what gets printed in the terminal window. You could capture the network traffic by e.g. running balsa under strace

strace -olog -ff balsa

You can then search the multiple output files for words like "EHLO" - this means the start of ESMTP protocol. You will find the actual content of the message a few lines later.

You could also then try faking the smtp session yourself:
telnet lavabit.server.name 25
Trying <IP NUMBER>...
Connected to lavabit.server.name (<IP NUMBER>).
Escape character is '^]'.
type "ehlo localhost" or similar.
type "mail from: example example com" you should get "250 2.1.0 Ok" or similar type "rcpt to: YOUR@EMAIL.ADDRESS" you should also get "250 2.1.5 Ok" or similar type "data" you should get "354 End data with <CR><LF>.<CR><LF>" or similar
Type 4 lines:
line 1
..
line 2
.

Only after the line containing single dot, you should get "250 2.0.0 Ok: queued" or similar
Type "quit" and you should get "221 2.0.0 Bye" or similar.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]