Discussion:
binc 1.2 / Maildir++ depot
Jerry Lundström
2005-08-25 08:16:27 UTC
Permalink
Recently we have been getting some serious problems with binc on our
imapservers.

This isnt flame but why is binc restricted to creating mailboxes under
INBOX<delimiter> ?

The most current problem is that ALL our new thunderbird clients can't
use Sent Drafts or Trash since they are common to be stored in the root
and not in INBOX.Sent .

I've been trying to find some draft or rfc that explains the default
setup of IMAP/Maildir folders but I can't find anything like that,
everything i find says its up to the implementation do deside.

So my question is, what are the reasons for restricting mailboxes
outside INBOX/ ?
--
Jerry Lundström, System Developer
Section for IT and Media, Stockholms University, Sweden
+46 (0)8 16 19 99 / http://www.it.su.se
Dr. Michael J. Chudobiak
2005-08-25 11:47:27 UTC
Permalink
Post by Jerry Lundström
The most current problem is that ALL our new thunderbird clients can't
use Sent Drafts or Trash since they are common to be stored in the root
and not in INBOX.Sent .
I've been trying to find some draft or rfc that explains the default
setup of IMAP/Maildir folders but I can't find anything like that,
everything i find says its up to the implementation do deside.
So my question is, what are the reasons for restricting mailboxes
outside INBOX/ ?
Jerry,

I don't know why maildir is limited to one root folder - but the
imapdir-type depot definitely isn't limited that way. I use TB +
binc/imapdir, and it works great.

Some related info:

http://lifewithbincimap.org/index.php/Main/ThunderbirdFolderSetup
http://www.bincimap.org/bincimap-faq.html#q14
http://www.bincimap.org/bincimap-imapdir.html

- Mike
Jerry Lundström
2005-08-25 12:14:38 UTC
Permalink
Post by Dr. Michael J. Chudobiak
I don't know why maildir is limited to one root folder - but the
imapdir-type depot definitely isn't limited that way. I use TB +
binc/imapdir, and it works great.
Before more ppl send info on IMAPdir, no, there is no option to switch
to that. This is not a handfull of accounts, we have over 40.000 accounts.

