Hi all, I have been fiddling with dovecot and things seem to be stuck on this problem: Oct 20 11:21:35 mail dovecot: chdir(studiosala.net/federico/) failed with uid 1001: Permission denied Oct 20 11:21:35 mail dovecot: child 22150 (pop3) returned error 89 This is the telnet session that generates it: mail:~# telnet localhost pop3 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. +OK dovecot ready. user federico at studiosala.net +OK pass XXXXXX +OK Logged in. Connection closed by foreign host. I am stuck: the UID/GID that postfix uses for dropping the mail in /varm/mail/domains/ is 1001/1001. The query string to mysql (the backend where I have stored the users) is (from mysql log, so it is executed): 682 Query SELECT 1001 AS uid, 1001 AS gid, '/var/mail/domains/' AS mail, maildir AS home FROM mailbox WHERE username 'ale at studiosala.net' mail:/etc# ls -lad /var/mail drwxrwsr-t 3 root mail 4096 2004-10-19 23:49 /var/mail mail:/etc# ls -lad /var/mail/domains/ drwxr-sr-t 4 vmail vmail 4096 2004-10-20 07:03 /var/mail/domains/ I am not sure of how to proceed from here, any hint appreciated. thanks stef
On 20.10.2004, at 11:08, Stefano Maffulli wrote:> Oct 20 11:21:35 mail dovecot: chdir(studiosala.net/federico/) failed > with uid 1001: Permission denied..> 682 Query SELECT 1001 AS uid, 1001 AS gid, '/var/mail/domains/' > AS mail, maildir AS home FROM mailbox WHERE username > 'ale at studiosala.net'You seem to be confusing mail and home settings. mail setting here overrides default_mail_env (see dovecot-example.conf) and you usually don't need to do it. home should be a full path, you're now giving it as relative path which ends up trying to go under /var/run/dovecot/. What you probably want is: select 1001 as uid, 1001 as gid, concat('/var/mail/domains/', maildir) as home where username = '%u' -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20041020/06a4eca8/attachment-0001.bin>
On Wed, 20 Oct 2004 16:25:09 +0300, Timo Sirainen <tss at iki.fi> wrote:> What you probably want is: > > select 1001 as uid, 1001 as gid, concat('/var/mail/domains/', maildir) > as home where username = '%u'Thanks Timo. I figured that only after I sent the mail this morning, after I spent a few hours strugling last night :) I have used this as user_query: user_query = SELECT 1001 AS uid, 1001 AS gid, 'maildir:/var/mail/domains/%d/%n' AS maildir FROM mailbox WHERE username = '%u' and it works. I would change it only if your sintax is the Right one :) Actually, since we are at it, I was wondering yesterday why you don't mention mysql as a possible db backend for dovecot, since it seems to work like a charm. thanks stef