I've been trying to get dovecot working with postfix with virtual domain setting. I noticed that if I started dovecot with "sudo /usr/sbin/dovecot", everything would work fine. But if I started with "sudo /etc/init.d/dovecot start", I would get the following permission error. I checked "ps -ef | grep dovecot" and didn't find anything different.
<br><br>Sep 29 16:54:35 localhost imap-login: Login: <a href="mailto:xyz@example.com">xyz@example.com</a> [::ffff:<a href="http://192.168.0.4">192.168.0.4</a>]<br>Sep 29 16:54:36 localhost imap(<a href="mailto:xyz@example.com">
xyz@example.com</a>): mkdir_parents(/var/spool<br>/virtual_mailboxes/example.com/xyz/.imap/INBOX) failed: Permission denied<br><br>Here's the directory for storing virtual domain email.<br><br>[localhost ~]$ sudo ls -al /var/spool/virtual_mailboxes/example.com
<br>total 24<br>drwx------ 3 vuser vuser 4096 Sep 29 16:43 . <br>drwxrwxr-x 3 root mail 4096 Sep 21 21:57 ..<br>drwx------ 3 vuser vuser 4096 Sep 29 16:55 xyz<br><br>[localhost ~]$ sudo ls -al /var/spool/virtual_mailboxes/example.com/xyz
<br>total 32<br>drwx------ 3 vuser vuser 4096 Sep 29 16:55 . <br>drwx------ 3 vuser vuser 4096 Sep 29 16:43 ..<br>-rw------- 1 vuser vuser 1209 Sep 29 19:10 Inbox