[Dovecot] Double Maildir folders.

Bruce Markey bruce at secryption.com
Thu Sep 12 01:29:30 EEST 2013


Somehow in setting up quotas and sieve I somehow doubled my maildir. I 
noticed that when I logged into my webmail I didn't see the folders I 
created.  I went to the actual location and noticed this.

Mail location is set correctly in 10-mail.conf
mail_location = maildir:/var/vmail/%d/%n/Maildir


So I went to /var/vmail/domain/user and saw:
drwx------  8 vmail vmail 4.0K Sep 11 22:08 .
drwx------  4 vmail vmail 4.0K Sep 10 18:40 ..
drwx------  5 vmail vmail 4.0K Sep 11 22:04 .Sent
lrwxrwxrwx  1 vmail vmail   21 Sep 11 15:44 .dovecot.sieve -> 
sieve/roundcube.sieve
-rw-------  1 vmail vmail  199 Sep 11 15:45 .dovecot.svbin
drwx------ 10 vmail vmail 4.0K Sep 11 18:40 Maildir
drwx------  2 vmail vmail 4.0K Sep 11 19:46 cur
-rw-------  1 vmail vmail   51 Sep 11 19:47 dovecot-uidlist
-rw-------  1 vmail vmail    8 Sep 11 19:47 dovecot-uidvalidity
-r--r--r--  1 vmail vmail    0 Sep 11 19:46 dovecot-uidvalidity.5230c8a2
-rw-------  1 vmail vmail  248 Sep 11 19:47 dovecot.index.log
-rw-------  1 vmail vmail   24 Sep 11 19:47 dovecot.mailbox.log
-rw-------  1 vmail vmail   15 Sep 11 22:08 maildirsize
drwx------  2 vmail vmail 4.0K Sep 11 19:46 new
drwx------  3 vmail vmail 4.0K Sep 11 15:44 sieve
-rw-------  1 vmail vmail    5 Sep 11 19:47 subscriptions
drwx------  2 vmail vmail 4.0K Sep 11 19:46 tmp

Which I shouldn't see correct? Because then in 
/var/vmail/domain/user/Maildir I see.

drwx------ 10 vmail vmail 4.0K Sep 11 18:40 .
drwx------  8 vmail vmail 4.0K Sep 11 22:08 ..
drwx------  5 vmail vmail 4.0K Sep 10 00:23 .Drafts
drwx------  5 vmail vmail 4.0K Sep 11 15:45 .Sent
drwx------  5 vmail vmail 4.0K Sep 10 01:08 .Spam
drwx------  5 vmail vmail 4.0K Sep 11 15:46 .Test Folder
drwx------  5 vmail vmail 4.0K Sep 11 15:57 .Trash
drwx------  2 vmail vmail 4.0K Sep 11 01:37 cur
-rw-------  1 vmail vmail   52 Sep 11 09:17 dovecot-uidlist
-rw-------  1 vmail vmail    8 Sep 11 15:45 dovecot-uidvalidity
-r--r--r--  1 vmail vmail    0 Sep 10 00:17 dovecot-uidvalidity.522e6523
-rw-------  1 vmail vmail  600 Sep 10 23:08 dovecot.index
-rw-------  1 vmail vmail  39K Sep 11 01:37 dovecot.index.cache
-rw-------  1 vmail vmail  21K Sep 11 09:17 dovecot.index.log
-rw-------  1 vmail vmail  120 Sep 11 15:44 dovecot.mailbox.log
-rw-------  1 vmail vmail   20 Sep 11 18:40 maildirsize
drwx------  2 vmail vmail 4.0K Sep 11 00:16 new
-rw-------  1 vmail vmail   35 Sep 11 15:44 subscriptions
drwx------  2 vmail vmail 4.0K Sep 11 00:13 tmp

I went through all the conf files under /etc/dovecot/conf. and made sure 
I hadn't missed something. As above the maildir is correct.

The only two places I can think are 90-plugin.conf which are my sieve 
settings.
plugin {

    # The location of the user's active script:
    sieve = ~/.dovecot.sieve

    # If the user has no personal active script (i.e. if the file
    # indicated in sieve= does not exist), use this one:
    sieve_global_path = /var/lib/dovecot/sieve/default.sieve

    # The include extension fetches the :personal scripts from this
    # directory. When ManageSieve is used, this is also where scripts
    # are uploaded.
    sieve_dir = ~/sieve

    # The include extension fetches the :global scripts from this
    # directory.
    sieve_global_dir = /var/lib/dovecot/sieve/global/
}
But I don't see how that would affect it.

And the password and user queries were changed for the quotas.

password_query = SELECT username AS user, password,CONCAT('/var/vmail/', 
maildir) AS userdb_home,\
     '5000' AS userdb_uid, '5000' AS userdb_gid,\
     concat('*:storage=', quota) AS userdb_quota_rule\
     FROM mailbox WHERE username='%u' AND domain='%d' AND active=1

user_query = SELECT CONCAT('/var/vmail/', maildir) AS home, 'maildir:~/' 
as mail, '5000' AS uid,    '5000' AS gid,\
     concat('*:storage=', quota) AS quota_rule\
     FROM mailbox WHERE username='%u' AND domain='%d' AND active=1

maildir in the mailbox is domain/user/   <- do I have to concat on 
Maildir in the query?


Thanks
Bruce


-- 
Please use PGP, ENCRYPT everything.
For information about acquiring a secryption.com account, email me.

My public key: https://www.secryption.com/BruceMarkey.asc   or
                https://keyserver.pgp.com


More information about the dovecot mailing list