Bug 1282616 - [Camel] Fill message From header if missing in received MIME content
Summary: [Camel] Fill message From header if missing in received MIME content
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution-ews
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-16 21:54 UTC by Jan Vesely
Modified: 2015-11-23 17:52 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-23 15:19:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 758374 0 None None None Never

Description Jan Vesely 2015-11-16 21:54:46 UTC
view->message source shows these headers

...
Subject: test
Date: Mon, 16 Nov 2015 15:19:08 -0600
Content-Type: text/plain
X-Mailer: Evolution 3.18.1 (3.18.1-1.fc23) 
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
X-Evolution-Source: 1446569135.2265.1@vm-03
From: 

from field?



in case it's relevant, the account is exchange online via evolution ews.

Comment 1 Milan Crha 2015-11-18 10:08:05 UTC
Thanks for a bug report. I suppose you see this message in the Exchange's Sent folder. The evolution-ews instructs the server to send the message and copy it to the Sent folder. The both is done on the server and by the server. It is new in 3.18 and it is meant to not upload the message twice to the server, as was done before the 3.18 version.

The empty From header is used on sending, because it's filled by the server. The server doesn't add it to the copy of the message in the Sent folder, unfortunately.

I'm not sure how to solve this, because, if I recall correctly, the server doesn't return the message ID of the copy in the Sent folder. Trying to "guess" the right message in the Sent folder would make only trouble.

Comment 2 Jan Vesely 2015-11-18 17:01:41 UTC
Looks like this is exchange server problem and since MS Outlook displays it correctly I don't think it's going to get fixed there.
Messages sent from MS Outlook do have the from field filled, so exchange might expect the client to provide the field, even if it can fix missing from header.

The issue is mostly cosmetic that messages outside of sent folder display empty field in the From column, and from header is missing in message window. I'm OK with WONT FIX on this one (maybe the column can be filled with folder associated account if empty?)

There are, however, 2 more problems with the server copy change.
The "From override" does not work, and "save replies in the folder of the message being replied to" does not work either.
I can file new bugs for those if you prefer.

Comment 3 Milan Crha 2015-11-19 06:02:10 UTC
(In reply to Jan Vesely from comment #2)
> Looks like this is exchange server problem and since MS Outlook displays it
> correctly I don't think it's going to get fixed there.

Do you mean the Outlook shows the same message in the Sent folder with the From field set, while evolution doesn't? That would be interesting. What version of the Outlook do you use?

> Messages sent from MS Outlook do have the from field filled, so exchange
> might expect the client to provide the field, even if it can fix missing
> from header.

The change is there because the server can reject sending when the From address doesn't exactly match the one set on the server. Evolution-ews developers decided to not fill the From and let the server set it.

> The issue is mostly cosmetic that messages outside of sent folder display
> empty field in the From column, and from header is missing in message
> window. I'm OK with WONT FIX on this one (maybe the column can be filled
> with folder associated account if empty?)

I'd rather not do it, you can move such message to an On This Computer folder where is no account associated.

> There are, however, 2 more problems with the server copy change.
> The "From override" does not work, and "save replies in the folder of the
> message being replied to" does not work either.
> I can file new bugs for those if you prefer.

