• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Dovecot config permission error

waseem

Basic Pleskian
HI,
i am experiencing some issue with IMAP, i did not add anything to server today but yet this problem arises. i am not able to login to IMAP, following error can be seen in maillog

Code:
ay 20 21:36:57 server dovecot: imap-login: Fatal: Error reading configuration: read(/var/run/dovecot/config) failed: read(size=8192) failed: Connection reset by peer
May 20 21:37:57 server dovecot: master: Fatal: execv(/usr/lib/dovecot/config) failed: Permission denied
May 20 21:37:57 server dovecot: config: Fatal: master: service(config): child 15161 returned error 84 (exec() failed)
May 20 21:37:57 server dovecot: imap-login: Fatal: Error reading configuration: read(/var/run/dovecot/config) failed: read(size=8192) failed: Connection reset by peer
May 20 21:38:57 server dovecot: master: Fatal: execv(/usr/lib/dovecot/config) failed: Permission denied
May 20 21:38:57 server dovecot: config: Fatal: master: service(config): child 15197 returned error 84 (exec() failed)
May 20 21:38:57 server dovecot: imap-login: Fatal: Error reading configuration: read(/var/run/dovecot/config) failed: read(size=8192) failed: Connection reset by peer

also here is devcot conf

Code:
doveconf -n
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.8.0-45-generic x86_64 Ubuntu 16.04.2 LTS ext4
auth_mechanisms = plain login digest-md5 cram-md5 apop
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890&.-_@'
disable_plaintext_auth = no
first_valid_uid = 30
imap_client_workarounds = delay-newmail
imap_logout_format = rcvd=%i, sent=%o
mail_home = /var/qmail/mailnames/%Ld/%Ln
mail_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir
mail_log_prefix = "service=%s, user=%u, ip=[%r]. "
mail_plugins = " quota"
managesieve_logout_format = rcvd=%i, sent=%o
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags notify
namespace inbox {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
}
passdb {
  driver = plesk
}
plugin {
  quota = maildir:User quota
  quota_grace = 0
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_logout_format = rcvd=%i, sent=%o, top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
protocols = imap pop3 sieve
service auth-worker {
  group =
  user =
}
service auth {
  group =
  unix_listener auth-userdb {
    group = popuser
    mode = 0600
    user = popuser
  }
  user =
}
service imap-login {
  process_limit = 200
  process_min_avail = 16
}
service imap {
  process_limit = 1024
  service_count = 1
}
service pop3 {
  process_limit = 1024
  service_count = 1
}
ssl_cert = </etc/dovecot/private/ssl-cert-and-key.pem
ssl_cipher_list = HIGH:!aNULL:!MD5
ssl_key =  # hidden, use -P to show it
ssl_protocols = TLSv1 TLSv1.1 TLSv1.2
userdb {
  args = uid=popuser gid=popuser
  driver = static
}
protocol imap {
  mail_plugins = " quota imap_quota"
}
protocol pop3 {
  pop3_uidl_format = UID%u-%v
}
protocol lda {
  mail_plugins = " quota sieve"
}
some other info can be this:-

ls -lL /usr/lib/dovecot | grep imap-login
-rwxr-xr-x 1 root root 32160 Mar 17 14:36 imap-login



I did remove and install devcot but it did not help.

I am using UBUNTU 16 LTS.

Any help will be appreciated.

Regards
 
Last edited:
i am able to see that all permissions are bound to root , is it an issue???

Code:
ls -la /usr/lib/dovecot
total 2168
drwxr-xr-x   3 root root   4096 May 20 21:29 .
drwxr-xr-x 166 root root  12288 May 20 21:29 ..
-rwxr-xr-x   1 root root  19536 Mar 17 14:36 aggregator
-rwxr-xr-x   1 root root  23536 Mar 17 14:36 anvil
-rwxr-xr-x   1 root root 303072 Mar 17 14:36 auth
-rwxr-xr-x   1 root root  10560 Mar 17 14:36 checkpassword-reply
-rwxr-xr-x   1 root root 111296 Mar 17 14:36 config
-rwxr-xr-x   1 root root   2839 Mar 17 14:36 decode2text.sh
lrwxrwxrwx   1 root root     11 Mar 17 14:36 deliver -> dovecot-lda
-rwxr-xr-x   1 root root  69856 Mar 17 14:36 dict
-rwxr-xr-x   1 root root 106320 Mar 17 14:36 director
-rwxr-xr-x   1 root root  10960 Mar 17 14:36 dns-client
-rwxr-xr-x   1 root root 509584 Mar 17 14:36 doveadm-server
-rwxr-xr-x   1 root root  19328 Mar 17 14:36 dovecot-lda
-rwxr-xr-x   1 root root  10536 Mar 17 14:36 gdbhelper
-rwxr-xr-x   1 root root 227800 Mar 17 14:36 imap
-rwxr-xr-x   1 root root  32528 Mar 17 14:36 imap-hibernate
-rwxr-xr-x   1 root root  32160 Mar 17 14:36 imap-login
-rwxr-xr-x   1 root root  23568 Mar 17 14:36 imap-urlauth
-rwxr-xr-x   1 root root  11152 Mar 17 14:36 imap-urlauth-login
-rwxr-xr-x   1 root root  52848 Mar 17 14:36 imap-urlauth-worker
-rwxr-xr-x   1 root root  27664 Mar 17 14:36 indexer
-rwxr-xr-x   1 root root  19440 Mar 17 14:36 indexer-worker
-rwxr-xr-x   1 root root  19312 Mar 17 14:36 ipc
-rwxr-xr-x   1 root root  53232 Mar 17 14:36 lmtp
-rwxr-xr-x   1 root root  23600 Mar 17 14:36 log
-rwxr-xr-x   1 root root  10720 Mar 17 14:36 maildirlock
-rwxr-xr-x   1 root root  62040 Mar 15 17:49 managesieve
-rwxr-xr-x   1 root root  36392 Mar 15 17:49 managesieve-login
drwxr-xr-x   7 root root   4096 May 20 21:29 modules
-rwxr-xr-x   1 root root  49424 Mar 17 14:36 pop3
-rwxr-xr-x   1 root root  23808 Mar 17 14:36 pop3-login
-rwxr-xr-x   1 root root  82528 Mar 17 14:36 quota-status
-rwxr-xr-x   1 root root  19104 Mar 17 14:36 rawlog
-rwxr-xr-x   1 root root  36272 Mar 17 14:36 replicator
-rwxr-xr-x   1 root root  14792 Mar 17 14:36 script
-rwxr-xr-x   1 root root  14880 Mar 17 14:36 script-login
-rwxr-xr-x   1 root root  19472 Mar 17 14:36 ssl-params
-rwxr-xr-x   1 root root  48560 Mar 17 14:36 stats
-rwxr-xr-x   1 root root  10576 Mar 17 14:36 xml2text

also i tried

plesk repair mail

Repairing the mail server configuration

Reconfigure all domains and mailboxes? [Y/n] y
Reconfiguring all domains and mailboxes ......................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

But still same issue
 
Last edited:
Hi waseem,

... hehehe... I was just about to write that SELinux or/and apparmor might the root cause of your issue. I'm glad you solved it on your own. :)
 
I just ran
Code:
service apparmor restart
in an Ubuntu server that presented this Dovecot error, and the command froze and the server stopped accepting any connection, giving timeouts.

Great experience.
 
Back
Top