To give some more points of reference about some of the issues we are 
discussing, I took a look at dovecot (http://freshmeat.net/projects/dovecot/)

Dovecot supports preauthentication:

...
[EMAIL PROTECTED] dovecot-0.99.8.1]$ ./src/imap/imap
* PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND 
UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED] Logged in as 
charlieb
...

You can create top level (peer of INBOX) folders:

001 create foo
001 OK Create completed.
002 list "" *
* LIST (\NoInferiors \UnMarked) "/" "INBOX"
* LIST (\NoInferiors \UnMarked) "/" "sent-mail"
* LIST (\NoInferiors \UnMarked) "/" "saved-messages"
* LIST (\NoInferiors \UnMarked) "/" "foo"
002 OK List completed.

You can't create a subfolder of a folder

003 create foo/bar
003 NO Mailbox parent doesn't allow inferior mailboxes.

But you can create a subfolder of INBOX

003 create INBOX/foo
003 OK Create completed.

You can create a folder heirarchy;

004 create bar/foo
004 OK Create completed.

But once a directory is a container for subfolders, it can't be a folder:

005 create bar
005 NO Mailbox exists.
006 select bar
006 NO Mailbox isn't selectable: bar

Here's where the mailstore is laid out:

[EMAIL PROTECTED] charlieb]$ ls -laR ~/mail
/home/charlieb/mail:
total 28
drwx------    5 charlieb charlieb     4096 Mar 12 18:14 .
drwx------   55 charlieb charlieb     4096 Mar 12 15:12 ..
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:02 bar
-rw-rw----    1 charlieb charlieb        0 Mar 12 18:01 foo
drwxrwx---    3 charlieb charlieb     4096 Mar 12 18:00 .imap
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:13 INBOX
-rw-rw----    1 charlieb charlieb        0 Mar 12 18:14 INBOX.foo
-rw-------    1 charlieb charlieb      511 Feb 15  2003 saved-messages
-rw-------    1 charlieb charlieb      511 Feb 15  2003 sent-mail

/home/charlieb/mail/bar:
total 8
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:02 .
drwx------    5 charlieb charlieb     4096 Mar 12 18:14 ..
-rw-rw----    1 charlieb charlieb        0 Mar 12 18:02 foo

/home/charlieb/mail/.imap:
total 12
drwxrwx---    3 charlieb charlieb     4096 Mar 12 18:00 .
drwx------    5 charlieb charlieb     4096 Mar 12 18:14 ..
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:00 INBOX

/home/charlieb/mail/.imap/INBOX:
total 36
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:00 .
drwxrwx---    3 charlieb charlieb     4096 Mar 12 18:00 ..
-rw-rw----    1 charlieb charlieb        5 Mar 12 18:00 .customflags
-rw-rw----    1 charlieb charlieb     1608 Dec  1  2002 .imap.index
-rw-rw----    1 charlieb charlieb    10264 Mar 12 18:00 .imap.index.data
-rw-rw----    1 charlieb charlieb     2576 Mar 12 18:00 .imap.index.log
-rw-rw----    1 charlieb charlieb     1556 Mar 12 18:00 .imap.index.tree

/home/charlieb/mail/INBOX:
total 8
drwxrwx---    2 charlieb charlieb     4096 Mar 12 18:13 .
drwx------    5 charlieb charlieb     4096 Mar 12 18:14 ..
-rw-rw----    1 charlieb charlieb        0 Mar 12 18:13 foo
[EMAIL PROTECTED] charlieb]$ 


The above doesn't match the documentation, which says:

 We support Courier-compatible Maildir++. INBOX is the ~/Maildir directory,
 all the other folders named as ".<folder>.<subfolder>.<etc>" under it, 
 any directories not starting with a dot are simply ignored.".

I have my doubts about INBOX as well:

001 select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1899586815] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
001 OK [READ-WRITE] Select completed.
002 logout
* BYE Logging out
002 OK Logout completed.
[EMAIL PROTECTED] charlieb]$ ls ~/Maildir/cur | wc -l
   5826
[EMAIL PROTECTED] charlieb]$ 

I couldn't find any documentation about how to run dovecot - the INSTALL 
file only says how to build it. From reading design.txt, it seems that a 
daemon running as root accepts connections, and spawns multiple 
communicating processes to service them. These processes do login+SSL, 
auth and imap respectively.

I find it interesting that yet another IMAP server author has created
their own network connectivity and authentication infrastructure. The 
dovecot author has broken things down into pieces, but it looks like 
those pieces may be tied together in such a way that you need to take the 
whole package.

--
Charlie

Reply via email to