Re: [exim] Planning MBOX to MAILDIR Migration

Pàgina inicial
Delete this message
Reply to this message
Autor: W B Hacker
Data:  
A: exim users
Assumptes nous: [exim] MBOX to MAILDIR Migration - Any last minute tips?
Assumpte: Re: [exim] Planning MBOX to MAILDIR Migration
Jakob Hirsch wrote:
> Quoting W B Hacker:
>
>>>> The 'classical' has them as subdirs under .INBOX, and/or further
>>>> subdirs under subdirs etc. ad (some finite, but arbitrarily large, OS
>>>> & fs-sepcific) limit.
>>> Can folders have subfolders, defined in a recursive fashion? The answer
>>> is no.
>> I'd have to re-install it to determine if it will *present* it if it
>> finds it in place (created by Exim, for example), but I suspect it will
>> do so.
>> Dovecot certainly does, and it is not alone. Some others do not.
>
> This is not true (at least for the current rc, but it would surprise me
> if this was different in a previous version).
>


'Oh yee of little faith...'

;-)

That was two successive 'ls' outputs from a bash shell.

Note from the command issued that we were 'boring down' one level.

>> conducive# ls /data/mail/conducive.org/wbh/Maildir
>
> reformatted to match the layout in your MUA:
>
>> .INBOX
>> .INBOX.Suspect
>> .Sent
>> .Trash
>> .Suspect
>


Look at the second list.

> I don't see any folder having a subfolder. Even if there were, they are
> obviously not shown in your MUA. You just proved yourself wrong.
>


I'm not here for the argument.

I've been *using* this for years, and it may be 'of interest' to other Exim
users, especially for group working, shared folders, archive browsing, et al,
where a subdir structure makes it easier to manage access rights, apply
softlinks, et al.

To be clear, here it is with the 'ls -lF' flag in gruesome detail.

(UID:GID are not those we actually use)

First level: Note the initial 'd' and final '/' indicating directory

Note also dir perm diffs - needed to permit search and traversal of
lower-levels. Clear now?

conducive# ls -lF /data/mail/conducive.org/wbh/Maildir
total 2780
drwx------  2 exim  mail      512 May 25  2006 .INBOX/
drwx------  5 exim  mail      512 Jan 27 11:59 .INBOX.Suspect/
drwx------  5 exim  mail      512 Jan 25 09:18 .Sent/
drwxrwx---  5 exim  mail      512 Mar  5 03:13 .Suspect/
drwx------  5 exim  mail      512 Jan 11 16:37 .Trash/
-rw-------  1 exim  mail      106 Apr 15  2006 .customflags
-rw-------  1 exim  mail       33 Apr 17  2006 .subscriptions
drwxrwx---  2 exim  mail   140800 Mar  5 03:19 cur/
-rw-------  1 exim  mail      118 Jan  3 13:48 dovecot-keywords
-rw-------  1 exim  mail   123228 Mar  5 03:10 dovecot-uidlist
-rw-------  1 exim  mail    40280 Mar  5 03:21 dovecot.index
-rw-------  1 exim  mail  2298880 Mar  5 03:10 dovecot.index.cache
-rw-------  1 exim  mail    52432 Mar  5 03:21 dovecot.index.log
-rw-------  1 exim  mail   136860 Feb 27 02:48 dovecot.index.log.2
drwxrwx---  2 exim  mail      512 Mar  5 03:10 new/
-rw-------  1 exim  mail       39 May 29  2006 subscriptions
drwxrwx---  2 exim  mail      512 Mar  5 03:05 tmp/



Step two - we look at one of those above, '.Suspect' as was shown in the screenshot:

conducive# ls -lF /data/mail/conducive.org/wbh/Maildir/.Suspect
total 570
-rw-------  1 exim  mail      49 Apr 18  2006 .customflags
-rw-------  1 exim  mail    1608 May 28  2006 .imap.index
-rw-------  1 exim  mail   22350 May 28  2006 .imap.index.data
-rw-------  1 exim  mail    2576 Apr 16  2006 .imap.index.log
-rw-------  1 exim  mail    1556 May 28  2006 .imap.index.tree
drwxrwx---  2 exim  mail   21504 Mar  5 03:10 cur/
-rw-------  1 exim  mail      63 Dec 16 05:22 dovecot-keywords
-rw-------  1 exim  mail   17532 Mar  5 03:10 dovecot-uidlist
-rw-------  1 exim  mail    6464 Mar  5 03:13 dovecot.index
-rw-------  1 exim  mail  333824 Mar  5 03:11 dovecot.index.cache
-rw-------  1 exim  mail    1176 Mar  5 03:13 dovecot.index.log
-rw-------  1 exim  mail  131144 Mar  3 19:02 dovecot.index.log.2
drwxrwx---  2 exim  mail     512 Mar  5 03:10 new/
drwxrwx---  2 exim  mail     512 Mar  5 03:10 tmp/


> Or did you mean IMAP subfolders?


What else?

POP only has one 'bucket' - the INBOX.

A single (indexed) flat-file in MBox format.
Bit more complex in Maildr. Has subdirs, even.

Anything else is ordinarily the work of an imapd and client.

Note ~/.INBOX.Suspect/ as well as .Suspect, above and on the screenshot.

> That's what the separator is used for


The 'dot' ing convention for sub <whatever>, instead of '/' or '\' allows for
cross-platform use as it works 'after a fashion' on DOS and Unix as well as 'Big
Iron' .... where a 'dot' is (the equivalent of) a 'subdirectory'.

That - and 'hiding' files from the unprivileged on certain OS, is all it
accomplishes.

> (mentioned in the quoted part you *snip*ped away). It's pretty obvious
> that IMAP subfolders are not represented by file system subfolders.
>


It should be "pretty obvious" from the 'ls' output, that some of these most
certainly *are* subfolders, and that the one chosen for illustration has further
subfolders.... Maildirs are like that.

Engage eyeballs bedore putting keyboard in gear.

;-)

Bill