From mboxrd@z Thu Jan 1 00:00:00 1970 Received-SPF: Permerror (mailfrom) identity=mailfrom; client-ip=2001:41d0:1:7a93::1; helo=nautica.notk.org; envelope-from=asmadeus@notk.org; receiver= X-Greylist: delayed 3645 seconds by postgrey-1.37 at hurricane; Wed, 06 Jun 2018 17:53:10 PDT Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by hurricane.the-brannons.com (Postfix) with ESMTPS id B243377AE2 for ; Wed, 6 Jun 2018 17:53:09 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 1001) id 2DB6CC009; Thu, 7 Jun 2018 02:53:08 +0200 (CEST) Date: Thu, 7 Jun 2018 02:52:53 +0200 From: Dominique Martinet To: Karl Dahlke Cc: edbrowse-dev@edbrowse.org Subject: Re: [edbrowse-dev] batch move and batch delete Message-ID: <20180607005253.GA19277@nautica> References: <20180506130719.eklhad@comcast.net> <20180606235207.GA6583@nautica> <20180506201013.eklhad@comcast.net> X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180506201013.eklhad@comcast.net> User-Agent: Mutt/1.5.21 (2010-09-15) Karl Dahlke wrote on Wed, Jun 06, 2018: > It all depends on what imap hands me as part of the envelope. > The example I saw today > > mer., 06 juin 2018 14:52:10 +0200 Yes and no, I don't normally use imap but here is what it gives on a "FETCH ... ALL" command for one of Erwin's mail: 5 FETCH 507 all * 507 FETCH (FLAGS (\Seen \Recent) INTERNALDATE "07-Jun-2018 00:57:18 +0200" RFC822.SIZE 2162 ENVELOPE ( "mar., 05 juin 2018 13:38:20 +0200" "[edbrowse-dev] imap" (("Erwin" NIL "erwb19" "free.fr")) (("Erwin" NIL "erwb19" "free.fr")) (("Erwin" NIL "erwb19" "free.fr")) ((NIL NIL edbrowse-dev" "lists.the-brannons.com")) NIL NIL NIL "<20180505133820.erwb19@free.fr>" )) 5 OK Fetch completed. So, here again there are two dates: The "internal date" I was talking about, that is formatted by the server The "envelope" date that comes from the From litterally. in mbox format, this is the same as the format you have in the first line that gives an internal date (date where the mail was dropped in your mbox) and then the Date: field in the envelope. So the two things I said still stand: - in this case the From ought to be formatted in English according to the RFC so this is a bug in edbrowse on the send side in the first place; I would think the first thing to fix is that. You can check RFC4021 / RFC822 yourself if you do not trust me :) - I think in the cases that can still happen where we cannot parse the date that we are given, it is more reliable to ask the server for the internaldate (or get it from the file if it is on disk) I think it makes sense to do like mutt and look at Received because that is the same in all formats (imap/mbox/mailbox), rather than try to implement specifics: 7 fetch 507 (BODY[HEADER.FIELDS (RECEIVED)]) * 507 FETCH (BODY[HEADER.FIELDS (RECEIVED)] {994} Received: by nautica.notk.org (Postfix, from userid 108) id 4F67EC01A; Tue, 5 Jun 2018 13:38:28 +0200 (CEST) ... ) 7 OK Fetch completed. As you can see, it's not the same time, but this only happens for "bad" clients and it sounds a lot better to me than trying to learn all possible languages... :D -- Dominque | Asmadeus