They both seem to be separate from the empty From in the Sent folder issue, but still related. It'll be good to open bug reports upstream, for better visibility. If you do not have a GNOME account, I can file them for you, though I'd prefer if you could file them (you'll also receive updates that way). The link to enter a bug report is:

https://bugzilla.gnome.org/enter_bug.cgi?product=evolution-ews

Comment 4 Jan Vesely 2015-11-19 21:59:47 UTC
(In reply to Milan Crha from comment #3)
> (In reply to Jan Vesely from comment #2)
> > Looks like this is exchange server problem and since MS Outlook displays it
> > correctly I don't think it's going to get fixed there.
> 
> Do you mean the Outlook shows the same message in the Sent folder with the
> From field set, while evolution doesn't? That would be interesting. What
> version of the Outlook do you use?

yes. the outlook sent message headers look like this:

From: "Vesely, Jan" <Jan.Vesely>
To: "Vesely, Jan" <Jan.Vesely>
Subject: RE: test2 reply outlook
Thread-Topic: test2 reply outlook
Thread-Index: AdEiHwjStrg9X2yrQkKa61vUEWLznw==
Date: Wed, 18 Nov 2015 16:34:47 +0000
Message-ID: <BLUPR12MB046693DFD6D38D8E304029C7861C0.prod.outlook.com>
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator: 
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Evolution-Source: 1446569135.2265.1@vm-03

I assume the X-Evolution is a leftover since I replied to a previous message sent from evolution.
It's Outlook 2013, part of corporate office365 deployment. I can try the outlook.office365.com webapp if it helps, but I assume it's going to be the same as MS Outlook.

> 
> > Messages sent from MS Outlook do have the from field filled, so exchange
> > might expect the client to provide the field, even if it can fix missing
> > from header.
> 
> The change is there because the server can reject sending when the From
> address doesn't exactly match the one set on the server. Evolution-ews
> developers decided to not fill the From and let the server set it.

I noticed that the from field was different between evolution and outlook (name lastname ordering, email capitalization). The Outlook header matches the one added by exchange server.

> 
> > The issue is mostly cosmetic that messages outside of sent folder display
> > empty field in the From column, and from header is missing in message
> > window. I'm OK with WONT FIX on this one (maybe the column can be filled
> > with folder associated account if empty?)
> 
> I'd rather not do it, you can move such message to an On This Computer
> folder where is no account associated.

It would not be worse than what we have now. I understand that any solution would be best effort, it's just that those empty fields irk me a little bit more than differences in name/email formatting.

> 
> > There are, however, 2 more problems with the server copy change.
> > The "From override" does not work, and "save replies in the folder of the
> > message being replied to" does not work either.
> > I can file new bugs for those if you prefer.
> 
> They both seem to be separate from the empty From in the Sent folder issue,
> but still related. It'll be good to open bug reports upstream, for better
> visibility. If you do not have a GNOME account, I can file them for you,
> though I'd prefer if you could file them (you'll also receive updates that
> way). The link to enter a bug report is:
> 
> https://bugzilla.gnome.org/enter_bug.cgi?product=evolution-ews

OK, I'll file the bugs there.

Comment 5 Milan Crha 2015-11-23 15:19:07 UTC
(In reply to Jan Vesely from comment #4)
> I assume the X-Evolution is a leftover since I replied to a previous message
> sent from evolution.

The X-Evolution-Source header is added to the message on the fly, thus if you look on the message source from the Evolution, then you'll see it there, even if it was not received with it. Any X-Evolution* headers are removed before the send and as far as I can tell they are not stored on the server, only in the local cache (maybe except when copying the message).

> It's Outlook 2013, part of corporate office365 deployment. I can try the
> outlook.office365.com webapp if it helps, but I assume it's going to be the
> same as MS Outlook.

The web application works slightly differently, but no need to try it, I was wondering about the version itself. I also understood that the Outlook shows correct From address when viewing messages sent by the Evolution the same messages where the Evolution doesn't show any From address.

> OK, I'll file the bugs there.

Thanks. For the reference, the bugs are:
https://bugzilla.gnome.org/show_bug.cgi?id=758374
https://bugzilla.gnome.org/show_bug.cgi?id=758375

I'll try to fix the empty From header too, but no promises. It'll be part of one of your bug report (the one for the "From field override", as it's related.)

Comment 6 Milan Crha 2015-11-23 17:52:43 UTC
I fixed the "empty From header in the message preview" with the below commits. To have it working, the local cache should be deleted and the messages re-downloaded (otherwise the fix works only for newly received messages).
Let's deal with the rest in the upstream bug reports.

Created commit e40c681 in ews master (3.19.3+) [1]
Created commit 7514728 in ews gnome-3-18 (3.18.3+)

[1] https://git.gnome.org/browse/evolution-ews/commit/?id=e40c681


Note You need to log in before you can comment on or make changes to this bug.