Ken Hornstein wrote:
the imap service's relationship to its backing store is none of my
business as an imap client. as long as invariants are preserved, the
precise form of magic, or even what upstream rules might be getting
broken, are "all fine by me".

Well, I didn't care that much about what Cyrus IMAPd was doing, I was
more interested in what Thunderbird was doing (because really, there are
a couple of possibilities).   ...

as far as i know thunderbird can't speak Maildir. it's using binmail format for its local folders. that is, files with From_ separators between messages.

...  If the answer is, "Hey, we just rename those
files into the appropate Maildir "cur" directory and it all works out",
then that's fine; that's easy.  I just wanted to be sure we're doing
the right thing.

i think, contrary to what you said above, that what the IMAP server is doing does matter. however, i meant dovecot, not cyrus -- and i apologize for the confusion.

And ... well, okay, I decided to read the code, at least in the Cyrus
IMAPd case, and color me confused ... but it sure seems like the
Cyrus mail spool is NOT using Maildir!

on dovecot (not cyrus, sorry!), my Maildir looks like this:

$ ls -d1 .* | perl -ne 'print if /^\.\w+\/$/'
.Archive/
.Drafts/
.Junk/
.Queue/
.Sent/
.ToDo/
.Trash/
.h/
.p/
.t/
.w/

subfolders have more dots in them. so the imap subfolder "zorch" inside the subfolder "spam" inside the subfolder "w" is:

$ ls -al .w.spam.zorch
total 39
drwxrwxr-x    5 vixie  staff     10 Jan 14 21:09 ./
drwxrwxr-x  160 vixie  staff    176 Feb 15 04:29 ../
drwxrwxr-x    2 vixie  staff     58 Jan 24  2016 cur/
-rw-rw-r--    1 vixie  staff     10 Jan 24  2016 dovecot-keywords
-rw-rw-r--    1 vixie  staff   3395 Oct  8  2015 dovecot-uidlist
-rw-rw-r--    1 vixie  staff   1816 Aug 13  2017 dovecot.index
-rw-rw-r--    1 vixie  staff  32300 Dec 16 00:28 dovecot.index.cache
-rw-rw-r--    1 vixie  staff    624 Jan 14 21:09 dovecot.index.log
drwxrwxr-x    2 vixie  staff      2 May 10  2015 new/
drwxrwxr-x    2 vixie  staff      2 Feb  5 23:51 tmp/

so, there are the cur, tmp, and new directories you mentioned earlier. every "tmp" and "new" subddirectory i have is empty, so i think the answer to your other question is, files migrate to "cur". i don't know if the migration happens at refile time or scan time. but it happens.

$ find .w.spam.zorch/cur -type f | head
.w.spam.zorch/cur/1431239882.M968023P59623.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239883.M007356P59635.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239883.M000846P59633.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M849429P59588.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M927216P59611.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M958171P59620.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M954796P59619.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M866142P59593.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M883220P59598.family.redbarn.org:2,a
.w.spam.zorch/cur/1431239882.M987748P59629.family.redbarn.org:2,a

whatever dovecot is doing, it's well behaved compared to other Maildir cognizant tools.

$ find .w.spam.zorch/cur -type f | xargs cat | grep ^Date: | head
Date: Mon, 16 Jul 2001 12:45:54 -0700
Date: 20 Aug 2002 19:05:53 -0400
Date: Sun, 5 Aug 2001 11:37:09 -0700 (PDT)
Date: Tue, 29 May 2001 10:19:28 -0700
Date: Fri, 13 Jul 2001 21:17:50 -0700
Date: Sun, 15 Jul 2001 12:21:00 -0700
Date: Sat, 14 Jul 2001 21:16:10 -0700
Date: Sun, 01 Jul 2001 00:20:12 -0700
Date: Wed, 11 Jul 2001 10:52:45 -0700 (PDT)
Date: Sun, 29 Jul 2001 18:27:01 -0700

i am somewhat alarmed that my contribution to melting the ice caps supports material this old, but future archeologists will certainly say of our era that we were packrats.

It's completely possible I am getting this wrong; please, corrections are
welcome.

nope. my fault entirely. dovecot. oops!

--
P Vixie


--
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to