[Dovecot] Maildir structure question
Hello,
About the INBOX location when using maildir, in the wiki, http://wiki.dovecot.org/MailboxFormat/Maildir, I can read:
" Directory Structure
~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the messages for INBOX. The tmp directory is used during delivery, new messages arrive in new and read shall be moved to cur by the clients. "
But in my Maildir, I see this:
niko@petole:~$ ls -la Maildir/ total 144 drwxr-xr-x 35 niko niko 4096 2009-02-06 08:37 . drwxr-xr-x 25 niko niko 4096 2009-02-06 10:26 .. drwxr-xr-x 5 niko niko 4096 2009-02-06 09:16 .INBOX ...
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
My configuration:
petole:~# dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28.3 i686 Debian 4.0 ssl_cert_file: /etc/ssl/certs/petole.demisel.net.pem ssl_key_file: /etc/ssl/private/petole.demisel.net.pem login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_location: maildir:~/Maildir namespace: type: private separator: / list: yes subscriptions: yes auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384
-- Nicolas
Nicolas KOWALSKI schrieb:
Hello,
About the INBOX location when using maildir, in the wiki, http://wiki.dovecot.org/MailboxFormat/Maildir, I can read:
" Directory Structure
~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the messages for INBOX. The tmp directory is used during delivery, new messages arrive in new and read shall be moved to cur by the clients. "
But in my Maildir, I see this:
niko@petole:~$ ls -la Maildir/ total 144 drwxr-xr-x 35 niko niko 4096 2009-02-06 08:37 . drwxr-xr-x 25 niko niko 4096 2009-02-06 10:26 .. drwxr-xr-x 5 niko niko 4096 2009-02-06 09:16 .INBOX ...
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
The namespace and folder structure needs to be reflected in Maildir - I presume that namespace configuration also has a say in the layout. For me, who runs Dovecot without namespace configuration, Dovecot has the layout you expect. So I'd say it's the namespace configuration that causes INBOX to appear as a subdirectory of Maildir/.
http://www.inter7.com/courierimap/README.maildirquota.html - see under "Definitions, and goals".
My configuration:
petole:~# dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28.3 i686 Debian 4.0 ssl_cert_file: /etc/ssl/certs/petole.demisel.net.pem ssl_key_file: /etc/ssl/private/petole.demisel.net.pem login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_location: maildir:~/Maildir namespace: type: private separator: / list: yes subscriptions: yes auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384
On Fri, Feb 06, 2009 at 11:32:41AM +0100, Matthias Andree wrote:
Nicolas KOWALSKI schrieb:
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
The namespace and folder structure needs to be reflected in Maildir - I presume that namespace configuration also has a say in the layout. For me, who runs Dovecot without namespace configuration, Dovecot has the layout you expect. So I'd say it's the namespace configuration that causes INBOX to appear as a subdirectory of Maildir/.
Well, I expected the namespace to change the folder layout presentation to the IMAP client, not to modify the underlying folder layout.
Thanks for your reply,
Nicolas
On Fri, 2009-02-06 at 11:15 +0100, Nicolas KOWALSKI wrote:
~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the messages for INBOX. The tmp directory is used during delivery, new messages arrive in new and read shall be moved to cur by the clients. "
Right.
But in my Maildir, I see this:
niko@petole:~$ ls -la Maildir/ total 144 drwxr-xr-x 35 niko niko 4096 2009-02-06 08:37 . drwxr-xr-x 25 niko niko 4096 2009-02-06 10:26 .. drwxr-xr-x 5 niko niko 4096 2009-02-06 09:16 .INBOX ...
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
No, it's not expected. And you mean Dovecot actually finds the mails from the .INBOX? I don't really see how/why it would with your configuration.
On Fri, Feb 06, 2009 at 03:15:17PM -0500, Timo Sirainen wrote:
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
No, it's not expected. And you mean Dovecot actually finds the mails from the .INBOX? I don't really see how/why it would with your configuration.
Yes, dovecot find the mails in INBOX from ~/Maildir/.INBOX . The deliver tool also stores incoming mail in this folder.
If you want, I have strace output of a sample deliver run.
-- Nicolas
On Fri, 2009-02-06 at 21:50 +0100, Nicolas KOWALSKI wrote:
On Fri, Feb 06, 2009 at 03:15:17PM -0500, Timo Sirainen wrote:
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
No, it's not expected. And you mean Dovecot actually finds the mails from the .INBOX? I don't really see how/why it would with your configuration.
Yes, dovecot find the mails in INBOX from ~/Maildir/.INBOX . The deliver tool also stores incoming mail in this folder.
If you want, I have strace output of a sample deliver run.
Better than strace would be to set mail_debug=yes and show the logs.
On Fri, Feb 06, 2009 at 05:14:16PM -0500, Timo Sirainen wrote:
On Fri, 2009-02-06 at 21:50 +0100, Nicolas KOWALSKI wrote:
On Fri, Feb 06, 2009 at 03:15:17PM -0500, Timo Sirainen wrote:
There are no 'cur', 'new' and 'tmp' directories in ~/Maildir, as written in the wiki, but instead this .INBOX directory which contains these 'cur', 'new' and 'tmp'.
Is this expected ? Thanks.
No, it's not expected. And you mean Dovecot actually finds the mails from the .INBOX? I don't really see how/why it would with your configuration.
Yes, dovecot find the mails in INBOX from ~/Maildir/.INBOX . The deliver tool also stores incoming mail in this folder.
If you want, I have strace output of a sample deliver run.
Better than strace would be to set mail_debug=yes and show the logs.
Here are the logs for a deliver run:
Feb 7 10:01:20 petole deliver(niko): Loading modules from directory: /usr/lib/dovecot/modules/lda Feb 7 10:01:20 petole deliver(niko): Module loaded: /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so Feb 7 10:01:20 petole deliver(niko): Namespace: type=private, prefix=, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes Feb 7 10:01:20 petole deliver(niko): maildir: data=/home/niko/Maildir Feb 7 10:01:20 petole deliver(niko): maildir++: root=/home/niko/Maildir, index=, control=, inbox= Feb 7 10:01:20 petole deliver(niko): cmusieve: Using sieve path: /home/niko/.dovecot.sieve Feb 7 10:01:20 petole deliver(niko): cmusieve: Executing script /home/niko/.dovecot.sievec Feb 7 10:01:20 petole deliver(niko): msgid=20090207090120.5BA2E8425@petole.demisel.net: saved mail to INBOX
Here are the logs when using Alpine:
Feb 7 10:02:49 petole dovecot: IMAP(niko): Effective uid=1000, gid=1000, home=/home/niko Feb 7 10:02:49 petole dovecot: IMAP(niko): Namespace: type=private, prefix=, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes Feb 7 10:02:49 petole dovecot: IMAP(niko): maildir: data=~/Maildir Feb 7 10:02:49 petole dovecot: IMAP(niko): maildir++: root=/home/niko/Maildir, index=, control=, inbox= Feb 7 10:02:49 petole dovecot: imap-login: Login: user=<niko>, method=PLAIN, rip=192.168.0.1, lip=192.168.0.1, TLS
My current configuration:
petole:~# dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28.3 i686 Debian 4.0 ssl_cert_file: /etc/ssl/certs/petole.demisel.net.pem ssl_key_file: /etc/ssl/private/petole.demisel.net.pem login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_location: maildir:~/Maildir mail_debug: yes namespace: type: private separator: / list: yes subscriptions: yes auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384
-- Nicolas
On Feb 7, 2009, at 4:06 AM, Nicolas KOWALSKI wrote:
Yes, dovecot find the mails in INBOX from ~/Maildir/.INBOX . The
deliver tool also stores incoming mail in this folder. .. namespace: type: private separator: / list: yes subscriptions: yes
Oh, right, now I get it. You don't have inbox=yes set. Perhaps it
should do it automatically or give an error message..
On Sun, Feb 08, 2009 at 03:44:44PM -0500, Timo Sirainen wrote:
On Feb 7, 2009, at 4:06 AM, Nicolas KOWALSKI wrote:
Yes, dovecot find the mails in INBOX from ~/Maildir/.INBOX . The
deliver tool also stores incoming mail in this folder. .. namespace: type: private separator: / list: yes subscriptions: yesOh, right, now I get it. You don't have inbox=yes set. Perhaps it should do it automatically or give an error message..
That's it. With inbox=yes set in the namespace configuration, dovecot finds and stores mail from/in INBOX in ~/Maildir/(cur|new|tmp).
Thanks a lot Timo,
Nicolas
participants (3)
-
Matthias Andree
-
Nicolas KOWALSKI
-
Timo Sirainen