I can't get dovecot to ignore a certain directory/namespace when calculating quotas.

I am running dovecot 1.2.16 with vpopmail configured for quotas.

I use the dot (.) as my separator and my user structure is as follows:

../domain.com/user/Maildir  for all the user directories

I also have for each user:

../domain.com/user/Maildir/Archive which is a symlink to a NFS mounted partition that holds read-only archives

In dovecot.conf I have defined them as follows:


mail_location = maildir:~/Maildir

namespace private {
  separator = .
  prefix = ARCHIVE.
  inbox = no
  hidden = yes
  list = yes
  location = maildir:~/Maildir/Archive
}

namespace private {
  separator = .
  prefix =
  inbox = yes
}

This works very well, in as much as I see the Archive namespace and its folders.

The problem arises in the fact that Dovecot insists on calculating the 'Archive' namespace/directory storage towards the total storage used.

My Quota configuration is as follows:

auth default {
  mechanisms = plain login digest-md5 cram-md5

  passdb vpopmail {
    args = webmail=192.168.1.12
  }

  userdb vpopmail {
    args = quota_template=quota_rule3=*:backend=%q
  }
...
}

plugin {
quota = maildir
quota_rule = ?:storage=0
quota_rule2 = Archive:ignore
quota_rule3 = ARCHIVE:ignore
}

From what I've read, this is supposed to use the maildirsize file when available or otherwise return no quota. It worked just fine before this new Archive namespace.

For a certain user, vpopmail writes the 'maildirsize' file in ../domain.com/user/Maildir/maildirsize and it contains the correct value ( without the /Archive directory ).

The problem is that for some reason, something ( I suspect dovecot ) writes a new maildirsize file in ../domain.com/user/Maildir/Archive/maildirsize which also contains the size of Archive. Subsequently, Dovecot adds the two of them up and usually throws me over quota.

To test, I have emptied the maildirsize file under Archive and changed its owner to root (perms are 755 ) so that nobody but root can write to it. Dovecot complained right away about it:

Jul 19 12:55:21 pop1 dovecot: IMAP(u...@domain.com): open(/home/vpopmail/domains/B/domain.com/user/Maildir/Archive/maildirsize) failed: Permission denied

Despite passing the quota responsibility to vpopmail it seems that Dovecot still tries to update that file.

And finally the question... How do I get dovecot to not calculate a quota for that directory/namespace ?



Reply via email to