AquaMail Forum

English - Android => Feature requests => Topic started by: ThiefMaster on February 24, 2014, 04:32:20 am

Title: Delivery-date vs Date
Post by: ThiefMaster on February 24, 2014, 04:32:20 am
It would be nice if there was an option to choose which of these dates is shown.
Title: Re: Delivery-date vs Date
Post by: Kostya Vasilyev on March 02, 2014, 12:14:54 am
The app uses so called "internal date" which is when a message has been "filed" by the server.

Previously, the app was using the "Date:" header, but... this could be completely off by several hours or even years, depending on how wrong the date/time on the sending side was.

I don't see how the option you propose would be useful:

1 - if the sending-side date/time is all wrong, then you would want to see "internal date/time" anyway (and not "January 1 1980" for example);
2 - if it's correct (e.g. the user knows what time zone he is in), then the Date header and the internal date are usually within a few seconds, or at most, minutes, of each other.
Title: Re: Delivery-date vs Date
Post by: ThiefMaster on March 02, 2014, 12:18:21 am
> The app uses so called "internal date" which is when a message has been "filed" by the server.

Isn't this incorrect if the delivery has been delayed e.g. by graylisting?
IMHO the only case where it makes lots of sense to use another date than the one in the Date header is when the header is missing or contains nonsense (1/1/1970 etc.), and even that is usually only the case for spam mails.
Title: Re: Delivery-date vs Date
Post by: scanno on March 02, 2014, 01:55:03 am
> The app uses so called "internal date" which is when a message has been "filed" by the server.

Isn't this incorrect if the delivery has been delayed e.g. by graylisting?
IMHO the only case where it makes lots of sense to use another date than the one in the Date header is when the header is missing or contains nonsense (1/1/1970 etc.), and even that is usually only the case for spam mails.
Then the big question is.... Is there anything written about this in rfc2821 and rfc2822?

Verstuurd vanaf mijn Nexus 10 met Tapatalk

Title: Re: Delivery-date vs Date
Post by: Kostya Vasilyev on March 02, 2014, 11:41:29 pm
The "internal date" is when a message was filed / received by the mail server.

I'm just going on the assumption that a wrong date/time/zone on a mail server is much, much less likely than such on an end-user device.

I believe this assumption to be very much valid (and you can search the forum for evidence -- from before I changed my code like this).

Now as for the origin of those datums (if you're curious):

- IMAP: RFC 3501, "INTERNALDATE"

- EWS: the DateTimeCreated element (in XML)

- POP3: nothing in the protocol, so I use "Received" headers, prepended by SMTP transports (and accessible via POP3 as part of message source):

Quote
Received: from mxfront10o.mail.yandex.net ([127.0.0.1])
   by mxfront10o.mail.yandex.net with LMTP id LUh46ZWq
   for <***@yandex.ru>; Sun, 2 Mar 2014 19:21:30 +0400
Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [2607:f8b0:400c:c03::230])
   by mxfront10o.mail.yandex.net (nwsmtp/Yandex) with ESMTPS id ZppcC4zj2B-LTwmLMck;
   Sun,  2 Mar 2014 19:21:29 +0400
   (using TLSv1 with cipher RC4-SHA (128/128 bits))
   (Client certificate not present)
Received: by mail-vc0-f176.google.com with SMTP id la4so2648386vcb.35
        for <***@yandex.ru>; Sun, 02 Mar 2014 07:21:28 -0800 (PST)
Received: by 10.220.155.201 with HTTP; Sun, 2 Mar 2014 07:21:28 -0800 (PST)