RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.1k stars 885 forks source link

Rainloop received date column shows wrong date #1126

Open stueja opened 8 years ago

stueja commented 8 years ago

I noticed that Rainloop obviously does not show the "received" date from the header, but some other date (the date of storage on the mail server?)

I am using getmail to fetch mail from a remote imap server to my local imap server dovecot. I use Rainloop to log in to my local imap server.

Rainloop, in the received date column shows the date the message was stored in/fetched to my local imap server, even if the fetched email originally arrived in 2005.

Counter example: Thunderbird, displaying the original date.

Filesystem of one example mail in question:

root@router ~ # ls -al /home/mail_jst_web/Maildir/.INBOX.Shopping/cur/1469429770.M272592P5994.router,S=8892,W=9051:2,S 
-rw------- 1 mail_jst_web mail_jst_web 8892 Jul 25 08:56 /home/mail_jst_web/Maildir/.INBOX.Shopping/cur/1469429770.M272592P5994.router,S=8892,W=9051:2,S

Source according to Rainloop:

Return-Path: <unknown>
Delivered-To: unknown
From: <shopeu@fon.com>
To: <my.original@mail.account>
Subject: Deine FON Bestellung wurde abgeschickt
Date: Thu, 21 Dec 2006 15:24:45 +0100
Message-ID: <3499324.861166711085336.JavaMail.www-data@fonesfbl02>
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="----=_NextPart_000_001C_01C72519.22279CE0"
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Thread-Index: AcclDt2LztocEiOkQgyMFp3biokNvA==
X-OlkEid: 85E48B274202C101AF22A640AB5F943AD2141F26
X-DSPAM-Result: Innocent
X-DSPAM-Processed: Thu Dec 21 14:24:45 2006
X-DSPAM-Confidence: 0.9997
X-DSPAM-Probability: 0.0000
X-DSPAM-Signature: 458a992d318911259843084
X-DSPAM-Factors: 27,
X-Virus-Scanned: amavisd-new at 
X-Spam-Status: No, score=0.48 tagged_above=-10 required=6.6 autolearn=no tests=[AWL=-0.467, BAYES_00=-2.599, DSPAM_HAM=-0.1, HTML_10_20=1.351, HTML_BADTAG_30_40=0.124, HTML_MESSAGE=0.001, HTML_MIME_NO_HTML_TAG=1.082, HTML_NONELEMENT_40_50=0.126, MIME_HTML_ONLY=0.001, NO_REAL_NAME=0.961]
X-Spam-Score: 0.48
X-Spam-Level: 
X-getmail-retrieved-from-mailbox: _Bestellungen
...

Screenshot from Thunderbird: screenshot from 2016-07-27 09-34-58

Screenshot from Rainloop: untitled (Unfortunately, the Arch Linux Screenshot tool does not capture the tooltip popping up. It shows July 25 2016 8:56, the date and time when I used getmail to fetch the emails)

How can I have Rainloop display the original email date?

RainLoop commented 8 years ago

How can I have Rainloop display the original email date?

[labs]
date_from_headers = On
stueja commented 8 years ago

[labs] date_from_headers = On

(in /var/www/rainloop/public_html/data/_data_/_default_/configs/application.ini) works like a charm, thank you! :+1:
It works at least for the email from my first post, here as a reference:

Return-Path: <unknown>
Delivered-To: unknown
From: <shopeu@fon.com>
To: <my.original@mail.account>
Subject: Deine FON Bestellung wurde abgeschickt
Date: Thu, 21 Dec 2006 15:24:45 +0100
Message-ID: <3499324.861166711085336.JavaMail.www-data@fonesfbl02>
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="----=_NextPart_000_001C_01C72519.22279CE0"
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Thread-Index: AcclDt2LztocEiOkQgyMFp3biokNvA==
X-OlkEid: 85E48B274202C101AF22A640AB5F943AD2141F26
X-DSPAM-Result: Innocent
X-DSPAM-Processed: Thu Dec 21 14:24:45 2006
X-DSPAM-Confidence: 0.9997
X-DSPAM-Probability: 0.0000
X-DSPAM-Signature: 458a992d318911259843084
X-DSPAM-Factors: 27,
X-Virus-Scanned: amavisd-new at 
X-Spam-Status: No, score=0.48 tagged_above=-10 required=6.6 autolearn=no tests=[AWL=-0.467, BAYES_00=-2.599, DSPAM_HAM=-0.1, HTML_10_20=1.351, HTML_BADTAG_30_40=0.124, HTML_MESSAGE=0.001, HTML_MIME_NO_HTML_TAG=1.082, HTML_NONELEMENT_40_50=0.126, MIME_HTML_ONLY=0.001, NO_REAL_NAME=0.961]
X-Spam-Score: 0.48
X-Spam-Level: 
X-getmail-retrieved-from-mailbox: _Bestellungen
...

However, it did not work for

Return-Path: <unknown>
Delivered-To: unknown
Received: from [87.106.11.6] (helo=s15219135.onlinehome-server.info)
    by mx09.web.de with esmtp (WEB.DE 4.107 #114)
    id 1H56ft-0000Wy-00
    for my.original@email.account; Thu, 11 Jan 2007 21:37:25 +0100
Received: (qmail 2248 invoked by uid 10003); 11 Jan 2007 21:36:40 +0100
Message-ID: <20070111203640.2247.qmail@s15219135.onlinehome-server.info>
Content-Transfer-Encoding: binary
Content-Type: multipart/mixed; boundary="_----------=_116854780022200"
MIME-Version: 1.0
X-Mailer: MIME::Lite 3.01 (F2.73; B3.05; Q3.03)
Date: Thu, 11 Jan 2007 20:36:40 UT
From: M&M Computer * Mintchev GmbH Dresden <verkauf@mmcomputer.de>
To: my.original@email.account
Subject: Bestellbestaetigung vom M&M-Computer-Webshop Nr.: #39437
Sender: anonymous@s15219135.onlinehome-server.info
X-getmail-retrieved-from-mailbox: _Bestellungen

This is a multi-part message in MIME format.
...

See 1st and 3rd email in this screenshot: screenshot from 2016-07-28 09-25-11

All in all, the order of the emails seems unsorted: screenshot from 2016-07-28 09-42-04 screenshot from 2016-07-28 09-42-22

edtsz commented 8 years ago

@stueja did you solved your seccond problem? (wrong order) I'm getting this issue with ZOHO Imap I tried: use_imap_sort use_imap_thread date_from_headers but nothing changed...

stueja commented 8 years ago

@edtsz not yet, since I have not yet completed the task "have getmail fetch all emails from my email provider to my local server". Currently, I am using rainloop as client connecting to the email provider, not my local dovecot. Deep in myself, something is waiting for a developer reply ;)

NOlivNeto commented 7 years ago

@RainLoop I'm having the same problem. Messages from today, 2014, 2015, 2016 with no apparent sorting order. This is a major issue.

My server is yandex. Anything I can do to solve this?

screen shot 2017-03-10 at 13 41 01

Inotsacred commented 6 years ago

Hi! ive got enabled date_from_headers = On, but still receive date from file create for some emails. after test i notice that emails have date format without weekday, like: "16 Mar 2018 11:07:05 +0300" instead "Fri, 16 Mar 2018 11:07:05 +0300", so rainloop cant identify date header. After manual header add "Fri", rainloop shows correctly. How to fix this problem with all emails?