Closed Bug 1914662 Opened 3 months ago Closed 2 months ago

DSN & Return Receipt enabled messages from Outbox cannot be sent

Categories

(MailNews Core :: Networking: SMTP, defect)

Thunderbird 130
defect

Tracking

(thunderbird_esr128 unaffected, thunderbird129 unaffected, thunderbird130 affected)

RESOLVED FIXED
132 Branch
Tracking Status
thunderbird_esr128 --- unaffected
thunderbird129 --- unaffected
thunderbird130 --- affected

People

(Reporter: valentine.igosev, Assigned: babolivier)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

The Delivery Status Notification (DSN) option activated prevents email to be sent from Outbox using "Send Later".

To replicate:

  1. Create a new message and select "Options -> Delivery Status Notification & Return Receipt". Send the message using "File -> Send Now", that works fine and no error messages are displayed.

  2. Create a new message and select "Options -> Delivery Status Notification & Return Receipt". Send the message using "File -> Send Later" and then try right click on the Outbox to "Send Unsent Messages", which results in displaying the error message.

Actual results:

Sending messages from outbox with DSN & Return Receipt enabled results in error:

Sending of the message failed.
An error occurred while sending mail. The mail server responded: Bad ENVID parameter syntax. Please verify that your email address is correct in your account settings and try again.

Expected results:

Since this is a bug, there were no issues with sending messages with DSN and Read Receipt enabled from Outbox using "Send Later" function before the 130.0b1 update, which was a common practice.

You're saying that the issue was introduced between 129 beta and 130 beta 1? Set pref mailnews.smtp.loglevel to value All and report what exactly causes the error. Honouring the DSN in "Send Later" was fixed in bug 815638 in TB 125. So that sending fails now must have a different cause.

(In reply to Francesco from comment #1)

You're saying that the issue was introduced between 129 beta and 130 beta 1? Set pref mailnews.smtp.loglevel to value All and report what exactly causes the error. Honouring the DSN in "Send Later" was fixed in bug 815638 in TB 125. So that sending fails now must have a different cause.

Thia was a completely different bug that did not enable DSN once a message has been sent from Outbox using "Send Later". In my case, with DSN and Return Receipt enabled mesaages sent using "Semd Later" cannot be sent from the Outbox at all.

Can you please provide the SMTP logging.

I can reproduce. We end up with empty id at https://searchfox.org/comm-central/rev/5fc342efb04b403770acbf8b658a8c168dfa07e2/mailnews/compose/src/SmtpClient.sys.mjs#293

mailnews.smtp: C: MAIL FROM:<moe@raspberrypi.local> BODY=8BITMIME SIZE=1151 RET=FULL ENVID=
mailnews.smtp: S: 501 5.5.4 Bad ENVID parameter syntax

This would be a regression from bug 1882574

Status: UNCONFIRMED → NEW
Component: Untriaged → Networking: SMTP
Ever confirmed: true
Flags: needinfo?(brendan)
Keywords: regression
Product: Thunderbird → MailNews Core
Regressed by: 1882574

It looks like I missed nsMsgSendLater.cpp in https://phabricator.services.mozilla.com/D212696, I'll submit a patch for this shortly.

This regressor landed in the 130 branch, so thankfully this means ESR is not impacted.

No longer blocks: tb128found
Flags: needinfo?(brendan)
Regressed by: 1896171
No longer regressed by: 1882574
Assignee: nobody → brendan
Status: NEW → ASSIGNED

For some reason moz-phab patchbails out on me when trying to apply this patch. It just rejects one line, and I can't see why...

Landing D220297...
Patching revision: D220297
Checked out .
patching file mailnews/test/fakeserver/Smtpd.sys.mjs
Hunk #1 FAILED at 27
1 out of 1 hunks FAILED -- saving rejects to file mailnews/test/fakeserver/Smtpd.sys.mjs.rej
abort: patch failed to apply
CommandError: command 'import' failed to complete successfully
Run moz-phab again with '--trace' to show debugging output

$ cat mailnews/test/fakeserver/Smtpd.sys.mjs.rej
--- Smtpd.sys.mjs
+++ Smtpd.sys.mjs
@@ -28,11 +28,11 @@
 export class SMTP_RFC2821_handler {
   kAuthRequired = false;
   kUsername = "testsmtp";
   kPassword = "smtptest";
   kAuthSchemes = ["CRAM-MD5", "PLAIN", "LOGIN"];
-  kCapabilities = ["8BITMIME", "SIZE", "CLIENTID"];
+  kCapabilities = ["8BITMIME", "SIZE", "CLIENTID", "DSN"];
   _nextAuthFunction = undefined;
 
   constructor(daemon) {
     this._daemon = daemon;
     this.closing = false;

The "before" line looks identical to what I've got, so I'm pretty puzzled here.
Brendan - anything obvious I'm missing?

Flags: needinfo?(brendan)

That's weird. Bug 1901962 landed something to Smtpd.sys.mjs after the commit this patch was based on, but nothing that touched that line. I'm wondering if hg patch (called through moz-phab patch) might just see that something else changed that file overall in the meantime and decided to bail.

Anyway, I've just rebased the patch on the latest c-c tip, so it should be safe to land now.

Flags: needinfo?(brendan)

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f5e0fead5c3d
Correctly extract or generate a message ID for delayed sending. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED

Test failure in comm/mail/components/accountcreation/test/xpcshell/test_guessConfig.js : https://treeherder.mozilla.org/jobs?repo=comm-central&selectedTaskRun=Z8qgGLPsRJabYKOAO9V1Tg.0

Flags: needinfo?(brendan)

Fixed in bug 1917015, thanks Vineet!

Flags: needinfo?(brendan)
Regressions: 1917015
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: