Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

ubuntu 11.10 32bit. Setup a dovecot imap server. Using Thunderbird on a different ubuntu machine (64bit) to access imap server. Everything else is fine, except I can not compact the deleted email in inbox, which is stored at /var/mail/username. Checking mail.log and I see this error message:

Apr  3 00:10:11 autumn dovecot: imap(username): Error: file_dotlock_create(/var/mail/username) failed: Permission denied (euid=1000(username) egid=1000(username) missing +w perm: /var/mail, euid is not dir owner) (set mail_privileged_group=mail)

what is wrong with the permission? Here are the permissions for the relevant files:

$ ls -ld /var/mail
drwxrwsr-x 2 mail mail 4096 2012-04-02 23:36 /var/mail

$ ls -l /var/mail/username
-rw------- 1 username mail 417 2012-04-02 23:36 /var/mail/username

Anyone knows what's going on here?

share|improve this question
I went into /etc/dovecot/conf.d/10-mail.conf, added the group mail to the line "mail_privileged_group = ", stop dovecot, and then start dovecot. It works now. Although I wish this was documented somewhere. – G. He Apr 3 '12 at 11:56
It is documented here. Please convert your comment to an answer and accept it so that this question is not left hanging without an answer. – Celada Apr 4 '12 at 16:26
up vote 3 down vote accepted

I went into /etc/dovecot/conf.d/10-mail.conf, added the group mail to the line "mail_privileged_group = ", stop dovecot, and then start dovecot. It works now.

As pointed out by Celada, it is documented here.

share|improve this answer

I will write as to correct it on steps. I test it Debian 8 and ubuntu server 14.04.

  1. sudo nano /etc/dovecot/conf.d/10-mail.conf
  2. change parameter #mail_privileged_group or mail_privileged_group = mai
  3. Ctrlo
  4. Ctrlx
  5. sudo service dovecot restart
  6. Profit!
share|improve this answer
This answer should be edited to be completely in English. – Nattgew Jan 7 at 2:15
This is the same as this older answer. Also, please use text to include textual information – not images. – David Foerster Jan 7 at 11:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.