[Dovecot] Mail storage creation fails with virtual users
So I have recently set up dovecot with a virtual users dovecot.passdb
file, but when I attempt to telnet in, it fails because my virtual
users don't have proper permissions to create mailboxes.
I don't want to have to create actual users for each email account.
Any idea as to what to do?
The error that dovecot logs:
dovecot: Dec 28 13:06:28 Error: IMAP(user1): mkdir_parents(/var/mail/
folders/user1) failed: Permission denied
dovecot: Dec 28 13:06:28 Error: IMAP(user1): Mail storage creation
failed with mail_location: mbox:/var/mail/folders/user1/:INBOX=/var/
mail/user1
dovecot: Dec 28 13:06:28 Error: child 27667 (imap) returned error 89
my [test] passdb file:
user1:{PLAIN}pass1:2001:2001:User 1 Name:/var/mail/folders/user1::
mail_plugins=cmusieve
user2:{PLAIN}pass2:2002:2002:User 2 Name:/var/mail/folders/user2::
mail_plugins=cmusieve
user3:{PLAIN}pass3:2003:2003:User 3 Name:/var/mail/folders/user3::
mail_plugins=cmusieve
user4:{PLAIN}pass4:2004:2004:User 4 Name:/var/mail/folders/user4::
mail_plugins=cmusieve
Conf settings: -bash-3.2# /usr/local/sbin/dovecot -n # 1.0.13: /usr/local/etc/dovecot.conf base_dir: /usr/local/var/run/ log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.info.log protocols: imap listen: *:143 ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/var/run//login login_executable: /usr/local/libexec/dovecot/imap-login login_greeting: Hi buddy, have an account ? max_mail_processes: 2048 verbose_proctitle: yes first_valid_uid: 1000 last_valid_uid: 5000 mail_location: mbox:/var/mail/folders/%u/:INBOX=/var/mail/%u mail_debug: yes mbox_read_locks: dotlock fcntl auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: passwd-file args: /usr/local/etc/dovecot.passdb userdb: driver: passwd-file args: /usr/local/etc/dovecot.passdb socket: type: listen master: path: /usr/local/var/run/dovecot-auth-master mode: 432 user: dovecot group: mail
On Mon, 2009-12-28 at 16:18 -0500, Scott H. W. Snyder wrote:
So I have recently set up dovecot with a virtual users dovecot.passdb
file, but when I attempt to telnet in, it fails because my virtual
users don't have proper permissions to create mailboxes.
Two possibilities:
a) Give it enough permissions (e.g. chmod 01777 /var/mail/folders)
b) Create the directories manually at the same time as creating new users.
I've tried the first, and it didn't work.
I'd rather not have to do the second. :(
On Dec 29, 2009, at 4:21 PM, Timo Sirainen wrote:
Two possibilities:
a) Give it enough permissions (e.g. chmod 01777 /var/mail/folders)
b) Create the directories manually at the same time as creating new users.
Maybe the specific command wasn't correct, but the "give it enough permissions" idea will work. If you upgrade to v1.2, it'll tell exactly what permission is missing and that could help figuring out what you need to change.
On 30.12.2009, at 0.33, Scott H. W. Snyder wrote:
I've tried the first, and it didn't work.
I'd rather not have to do the second. :(
On Dec 29, 2009, at 4:21 PM, Timo Sirainen wrote:
Two possibilities:
a) Give it enough permissions (e.g. chmod 01777 /var/mail/folders)
b) Create the directories manually at the same time as creating new users.
Could this have something to do with mail_extra_groups? Or
privileged group? I tried adding these in to no avail.
On Dec 29, 2009, at 4:21 PM, Timo Sirainen wrote:
Two possibilities:
a) Give it enough permissions (e.g. chmod 01777 /var/mail/folders)
b) Create the directories manually at the same time as creating new users.
Not really. mail_access_groups could give some extra security when combined with a proper version of a), but by itself it doesn't solve anything.
On 30.12.2009, at 0.40, Scott H. W. Snyder wrote:
Could this have something to do with mail_extra_groups? Or privileged group? I tried adding these in to no avail.
On Dec 29, 2009, at 4:21 PM, Timo Sirainen wrote:
Two possibilities:
a) Give it enough permissions (e.g. chmod 01777 /var/mail/folders)
b) Create the directories manually at the same time as creating new users.
participants (2)
-
Scott H. W. Snyder
-
Timo Sirainen