Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install exim + dovecot on my centOS server. And when i tried to run( as root ) it, I am getting the below message:

Starting Dovecot Imap: Error: Can't write to log directory /var/log: Permission denied Fatal: Invalid configuration in /etc/dovecot.conf

I even tried to set permissions to 777, but that didn't help. Also I had the same problem with dovecot.conf, I solved this by deleting dovecot.conf and creating it again. Would appreciate for any help. My dovecot.conf looks like this:

log_path = /var/log/dovecot.log

login_greeting = pop3/imap service.

protocol imap {


protocol pop3 {

pop3_uidl_format = %08Xu%08Xv

protocol lda {

  postmaster_address =

  mail_plugin_dir = /usr/lib/dovecot/lda


auth default {

  mechanisms = plain login cram-md5 digest-md5

  passdb passwd-file {

  args = /etc/dovecot.passwd


  userdb passwd-file {

  args = /etc/dovecot.passwd


  user = root

  socket listen {

 client {

share|improve this question

migrated from Aug 9 '11 at 12:21

This question came from our site for professional and enthusiast programmers.

Note that the message is can't write to log directory /var/log It's not clear from your post whether you changed the permissions on /var/log or on /var/log/dovecot.log.

/var/log is typically owned by root with permissions 755. dovecot is supposed to be run as root:

Normally Dovecot logs everything through its master process, which is running as root.

from the dovecot Local Delivery Agent wiki.

All of this leads me to suspect you are somehow starting dovecot as some other non-root user. Please supply info on how exactly you are starting dovecot. Typically it's done by a system startup script (as root). Alternately you can try launching dovecot on the command line as root with

sudo /usr/sbin/dovecot

and see if that works. That's just for troubleshooting though, you need to launch it automatically via a system startup script.

share|improve this answer

Of course, you can keep trying to solve it and I am sure you will, but in such cases when things just go messy, the fastest (not best) way is to:

yum remove dovecot
yum install dovecot

You're done ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.