edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Karl Dahlke <eklhad@comcast.net>
Cc: edbrowse-dev@edbrowse.org
Subject: Re: [edbrowse-dev] batch move and batch delete
Date: Thu, 7 Jun 2018 02:52:53 +0200	[thread overview]
Message-ID: <20180607005253.GA19277@nautica> (raw)
In-Reply-To: <20180506201013.eklhad@comcast.net>


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

      reply	other threads:[~2018-06-07  0:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 17:07 Karl Dahlke
2018-06-06 23:52 ` Dominique Martinet
2018-06-07  0:10   ` Karl Dahlke
2018-06-07  0:52     ` Dominique Martinet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180607005253.GA19277@nautica \
    --to=asmadeus@codewreck.org \
    --cc=edbrowse-dev@edbrowse.org \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).