Closed Bug 2069136 Opened 6 days ago Closed 1 day ago

mailnews.send: Error: Unknown header: references

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 154
defect

Tracking

(thunderbird_esr153 affected, thunderbird156 wontfix)

RESOLVED FIXED
157 Branch
Tracking Status
thunderbird_esr153 --- affected
thunderbird156 --- wontfix

People

(Reporter: the.f8er, Assigned: mkmelin)

Details

Attachments

(3 files)

Steps to reproduce:

Dear Developers, Artists,

Thank you for the marvel, art you do!


I tried to forward a message I received to another person.

  1. Pressed Mouse Right Button on the message and selected "Forward";
  2. Wrote the recipient;
  3. Pressed "Send".

Same happens if forwarded "As Attachments".

Actual results:

I got error "Sending of the message failed".

When I enabled error logging and tried again, the console contained:

22:54:00.944 mailnews.send: Creating message file MessageSend.sys.mjs:146:30
22:54:00.947 mailnews.send: Error: Unknown header: references
    addStructuredHeader resource:///modules/jsmime/jsmime.mjs:3330
    emitStructuredHeaders resource:///modules/jsmime/jsmime.mjs:3594
    emitStructuredHeaders resource:///modules/jsmime/jsmime.mjs:3593
    getHeaderString resource:///modules/MimePart.sys.mjs:204
    _writePart resource:///modules/MimeMessage.sys.mjs:623
    createMessageFile resource:///modules/MimeMessage.sys.mjs:85
    createAndSendMessage resource:///modules/MessageSend.sys.mjs:150
    CompleteGenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6566
    GenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6448
    SendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:7123
    doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1168
    doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1343
    goDoCommand chrome://messenger/content/globalOverlay.js:99
    oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
MessageSend.sys.mjs:152:32
22:54:00.948 mailnews.send: Sending failed; , exitCode=2147500037, originalMsgURI=imap-message://redacted%40redacted.com@imap.redacted.com/INBOX#1150,imap-message://redacted%40redacted.com@imap.redacted.com/INBOX#1149,imap-message://redacted%40redacted.com@imap.redacted.com/INBOX#1148,imap-message://redacted%40redacted.com@imap.redacted.com/INBOX#1147 MessageSend.sys.mjs:368:32
    fail resource:///modules/MessageSend.sys.mjs:368
    createAndSendMessage resource:///modules/MessageSend.sys.mjs:160
    CompleteGenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6566
    GenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:6448
    SendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:7123
    doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1168
    doCommand chrome://messenger/content/messengercompose/MsgComposeCommands.js:1343
    goDoCommand chrome://messenger/content/globalOverlay.js:99
    oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1

Expected results:

The message should be sent.

Component: Untriaged → Message Compose Window

Seems this can happen for non-asciii msg ids.

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file utf8ref.eml - testcase

Importing this to a folder and trying to forward it reproduces the problem

Sending failed with "Unknown header: references" whenever the References
value contained no <...> message id: preprocessMessageIDs() returned
undefined, and the emitter can't write a value that is neither structured
nor a string.

In practice a non-ASCII message id was enough to get there. With no
structured encoder registered for References, compose fields re-emitted it
as an unstructured value via getRawHeader(), and RFC 2047 encoding hid the
angle brackets from the next parse.

(In reply to Magnus Melin [:mkmelin] from comment #3)

In practice a non-ASCII message id was enough to get there.

Thank you for the response! Indeed! The message apparently had the following headers:

From: =?UTF-8?B?0JDRgNC80LjRjw==?= <result@redacted.com>
Reply-To: =?UTF-8?B?0JDRgNC80LjRjw==?= <result@redacted.com>
To: redacted@redacted.com
Message-ID: <1914028446.805.1788183797978РђСЂРјРёСЏ>

There's the "mojibake" in the ID, too, where the client had Windows-1251 set and not UTF-8.

Status: NEW → ASSIGNED
Target Milestone: --- → 157 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/9f8fc1886ad7
Handle malformed references header gracefully. r=thunderbird-reviewers,tobyp,babolivier

Status: ASSIGNED → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: