K-9: 'From' header is missing.

Created on 6 Aug 2018  路  10Comments  路  Source: k9mail/k-9

Expected behavior

Email should be sent to GMail and Yahoo account holders.

Actual behavior

GMail and Yahoo reject emails with the following errors:

GMail:
Reason: There was an error while attempting to deliver your message with [Subject: ""] to @gmail.com. MTA * received this response from the destination host IP - 209.85.145.27 - 550 , 550-5.7.1 [188.121.53.111] Our system has detected that this message is
550-5.7.1 not RFC 5322 compliant:
550-5.7.1 'From' header is missing.
550-5.7.1 To reduce the amount of spam sent to Gmail, this message has been
550-5.7.1 blocked. Please visit
550-5.7.1 https://support.google.com/mail/?p=RfcMessageNonCompliant
550 5.7.1 and review RFC 5322 specifications for more information. a75-v6si5640959ioa.39 - gsmtp

Yahoo:
Reason: There was an error while attempting to deliver your message with [Subject: ""] to @yahoo.co.uk. MTA * received this response from the destination host IP - 212.82.101.46 - 554 , 554 Message not allowed - [299]
.

Note that other mail servers accepted and delivered the message.

Steps to reproduce

  1. Install and set-up K-9;
  2. Reply-All to an email with about 30 recipients, some with a Yahoo or GMail address;
  3. Check Inbox for 'Message Delivery Failure' responses.

Environment

K-9 Mail version:
5.403

Android version:
4.1.2
(Samsung GT-I8160)

Account type (IMAP, POP3, WebDAV/Exchange):
POP3

Most helpful comment

It looks like this has been fixed in the code base (#3912, 14 Feb) but not yet included in a release (latest release 2 Sep 2018).

Please could we have a new release which includes this fix (https://github.com/k9mail/k-9/pull/3912#issuecomment-521985166)?

All 10 comments

Closer inspection of the rejected message shows the problem is probably with the To: line preceding From:. With about 30 recipients, it wraps to the next line at just shy of 1,000 characters, but without a space or tab as the first character on the new line. It seems that this throws Yahoo and GMail's parsers so they don't pick up the From: line at all.

To: Some Body <[email protected]>,...,Somebody Else
<[email protected]>,...,A N Other <[email protected]>
From: Bug Reporter <[email protected]>

Should be

To: Some Body <[email protected]>,...,Somebody Else
 <[email protected]>,...,A N Other <[email protected]>
From: Bug Reporter <[email protected]>

Note the space where the To: field continues to the next line.

Please see https://tools.ietf.org/html/rfc5322#section-2.2.3:

Long Header Fields

Each header field is logically a single line of characters comprising
the field name, the colon, and the field body. For convenience
however, and to deal with the 998/78 character limitations per line,
the field body portion of a header field can be split into a
multiple-line representation; this is called "folding". The general
rule is that wherever this specification allows for folding white
space (not simply WSP characters), a CRLF may be inserted before any
WSP
.

The CRLF may be inserted _before_, not _instead of_ the WSP.

@JakeQZ Thank you for your thorough report.
I also experienced the "'From' header is missing" Message from GMail and Yahoo when replying to threads with > 29 To addresses.

Nevertheless, I cannot support your linebreak-idea from https://github.com/k9mail/k-9/issues/3544#issuecomment-410562270 as other raw-viewers (such as Thunderbird do not show a broken list of To addresses.

In addition, in my "broken" E-Mail the From header precedes the To header

Date: Tue, 07 Aug 2018 15:24:14 +0200
From: Bug Reporter <[email protected]>
To: Some Body <[email protected]>,...,Somebody Else <[email protected]>,...,A N Other <[email protected]>
Subject: A Subject
User-Agent: K-9 Mail for Android

Nevertheless, I cannot support your linebreak-idea from #3544 (comment) as other raw-viewers (such as Thunderbird do not show a broken list of To addresses.

If I open the rejected message in Thunderbird, the list of To addresses is truncated at the one which wraps to the next line, which shows with an empty email address.

Also encountering this issue on a family even planning set of emails. All yahoo and gmail addresses bounceback, which is a lot of them. Had this for a couple months, and just decided to address it today after another one. Please resolve, as I have to use another app. I've used K9 mail for a long time, but this is worth switching over.

Duplicate of #822.

Please consider to reopen and fix this bug. #822 is still open (and not scheduled for immediate resolution?), but only #3554 has an example and a good analysis. The folding of long header fields breaks RFC-5332 2.2.3. The CRLF may be inserted before, not instead of the WSP.

Hello,

I have same issue using K9 email client in Android. (latest version)
Is a fix available?

Thank you

As above, please consider to fix this issue. I receive 'undeliverable mail' (*) bounce back messages when trying to sent to many recipients. I receive bounce back messages from only gmail and yahoo recipients.

*yahoo says: 554 Message not allowed - [299]
*gmail says: 550 5.7.1 [ip] Our system has detected that this message is not RFC 5322 compliant: 'From' header is missing.

It looks like this has been fixed in the code base (#3912, 14 Feb) but not yet included in a release (latest release 2 Sep 2018).

Please could we have a new release which includes this fix (https://github.com/k9mail/k-9/pull/3912#issuecomment-521985166)?

@JakeQZ I'm not involved in K-9, but you can track the progress to the new 5.800 version here: https://github.com/k9mail/k-9/milestone/24

I agree that it has been quite a while since the last release, but I am really pleased to see that K-9 is being actively developed :)!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrtberlin picture jrtberlin  路  3Comments

j-ed picture j-ed  路  3Comments

jimimaseye picture jimimaseye  路  3Comments

BerndErnst picture BerndErnst  路  3Comments

digitalcraftsman picture digitalcraftsman  路  3Comments