[Dovecot] dovecot runs from shell, but not xinetd
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@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
Any ideas what is wrong? What is different running under xinetd? All the process run under the same user ids...
Thanks, /Mark
My config ---------------------------------------------------------------
# 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-220.7.1.el6.centos.plus.i686 i686 CentOS release 6.2 (Final) ext4 auth_debug = yes auth_verbose = yes auth_verbose_passwords = plain disable_plaintext_auth = no doveadm_worker_count = 4 mail_debug = yes mail_gid = users mail_location = mbox:/var/spool/mailpop3:INBOX=/var/spool/mailpop3/%u mail_uid = root mbox_write_locks = fcntl passdb { args = /etc/passwd.dovecot driver = passwd-file } passdb { driver = shadow } plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mail_log_fields = uid box msgid size from subject vsize flags mail_log_group_events = yes } protocols = pop3 ssl_cert =
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@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
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@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@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@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Stan Hoeppner Sent: Tuesday, March 20, 2012 7:59 PM To: dovecot@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@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
On 3/20/2012 11:26 PM, Mark Jeghers wrote:
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@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@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?
What user does dovecot run as in the shell? Under xinetd?
-- Stan
All,
I was mistaken in how I described my problem, please forgive this dovecot newbie for describing the problem incorrectly! It is not under xinitd, it is trying to run as an init.d service.
Ok, let's try again...
I am able to run it from a root shell prompt, but the errors below occur if it was started as a SERVICE, e.g. from the init.d script. So now the question is: what is different in those two environments...?
Thanks, hope this clarifies things,
/Mark
-----Original Message----- From: Stan Hoeppner [mailto:stan@hardwarefreak.com] Sent: Wednesday, March 21, 2012 1:42 AM To: Mark Jeghers Cc: dovecot@dovecot.org Subject: Re: [Dovecot] dovecot runs from shell, but not xinetd
On 3/20/2012 11:26 PM, Mark Jeghers wrote:
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@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@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?
What user does dovecot run as in the shell? Under xinetd?
-- Stan
On 21.3.2012, at 20.59, Mark Jeghers wrote:
I am able to run it from a root shell prompt, but the errors below occur if it was started as a SERVICE, e.g. from the init.d script. So now the question is: what is different in those two environments...? ..
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
Permission errors point to SELinux being the problem. Try disabling it.
participants (3)
-
Mark Jeghers
-
Stan Hoeppner
-
Timo Sirainen