[Dovecot] dovecot/postfix+vda

Neil Wilson neilw at dcdata.co.za
Wed Sep 5 17:41:59 EEST 2007


Hi guys,

Been fighting with postfix+vda/dovecot/

My postfix delivers the emails to /vmail/ which is owned by user 
maild:users 501(uid):100(gid) without any problems.

When I...

# telnet localhost 110
+OK Dovecot ready.
user samichand
+OK
pass wordpass
+OK Logged in.
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to 
server log for more information. [2007-09-05 16:32:52]
Connection closed by foreign host.

I get...

Sep  5 16:32:52 mail dovecot: pop3-login: Login: user=<samichand>, 
method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Sep  5 16:32:52 mail dovecot: POP3(samichand): Effective uid=4841, gid=27021
Sep  5 16:32:52 mail dovecot: POP3(samichand): maildir: 
data=/vmail/samichand/Maildir
Sep  5 16:32:52 mail dovecot: POP3(samichand): maildir: 
root=/vmail/samichand/Maildir, index=/vmail/samichand/Maildir, control=, 
inbox=
Sep  5 16:32:52 mail dovecot: POP3(samichand): 
stat(/vmail/samichand/Maildir/cur) failed: Permission denied
Sep  5 16:32:52 mail dovecot: POP3(samichand): 
stat(/vmail/samichand/Maildir/cur) failed: Permission denied
Sep  5 16:32:52 mail dovecot: POP3(samichand): Couldn't open INBOX: 
Internal error occurred. Refer to server log for more information. 
[2007-09-05 16:32:52]
Sep  5 16:32:52 mail dovecot: POP3(samichand): Couldn't open INBOX 
top=0/0, retr=0/0, del=0/0, size=0

In my mail log.

Below is my dovecot.conf

mail:/ # cat /usr/local/etc/dovecot.conf
base_dir = /var/run/dovecot/
protocols = imap pop3
listen = *
disable_plaintext_auth = no
ssl_disable = yes
mail_location = maildir:/vmail/%u/Maildir
mail_debug = yes

protocol imap {
}
protocol pop3 {
   pop3_uidl_format = %v.%u
}
protocol lda {
   postmaster_address = postmaster at bla.co.za
}
auth default {
   mechanisms = plain
   passdb shadow {
   }
   userdb passwd {
   }
   user = root
}
dict {
}
plugin {
}

If I change the ownership on the Maildir to the user:users then I can 
log in, but then postfix doesn't deliver successfully.

I need to set the mail user that dovecot uses to access the maildir to 
the same uid that postfix uses, how can I do this, I've read the wiki 
over and over and although it says you can do it, I don't know how.

Taken from the WIKI...

http://wiki.dovecot.org/UserIds#mailusers
Virtual users where all Dovecot users run under a single system user, 
for example vmail (just NOT dovecot).

Also taken from WIKI
http://wiki.dovecot.org/VirtualUsers
You can create for example one vmail user which owns all the mails, or 
you can assign a separate UID for each user. See UserIds#mailusers for 
more information about different ways to allocate UIDs for users.

All I want is to be able to access the mail, with the same my 
"virtual_uid_maps = static:501"(set in my postfix main.cf)

All of these say it can be done, but how do I do it?

Please could someone assist me :(

Thanks.

Neil

-- 
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html



More information about the dovecot mailing list