[Dovecot] dovecot runs from shell, but not xinetd

Stan Hoeppner stan at hardwarefreak.com
Wed Mar 21 04:58:30 EET 2012


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