Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

so i poked around and found out that DEFDOMAIN="@domain.se" is messing things up, so i removed that from /etc/courier/imapd and i got to the point where SMTP work and i get this from the IMAP:

Jul  2 13:23:10 HOST authdaemond: Authenticated: sysusername=anton, sysuserid=<null>, sysgroupid=20001, homedir=/storage/vmail/anton, address=anton, fullname=Anton, maildir=<null>, quota=<null>, options=<null>
Jul  2 13:23:10 HOST authdaemond: Authenticated: clearpasswd=MyPasswd, passwd=$3e$04$AC1c10x0A3etWCJFrla.Rl2sevNhq24yXYxrq8IN7mEeGI20.
Jul  2 13:23:10 HOST imapd-ssl: anton: Account's mailbox directory is not owned by the correct uid or gid

But i'm not sure why because:

# ls -l /storage/vmail/
-rw-r--r--  1 vmail  vmail   22 Mar 13 01:06 .Xdefaults
-rw-r--r--  1 vmail  vmail  773 Mar 13 01:06 .cshrc
-rw-r--r--  1 vmail  vmail  398 Mar 13 01:06 .login
-rw-r--r--  1 vmail  vmail  113 Mar 13 01:06 .mailrc
-rw-r--r--  1 vmail  vmail  218 Mar 13 01:06 .profile
drwx------  2 vmail  vmail  512 Jun 30 10:44 .ssh
drwxr-xr-x  3 anton  anton  512 Jun 30 10:44 anton

my /etc/courier/imapd says:


But i've also tried:


And /etc/passwd states:

# cat /etc/passwd | grep anton                                                                                                                                                                                 

Where am i going wrong?

share|improve this question
up vote 1 down vote accepted

Ok so the good guys over at daemonforums.org solved it for me!

Disabled IMAP_MAILBOX_SANITY_CHECK=0 in /etc/courier/imapd and added that exact same line to /etc/courier/imapd-ssl did the trick.

Also not sure if it helped or if it would have worked anyway i did: maildirmake /storage/vmail/anton/Maildir which is the Maildir for my account, obviously the path will differ from anyone tracing my footsteps in this issue.

share|improve this answer

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.