Forwarding out of filter rules result in SMTP timeout if email doesn't end with <CR><LF>



3 years ago
5 months ago


(Reporter: Christoph Nickel, Unassigned)


42 Branch
Windows 7

Firefox Tracking Flags

(Not tracked)




3 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421

Steps to reproduce:

I created a filter rule, that forward an email to another recipient.
The email body is base64 encoded.

Actual results:

Thunderbird tries to send the email, but runs into a SMTP timeout.

With a sniffer tool, I see that thunderbird tries to forward the email decoded.
To signal the end of the DATA command, thunderbird only gives a ".<CR><LF>", but it should be "<CR><LF>.<CR><LF>". So the mail server gives a timeout, because it is still waiting for "end of data".

Expected results:

Email should be forwarded.


3 years ago
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64

Comment 1

3 years ago
Are you suggesting this is a regession?
If so, can you find the one day regression range?
Flags: needinfo?(c.nickel)

Comment 2

3 years ago
I don't know, if it is a recession.

But I can give you some futher information:

Thunderbird seems to decodes the base64 coded mail for filtering the body.

The problem occurs, when the original email source code, generated by the sender, doesn't end with <CR><LF>. This seems to happen with some automate generated emails like paypal.
The generated email source code will be base 64 encoded and the email will be send to the recipient.

If I forward this email manually, there will be no problem, because the email is base64 encoded.

Now, I try to filter this email. The email body will be decoded and Thunderbird tries to forward the email. Because of the missing <CR><LF> at the end of the decoded email, the SMTP server runs into a timeout.

In my opinion, there are two solutions.

Solution a):
Thunderbird attaches <CR><LF>.<CR><LF> at every email. If the decoded email doesn't end with <CR><LF> the email could be forwarded anyway.

Solution b):
After filtering the body, Thunderbird encodes the email again and forward it to the recipient.
Flags: needinfo?(c.nickel)

Comment 3

10 months ago
I confirm the continuing existence of this bug in Thunderbird 52.3.0.


5 months ago
Summary: Forwarding out of filter rules result in SMTP timeout → Forwarding out of filter rules result in SMTP timeout if email doesn't end with <CR><LF>

Comment 4

5 months ago
This looks like the root cause of the problem I am having with Thunderbird 52.6.0 (64 bit) on macOS 10.11.6

The emails in question are notifications from 23andme which are base64 encoded.
I can manually forward them without a problem, but a filter rule does not forward them. After a period of time there is a timeout message from the smtp server. No sent message appears in the Sent folder.

A workaround is to change mail.forward_message_mode = 0
(i.e. forward messages as an .eml attachment, not inline)
However, this is not satisfactory for me due to unreliability in being able to read such .eml attachments.
You need to log in before you can comment on or make changes to this bug.