Odhiambo Washington
2005-Nov-19 20:05 UTC
[Dovecot] Multiple authentication databases and storage locations
Hello Everyone,
I am playing with the $subject matter using 1.0alpha4, and thanks to the
archives, I lifted this one from Alexander Shikoff off and used it in my
setup.
auth default {
mechanisms = plain
user = root
passdb pam {
args = pop3
}
passdb sql {
args = /usr/local/dovecot/etc/dovecot-mysql.conf
}
userdb passwd {
}
userdb sql {
args = /usr/local/dovecot/etc/dovecot-mysql.conf
}
}
It seems to work, but I have virtual users as well as system users.
System accounts have their mail stored as follows:
default_mail_env = maildir:/home/%u/Maildir
While virtual users have this:
default_mail_env = maildir:/htdocs/virtual/spool/%d/%u/Maildir
Now, virtual users can login because I have used their $default_mail_env
in my configuration.
I am stuck how to get system users to successfully access their e-mails.
Here is the error I get:
beastie# telnet 0 110
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
+OK Welcome. Dovecot is Ready to serve.
user wash
+OK
pass a_verysecret1
+OK Logged in.
-ERR No INBOX for user.
Connection closed by foreign host.
In the log file, here is what I see:
dovecot: Nov 19 23:22:11 Error: pop3(wash):
mkdir(/htdocs/virtual/spool//wash/Maildir/cur) failed: Permission denied
dovecot: Nov 19 23:22:11 Error: pop3(wash):
mkdir(/htdocs/virtual/spool//wash/Maildir/cur) failed: Permission denied
dovecot: Nov 19 23:22:11 Error: pop3(wash): Couldn't open INBOX: Internal
error occurred. Refer to server log for more information.
... which is wrong, since mail for user "wash" is in
/home/wash/Maildir.
How do I make dovecot work in this situation?
Thanks in advance.
-Wash
http://www.netmeister.org/news/learn2quote.html
--
+======================================================================+
|\ _,,,---,,_ | Odhiambo Washington <wash at wananchi.com>
Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
|,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
'---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733
744121
+======================================================================+
"... the Mayo Clinic, named after its founder, Dr. Ted Clinic ..."
-- Dave Barry
Odhiambo Washington
2005-Nov-19 20:17 UTC
[Dovecot] Multiple authentication databases and storage locations
I hate to do this, but I seem to have stumbled on the answer as soon as I hit "send". Is it correct that setting default_mail_env to an empty string is the solution??? * On 19/11/05 23:05 +0300, Wash wrote:> > Hello Everyone, > > I am playing with the $subject matter using 1.0alpha4, and thanks to the > archives, I lifted this one from Alexander Shikoff off and used it in my > setup. > > auth default { > mechanisms = plain > user = root > passdb pam { > args = pop3 > } > passdb sql { > args = /usr/local/dovecot/etc/dovecot-mysql.conf > } > userdb passwd { > } > userdb sql { > args = /usr/local/dovecot/etc/dovecot-mysql.conf > } > } > > > It seems to work, but I have virtual users as well as system users. > System accounts have their mail stored as follows: > > default_mail_env = maildir:/home/%u/Maildir > > While virtual users have this: > > default_mail_env = maildir:/htdocs/virtual/spool/%d/%u/Maildir > > > Now, virtual users can login because I have used their $default_mail_env > in my configuration. > > I am stuck how to get system users to successfully access their e-mails. > Here is the error I get: > > beastie# telnet 0 110 > Trying 0.0.0.0... > Connected to 0. > Escape character is '^]'. > +OK Welcome. Dovecot is Ready to serve. > user wash > +OK > pass a_verysecret1 > +OK Logged in. > -ERR No INBOX for user. > Connection closed by foreign host. > > > In the log file, here is what I see: > > dovecot: Nov 19 23:22:11 Error: pop3(wash): mkdir(/htdocs/virtual/spool//wash/Maildir/cur) failed: Permission denied > dovecot: Nov 19 23:22:11 Error: pop3(wash): mkdir(/htdocs/virtual/spool//wash/Maildir/cur) failed: Permission denied > dovecot: Nov 19 23:22:11 Error: pop3(wash): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. > > ... which is wrong, since mail for user "wash" is in /home/wash/Maildir. > > How do I make dovecot work in this situation? > > Thanks in advance. > > > -Wash > > http://www.netmeister.org/news/learn2quote.html > > -- > +======================================================================+ > |\ _,,,---,,_ | Odhiambo Washington <wash at wananchi.com> > Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com > |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 > '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 > +======================================================================+ > "... the Mayo Clinic, named after its founder, Dr. Ted Clinic ..." > -- Dave Barry-Wash http://www.netmeister.org/news/learn2quote.html -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington <wash at wananchi.com> Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ "He was a modest, good-humored boy. It was Oxford that made him insufferable."