Re: Handle of "subscription" file/folder for IMAP
On 11/21/2014 06:03 PM, Jorge Bastos wrote:
OK that's better, the screenshot helps too. There are a number of funny things here. First of all, dovecot.sieve belongs in the *home* directory, not in Maildir. The home directory can be, typically, the parent directory of the Maildir. Like in: domains/example.com/user1/Maildir - the user1/ is the home directory and dovecot.sieve lives there.
Would you please post your complete dovecot config (output of the command: dovecot -n) and also an example output of ls -la of your directory structure?
See also http://dovecot.org/mailinglists.html Sure, here it is:
From conf.d/10-mail.conf:
# By default LIST command returns all entries in maildir beginning with a dot. # Enabling this option makes Dovecot return only entries which are directories. # This is done by stat()ing each entry, so it causes more disk I/O. # (For systems setting struct dirent->d_type, this check is free and it's # done always regardless of this setting) #maildir_stat_dirs = no
So basically the behavior is "correct" in your case. You have the directory entries .dovecot.sieve and .subscriptions, which is anyway a directory indeed, so that's not even a bug. Move all your maildirs to /home/mail/%d/%u/Maildir and then update mail_location accordingly. Then move out the sieve files - .dovecot.sieve, sieve/, .dovecot.sieve.log, .dovecot.svbin to the home directory.
It looks like these are not system users, so you may need to set mail_home explicitly to set up the home directory to /home/mail/%d/%u
See http://wiki2.dovecot.org/MailLocation http://wiki2.dovecot.org/MailLocation/Maildir http://wiki2.dovecot.org/VirtualUsers/Home
root@fastmail:/home/mail/a.com/a@a.com# l total 108 drwx------ 13 5000 5000 4096 Nov 20 22:19 ./ drwx------ 3 5000 5000 4096 Nov 3 23:06 ../ drwx------ 2 5000 5000 4096 Nov 20 22:07 cur/ -rw------- 1 5000 5000 9920 Nov 21 03:25 dovecot.index.cache -rw------- 1 5000 5000 12908 Nov 20 22:19 dovecot.index.log -rw------- 1 5000 5000 202 Nov 10 22:35 .dovecot.lda-dupes -rw------- 1 5000 5000 312 Nov 10 22:23 dovecot.mailbox.log lrwxrwxrwx 1 5000 5000 23 Nov 9 12:21 .dovecot.sieve -> sieve/managesieve.sieve -rw------- 1 5000 5000 461 Nov 9 12:28 .dovecot.sieve.log -rw------- 1 5000 5000 270 Nov 9 15:43 .dovecot.svbin -rw------- 1 5000 5000 782 Nov 19 23:26 dovecot-uidlist -rw------- 1 5000 5000 8 Nov 8 16:32 dovecot-uidvalidity -r--r--r-- 1 5000 5000 0 Nov 3 23:06 dovecot-uidvalidity.54580a72 drwx------ 5 5000 5000 4096 Nov 8 16:33 .Drafts/ drwx------ 5 5000 5000 4096 Nov 8 16:33 .Junk/ drwx------ 5 5000 5000 4096 Nov 8 18:50 .Junk E-mail/ drwx------ 2 5000 5000 4096 Nov 19 23:44 new/ drwx------ 5 5000 5000 4096 Nov 8 16:33 .ola ' aaaa \r/ drwx------ 5 5000 5000 4096 Nov 8 16:33 .Sent Items/ drwx------ 3 5000 5000 4096 Nov 9 15:42 sieve/ -rw------- 1 5000 5000 69 Nov 10 22:23 subscriptions drwx------ 5 5000 5000 4096 Nov 8 21:15 .subscriptions/ drwx------ 2 5000 5000 4096 Nov 19 23:26 tmp/ drwx------ 5 5000 5000 4096 Nov 8 21:15 .Trash/ root@fastmail:/home/mail/a.com/a@a.com#
doveconf: # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 3.14.23x x86_64 Debian 7.6 ext4 auth_mechanisms = plain login dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no listen = * login_greeting = myserver mail_location = maildir:/home/mail/%d/%u mail_plugins = quota mail_privileged_group = mail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { quota = dict:User Quota::proxy::sqlquota quota_exceeded_message = Quota exceeded (mailbox for user is full) / Conta de destino cheia (o email de destino tem a caixa cheia) quota_rule = *:storage=100M sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_max_script_size = 10M } postmaster_address = trash@email.pt protocols = imap lmtp pop3 sieve service dict { unix_listener dict { mode = 0777 } } service imap { process_limit = 1024 } service lmtp { inet_listener lmtp { address = 0.0.0.0 port = 24 } process_min_avail = 10 unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0666 user = postfix } } service pop3-login { inet_listener pop3 { port = 110 } } service pop3 { process_limit = 1024 } ssl = no ssl_cert =
So basically the behavior is "correct" in your case. You have the directory entries .dovecot.sieve and .subscriptions, which is anyway a directory indeed, so that's not even a bug. Move all your maildirs to /home/mail/%d/%u/Maildir and then update mail_location accordingly. Then move out the sieve files - .dovecot.sieve, sieve/, .dovecot.sieve.log, .dovecot.svbin to the home directory.
It looks like these are not system users, so you may need to set mail_home explicitly to set up the home directory to /home/mail/%d/%u
I was not saying it was a bug, was just asking for some advice on this :)
But yes, I've read this some times but didn't noticed the end of the mail_location. Understood and thanks for this!
I still have only a few users so I can convert them, as I don't want to use the below option:
maildir_stat_dirs = no
Thanks for your help,
participants (2)
-
Gedalya
-
Jorge Bastos