LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-28-2012, 10:15 PM   #1
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 76

Rep: Reputation: 15
dovecot fails to start


Hi
I haven't been able to troubleshot why dovecot fails to start:
Code:
dovecot start
doveconf: Fatal: execvp(/opt/include/dovecot) failed: Permission denied
my understanding is this error msg shows that dovecot thinks /opt/include/dovecot is a binary (rather than a folder), whereas I can see the relevant binaries in
/opt/sbin/dovecot and /opt/bin/doveconf

Note that dovecot was compiled via the --prefix=/opt configuration option on a qnap NAS using the current version of GCC. It was not an ipkg job.

dovecot.conf has:
Code:
!include conf.d/*.conf
!include_try local.conf
protocols = imap pop3
mail_location = maildir:~/Maildir2
pop3_uidl_format = %08Xu%08Xv
ssl=no
and
[/opt] # doveconf -n
shows (nb this is long ):
Code:
# 2.1.6: /opt/etc/dovecot/dovecot.conf
# OS: Linux 2.6.33.2 armv5tel
base_dir = /opt/var/
mail_location = maildir:~/Maildir2
namespace {
  inbox = yes
  location =
  mailbox {
    special_use = \Drafts
    name = Drafts
  }
  mailbox {
    special_use = \Junk
    name = Junk
  }
  mailbox {
    special_use = \Sent
    name = Sent
  }
  mailbox {
    special_use = \Sent
    name = Sent Messages
  }
  mailbox {
    special_use = \Trash
    name = Trash
  }
  prefix =
  name = inbox
}
passdb {
  driver = pam
}
protocols = imap pop3
service replication-notify-fifo {
  name = aggregator
}
service anvil-auth-penalty {
  name = anvil
}
service auth-worker {
  name = auth-worker
}
service auth-client {
  name = auth
}
service config {
  name = config
}
service dict {
  name = dict
}
service login/proxy-notify {
  name = director
}
service dns-client {
  name = dns_client
}
service doveadm-server {
  name = doveadm
}
service imap {
  name = imap-login
}
service login/imap {
  name = imap
}
service indexer-worker {
  name = indexer-worker
}
service indexer {
  name = indexer
}
service ipc {
  name = ipc
}
service lmtp {
  name = lmtp
}
service log-errors {
  name = log
}
service pop3 {
  name = pop3-login
}
service login/pop3 {
  name = pop3
}
service replicator {
  name = replicator
}
service login/ssl-params {
  name = ssl-params
}
service stats-mail {
  name = stats
}
ssl = no
userdb {
  driver = passwd
}
protocol lmtp {
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol lda {
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol imap {
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol pop3 {
  service replication-notify-fifo {
    name = aggregator
  }
  service anvil-auth-penalty {
    name = anvil
  }
  service auth-worker {
    name = auth-worker
  }
  service auth-client {
    name = auth
  }
  service config {
    name = config
  }
  service dict {
    name = dict
  }
  service login/proxy-notify {
    name = director
  }
  service dns-client {
    name = dns_client
  }
  service doveadm-server {
    name = doveadm
  }
  service imap {
    name = imap-login
  }
  service login/imap {
    name = imap
  }
  service indexer-worker {
    name = indexer-worker
  }
  service indexer {
    name = indexer
  }
  service ipc {
    name = ipc
  }
  service lmtp {
    name = lmtp
  }
  service log-errors {
    name = log
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
[/root] #

Anyone can help?
Compfused
 
Old 06-29-2012, 02:53 PM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
I would recommend that you:
1) look in your log file for the corresponding error messages. The message may contain more specific information that helps direct you to an answer
2) My guess is that Dovecot is having problems with access to the maildir, for example, creating the index file. Confirming from the logs which directory/file and the associated permissions would be of help.
3) I have not seen a service segment spelled out like yours before, but one thing I do recall is in the auth-worker section, and possibly in the other auth sections too, you can put a directive for the user that the system will run under. The user and group must correspond to the permissions of the mail directories. This also applies to the spool directory, which may be your permissions problem.

As an example, here is what I have from the Dovecot sections I am thinking of. Note that some of my trials are commented out:
Code:
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    group = mail
    mode = 0660
    user = vmail
  }
  #user = nobody
  user = root
}

service auth-worker {
#       user = $default_internal_user
# remembered this from gentoo docs
        user = root
       unix_listener auth-worker {
              user = postfix
       }
}
 
1 members found this post helpful.
Old 07-02-2012, 09:52 AM   #3
compused
Member
 
Registered: Oct 2006
Location: Melbourne Australia
Distribution: centos and redhat 8
Posts: 76

Original Poster
Rep: Reputation: 15
thanks, that put me in the right direction. I had omitted to created the dovenull and dovecot users. I also found that running
Code:
/opt/sbin/dovecot
overcome the main error message
Code:
Fatal: execvp(/opt/include/dovecot) failed: Permission denied
and lead to useful error messages. It turns out that
Code:
/opt/include/dovecot
is placed ahead of /opt/sbin/dovecot in my $PATH
and even though /opt/sbin/dovecot is only a folder, my system was trying to run it as a program.

I then corrected a few other configuration errors via dovecot.conf after checking the logs (using syslog), the trickiest of which were the following:
1. needed this config in dovecot.conf for passwords:
Code:
passdb {
driver = passwd-file
args = /etc/shadow
}

userdb {
     driver = passwd
     args = blocking=no
      }
2. I was not using ssl so I used the following in dovecot.conf:
Code:
ssl=no
disable_plaintext_auth = no
auth_mechanisms = plain
3. I was trying to log into roundcube as the 'root' user, which is 'admin' rather than 'root' in a qnap device. I learned that dovecot does NOT allow the root user to log in
So the following is set this way:
Code:
service auth-worker {
  user = admin 
#not user = root
Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ktorrent fails to start after update (libktorrent fails) pusrob Linux - Software 0 12-18-2011 02:10 PM
Dovecot fails to start when configured with imap or pop3 protocol blackfish Linux - Server 1 04-06-2008 09:03 AM
dovecot can't start hilhunter Linux - Software 1 03-12-2006 01:38 PM
dovecot failed to start xchido Fedora 0 03-10-2006 04:25 PM
what to do for dovecot to start in boot itself deepclutch Linux - Networking 1 09-04-2005 11:13 AM


All times are GMT -5. The time now is 03:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration