[Dovecot] Basic configuration problem "not a directory"
Hi,
I've been struggling with getting dovecot up and running the last hour, but I seem to be stuck.
When logging in (which I can do successfully) my connection is dropped, and the following is outputted to my dovecot log:
dovecot: Apr 26 09:56:52 Fatal: chdir(/bin/false) failed with uid 513: Not a directory dovecot: Apr 26 09:56:52 Error: child 27345 (imap) returned error 89
.. But I'm certain the relevant directories exist. Relevant configuration details are as follows:
[dovecot.conf] valid_chroot_dirs = /var/spool/vmail default_mail_env = maildir:/var/spool/vmail/$d/%n/
[passwd sample] einar@domain.com::513:513:/var/spool/vmail/domain.com/:/bin/false::
[directory listing] [root@server einar]# pwd /var/spool/vmail/domain.com/einar [root@server einar]# ls -l totalt 12 drwx------ 2 virtmail virtmail 4096 apr 26 07:27 cur drwx------ 2 virtmail virtmail 4096 apr 26 08:48 new drwx------ 2 virtmail virtmail 4096 apr 26 08:48 tmp
I'd be very grateful for any assistance, any ideas of what might be wrong. Is there any easy way to see the relevant directory that /bin/false exits on?
-Einar-
It looks like dovecot is mistakenly picking up "/bin/false" as a directory (rather than a shell) in the password file.
What OS and version of dovecot are you using?
You could prove my theory by changing /bin/false to something else in the password file as a test.
Chris
Einar Flesaker wrote:
Hi,
I've been struggling with getting dovecot up and running the last hour, but I seem to be stuck.
When logging in (which I can do successfully) my connection is dropped, and the following is outputted to my dovecot log:
dovecot: Apr 26 09:56:52 Fatal: chdir(/bin/false) failed with uid 513: Not a directory dovecot: Apr 26 09:56:52 Error: child 27345 (imap) returned error 89
.. But I'm certain the relevant directories exist. Relevant configuration details are as follows:
[dovecot.conf] valid_chroot_dirs = /var/spool/vmail default_mail_env = maildir:/var/spool/vmail/$d/%n/
[passwd sample] einar@domain.com::513:513:/var/spool/vmail/domain.com/:/bin/false::
[directory listing] [root@server einar]# pwd /var/spool/vmail/domain.com/einar [root@server einar]# ls -l totalt 12 drwx------ 2 virtmail virtmail 4096 apr 26 07:27 cur drwx------ 2 virtmail virtmail 4096 apr 26 08:48 new drwx------ 2 virtmail virtmail 4096 apr 26 08:48 tmp
I'd be very grateful for any assistance, any ideas of what might be wrong. Is there any easy way to see the relevant directory that /bin/false exits on?
-Einar-
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
On Tue, Apr 26, 2005 at 09:12:15AM +0100, Chris Wakelin wrote:
It looks like dovecot is mistakenly picking up "/bin/false" as a directory (rather than a shell) in the password file.
Ah, I didn't catch that. Thank you!
What OS and version of dovecot are you using?
Red Hat Enterprise Linux 4, using dovecot-0.99.11 (Stock RPM, dovecot-0.99.11-2.EL4.1).
You could prove my theory by changing /bin/false to something else in the password file as a test.
Your theory was right. Removing references to a shell at all did the trick, actually:
einar@domain.com::513:513:/var/spool/vmail/domain.com/:::
.. And I no longer get any error output on that.
I'm now seeing folder errors, though. With pop3 I get the following in my dovecot log: pop3(einar@domain.com.com): Apr 26 10:28:12 Error: Couldn't open INBOX: (null)
With IMAP I'm just unable to browse folders, and get no error message from dovecot. Squirrelmail provides the following : "ERROR : Could not complete request. Query: SELECT "INBOX"".
Any more leads?
Thanks for the help so far :)
-- -Einar-
On Tue, 2005-04-26 at 10:46 +0200, Einar Flesaker wrote:
Your theory was right. Removing references to a shell at all did the trick, actually:
einar@domain.com::513:513:/var/spool/vmail/domain.com/:::
The format of passwd is:
user:password:uid:gid:(gecos):home:(shell):flags:mail
You're missing the gecos field. Just add extra ':' between 513 and home dir.
On Tue, Apr 26, 2005 at 12:10:27PM +0300, Timo Sirainen wrote:
The format of passwd is: user:password:uid:gid:(gecos):home:(shell):flags:mail You're missing the gecos field. Just add extra ':' between 513 and home dir.
Thanks. I've cleaned it up, I've also mailed the author of http://adminspotting.net/howtos/postfixvirtual2.html about this, I inherited the bug from his guide :)
Still wondering what I need to do to get it fully functional, I still get a "-ERR No INBOX for user." error message, for a maildirfolder that has both cur, new and tmp and correct permissions as far as I can see.
[root@server log]# telnet localhost 110 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK dovecot ready. user einar@domain.com +OK pass test +OK Logged in. -ERR No INBOX for user.
-- -Einar-
On Tue, 2005-04-26 at 17:05 +0200, Einar Flesaker wrote:
Still wondering what I need to do to get it fully functional, I still get a "-ERR No INBOX for user." error message, for a maildirfolder that has both cur, new and tmp and correct permissions as far as I can see.
It doesn't find the INBOX for some reason. Is your default_mail_env set correctly? And userdb is returning correct home directory? Any errors in log files?
On Tue, Apr 26, 2005 at 10:26:09PM +0300, Timo Sirainen wrote:
It doesn't find the INBOX for some reason. Is your default_mail_env set correctly? And userdb is returning correct home directory? Any errors in log files?
Got some new eyes to look at it. Turned out I had $d instead of %d in my default_mail_env.. I Hate spending hours on typos like that :)
Thanks for the help anyway :)
-Einar-
On Tue, 2005-04-26 at 21:30 +0200, Einar Flesaker wrote:
On Tue, Apr 26, 2005 at 10:26:09PM +0300, Timo Sirainen wrote:
It doesn't find the INBOX for some reason. Is your default_mail_env set correctly? And userdb is returning correct home directory? Any errors in log files?
Got some new eyes to look at it. Turned out I had $d instead of %d in my default_mail_env.. I Hate spending hours on typos like that :)
BTW. 1.0-tests have this nice setting called mail_debug which makes debugging these kind of problems much easier.
participants (3)
-
Chris Wakelin
-
Einar Flesaker
-
Timo Sirainen