Even if IMAPdir support it, its not a reason why Maildir++ depot
shouldn't be able to support it also.
--
Jerry Lundström, System Developer
Section for IT and Media, Stockholms University, Sweden
+46 (0)8 16 19 99 / http://www.it.su.se
Henry Baragar
2005-08-25 14:12:15 UTC
Permalink
On Thu, 25 Aug 2005 08:14:38 -0400, Jerry Lundström
Post by Jerry Lundström
Post by Dr. Michael J. Chudobiak
I don't know why maildir is limited to one root folder - but the
imapdir-type depot definitely isn't limited that way. I use TB +
binc/imapdir, and it works great.
Technically you mean Maildir++ (from Courier, defined by
http://www.inter7.com/courierimap/README.maildirquota.html) and not just
Maildir (from qmail, described by
http://www.qmail.org/man/man5/maildir.html).
Post by Jerry Lundström
Before more ppl send info on IMAPdir, no, there is no option to switch
to that. This is not a handfull of accounts, we have over 40.000 accounts.
Even if IMAPdir support it, its not a reason why Maildir++ depot
shouldn't be able to support it also.
The IMAPdir design discussion provides lots of information about why
Maildir++ should not be able support top level level folders (siblings of
INBOX). Unfortunately, I can not find the mail archive with the
discussions.

Basically, the author of Maildir++ made a design decision to retain the
Maildir directory as the INBOX folder so that Courier (or any other imap
server that uses Maildir++) could be added to qmail installations without
having to make any configuration changes to qmail nor to dot-qamil
configuration files, which makes it very easy to add an IMAP server to an
existing qmail environment (particularly a large one, with say 40,000
accounts). In order to main a coherent mapping strategy and to prevent
name colisions between folders and Maildir (not Maildir++) mandatory files
(e.g. new, cur, tmp), IMAP folders are mapped to subirectories named after
the IMAP folder, but with a leading dot ("."). One of the consequences of
this is that one can not create a folder that is sibling to the INBOX
folder. This was one of the impetuses for creating a IMAPdir.

A different design decision was made for IMAPdir: the IMAP INBOX folder
maps to the "IMAPdir/INBOX" directory instead of the "Maildir/." directory
in order to avoid many of the limitations of the Maild++ design. The
consequence of this design decision is that the configuration of qmail
(and dot-qmail files) needs to be changed, OR symbolic links need to be
set up to map the old Maildir/Maildir++ configuration to the new IMAPdir
configuration (which can be confusing to users and a potential source of
errors).

You have two options:

1. Advise your Thunderbird clients to set their "IMAP server directory"
to "INBOX/", as follows:
-> Account Settings
-> Server Settings
-> [Advanced...]
This changes the mapping so that top-level IMAP folders get mapped
to subfolders of INBOX and makes Thunderbird's default folder
configuration work. Note that bincimap v1.3 will include the
IMAP NAMESPACE verb which will eliminate the need for users to
manually change the "IMAP server directory".

2. Convert to IMAPdir... here a sketch of a design that should work for
you
a. Insert a script into the bincimap invocation sequence that sets the
IMAP depot type depending on the existance of an IMAPdir directory
- this script also has to return a error to the client if the
Maildir has been chmod'ed to "+t", which is the mechanism used
to tell qmail to defer delivery.
b. Write a script that visits every account and does:
- chmod +t the Maildir (to prevent activity)
- runs Maildir++2IMAPdir.pl, which makes a Maildir a shadow of
IMAPdir
- chmod -t the Maildir
c. Convert dot-qmail files to use IMAPdir instead of Maildir
- for each account this can start as soon as the account has been
converted
- once an account has been converted, all new changes should
make use of IMAPdir
d. Change the configuration of qmail to deliver to IMAPdir/INBOX
by default (instead of Maildir)
e. Delete the Maildir shadow directories once the dot-qmail files
have been converted
- this can be done on an account by account basis
As suggested by step b, there should be little or no outage during
the conversion.


Regards,
Henry:-)
--
Henry Baragar
Instantiated Software Inc.
http://www.instantiated.ca
Jerry Lundström
2005-08-26 07:25:55 UTC
Permalink
Post by Henry Baragar
configuration work. Note that bincimap v1.3 will include the
IMAP NAMESPACE verb which will eliminate the need for users to
manually change the "IMAP server directory".
Thank you, that keyword was what i was looking for and found rfc 2342
which I now will patch into the 1.2 tree, any other solution isnt really
an option for us.
--
Jerry Lundström, System Developer
Section for IT and Media, Stockholms University, Sweden
+46 (0)8 16 19 99 / http://www.it.su.se
Andreas Aardal Hanssen
2005-08-30 20:34:01 UTC
Permalink
Post by Henry Baragar
configuration work. Note that bincimap v1.3 will include the
IMAP NAMESPACE verb which will eliminate the need for users to
manually change the "IMAP server directory".
Thank you, that keyword was what i was looking for and found rfc 2342 which I
now will patch into the 1.2 tree, any other solution isnt really an option for
us.
Good; A skeleton for NAMESPACE is already in 1.3 more or less, and that's
mostly for this reason - too many clients need Maildir++ and root level
folders at the same time.

But I don't understand how a client like Thunderbird has gotten away with
its Drafts/Sent mail restrictions for so long :-).

Andreas

--
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP | "It is better not to do something
http://www.bincimap.org/ | than to do it poorly."

Henry Baragar
2005-08-25 14:42:07 UTC
Permalink
On Thu, 25 Aug 2005 04:16:27 -0400, Jerry Lundström
Post by Jerry Lundström
Recently we have been getting some serious problems with binc on our
imapservers.
This isnt flame but why is binc restricted to creating mailboxes under
INBOX<delimiter> ?
The most current problem is that ALL our new thunderbird clients can't
use Sent Drafts or Trash since they are common to be stored in the root
and not in INBOX.Sent .
See my response in a later message in this thread.
Post by Jerry Lundström
I've been trying to find some draft or rfc that explains the default
setup of IMAP/Maildir folders but I can't find anything like that,
everything i find says its up to the implementation do deside.
I am unclear of your meaning; this might clear things up:
o IMAP is an Internet protocol defined by RFC:
- see http://www.faqs.org/rfcs/rfc3501.html for the latest spec
- it does not mention Maildir nor any other storage mechanisms
- althought it obliquely refers to mbox format
- it mandates exactly one folder, namely "INBOX"
- it does not mandate the implementation of more than one folder
- although it provides some rules if there is more than one
o Maildir is a storage format that supports one folder
o Maildir++ is a storage format that extends the Maildir format
to support more than one folder
- there are no standards for the organization Maildir++ folders
o In general folder organization is mostly driven by the IMAP clients
- the server may have restrictions on folder names and
organization, but does not normally provide any folders
beyond the one mandated by the RFC.
Post by Jerry Lundström
So my question is, what are the reasons for restricting mailboxes
outside INBOX/ ?
See my response in a later message in this thread.


Henry:-)
--
Henry Baragar
Instantiated Software Inc.
http://www.instantiated.ca
Loading...