[Dovecot] dovecot runs from shell, but not xinetd

Mark Jeghers mjeghers at Brocade.com
Wed Mar 21 06:26:23 EET 2012


Hi Stan

Afraid it did not help.  Here is what I got:

*** entered into a telnet session...
user ann
+OK
pass ********
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2012-03-20 21:16:05]
Connection closed by foreign host.
[root at t4pserver2 mailpop3]#

*** resulted in maillog...
Mar 20 21:16:05 t4pserver2 dovecot: auth: Debug: passwd-file(ann,::1): lookup: user=ann file=/etc/passwd.dovecot
Mar 20 21:16:05 t4pserver2 dovecot: auth: Debug: client out: OK#0112#011user=ann
Mar 20 21:16:05 t4pserver2 dovecot: auth: Debug: master in: REQUEST#0113180593153#01113546#0112#0116c9a0569dcd246a9f9e7a94dbe852843
Mar 20 21:16:05 t4pserver2 dovecot: auth: Debug: passwd(ann,::1): lookup
Mar 20 21:16:05 t4pserver2 dovecot: auth: Debug: master out: USER#0113180593153#011ann#011system_groups_user=ann#011uid=501#011gid=501#011home=/home/ann
Mar 20 21:16:05 t4pserver2 dovecot: pop3-login: Login: user=<ann>, method=PLAIN, rip=::1, lip=::1, mpid=13549, secured
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Debug: Effective uid=501, gid=501, home=/home/ann
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Debug: fs: root=/var/spool/mailpop3, index=, control=, inbox=/var/spool/mailpop3/ann
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Error: stat(/var/spool/mailpop3/ann) failed: Permission denied
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Debug: Namespace : Using permissions from /var/spool/mailpop3: mode=0777 gid=-1
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Error: stat(/var/spool/mailpop3/ann) failed: Permission denied
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Debug: Namespace : Using permissions from /var/spool/mailpop3: mode=0777 gid=-1
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Error: stat(/var/spool/mailpop3/ann) failed: Permission denied
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2012-03-20 21:16:05]
Mar 20 21:16:05 t4pserver2 dovecot: pop3(ann): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0

*** file permissions...
[root at t4pserver2 mailpop3]# ls -al
total 248652
drwxrwxrwx.  2 root         mail      4096 Mar 20 21:11 .
drwxr-xr-x. 17 root         root      4096 Mar 18 18:22 ..
-rw-rw-r--.  1 ann          mail     58739 Mar 17 04:26 ann
-rw-rw-r--.  1 annphone     mail   2708345 Mar 17 05:22 annphone
-rw-rw-r--.  1 root         mail 127272960 Mar 18 18:28 backups.tar
-rw-rw-r--.  1 crimsonblues mail    327563 Dec  3 14:38 crimsonblues
-rw-rw-r--.  1 mark         mail         0 Mar 18 13:09 mark
-rw-rw-r--.  1 markphone    mail 124147068 Mar 18 04:21 markphone
-rw-rw-r--.  1 nathan       mail      5119 Dec 22 18:52 nathan
-rw-rw-r--.  1 root         mail         0 Mar 18 13:13 root
-rw-rw-r--.  1 testuser     mail     58739 Mar 18 18:42 testuser
-rw-rw-r--.  1 tim          mail     16212 Mar 18 15:51 tim

My CentOS installation created a user "mail" so I am hesitant to remove it, but it is no longer in use here.

Any other ideas?

/Mark

-----Original Message-----
From: dovecot-bounces at dovecot.org [mailto:dovecot-bounces at dovecot.org] On Behalf Of Stan Hoeppner
Sent: Tuesday, March 20, 2012 7:59 PM
To: dovecot at dovecot.org
Subject: Re: [Dovecot] dovecot runs from shell, but not xinetd

On 3/20/2012 1:29 PM, Mark Jeghers wrote:
> All,
> 
> Below is my config.  When I run dovecot from xinetd, I get these errors in the log:
> 
> Mar 20 11:13:39 t4pserver2 dovecot: pop3-login: Login: user=<mark>, method=PLAIN, rip=::1, lip=::1, mpid=11624, secured
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Debug: Effective uid=500, gid=100, home=/home/mark
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Debug: fs: root=/var/spool/mailpop3, index=, control=, inbox=/var/spool/mailpop3/mark
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Error: stat(/var/spool/mailpop3/mark) failed: Permission denied
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Debug: Namespace : Using permissions from /var/spool/mailpop3: mode=0777 gid=-1
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Error: stat(/var/spool/mailpop3/mark) failed: Permission denied
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Debug: Namespace : Using permissions from /var/spool/mailpop3: mode=0777 gid=-1
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Error: stat(/var/spool/mailpop3/mark) failed: Permission denied
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2012-03-20 11:13:39]
> Mar 20 11:13:39 t4pserver2 dovecot: pop3(mark): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
> 
> ...it acts as if it has no file permission, but it seems like it certainly should.  Here is the files it is trying to access:
> 
> [root at t4pserver2 ~]# ls -al /var/spool/mailpop3/
> total 248656
> drwxrwxrwx.  3 mail         mail       4096 Mar 20 00:31 .
> drwxr-xr-x. 17 root         root       4096 Mar 18 18:22 ..
> -rw-rw-r--.  1 ann          users     58739 Mar 17 04:26 ann
> -rw-rw-r--.  1 annphone     users   2708345 Mar 17 05:22 annphone
> -rw-rw-r--.  1 mail         users 127272960 Mar 18 18:28 backups.tar
> -rw-rw-r--.  1 crimsonblues users    327563 Dec  3 14:38 crimsonblues
> drwxrwxrwx.  3 mark         users      4096 Mar 20 00:31 .imap
> -rw-rw-r--.  1 mark         users         0 Mar 18 13:09 mark
> -rw-rw-r--.  1 markphone    users 124147068 Mar 18 04:21 markphone
> -rw-rw-r--.  1 nathan       users      5119 Dec 22 18:52 nathan
> -rw-rw-r--.  1 root         users         0 Mar 18 13:13 root
> -rw-rw-r--.  1 testuser     users     58739 Mar 18 18:42 testuser
> -rw-rw-r--.  1 tim          users     16212 Mar 18 15:51 tim

The group owner of these files is "users".  Should probably be "mail".  E.g.

$ ls -la /var/spool/mail/
total 724K
drwxrwsr-x  2 root mail 4.0K Jan 19 01:16 .
drwxr-xr-x 14 root root 4.0K Jun  2  2011 ..
-rw-------  1 stan mail 707K Mar 20 21:32 stan

Ownership of /var/spool/mailpop3 should probably be root:mail instead of
mail:mail.  And given that 'mail' is a standard group name, it's
probably not wise to have an actual user named 'mail', as you've done here.

-- 
Stan



More information about the dovecot mailing list