dovecot.conf

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.34-12-xen x86_64 Ubuntu 12.04.3 LTS ext4

disable_plaintext_auth = no
log_path = /var/log/mail.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
mail_privileged_group = mail

namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}

passdb {
  driver = pam
}

passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}

passdb {
  driver = pam
}

protocols = pop3 imap

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
  user = root
}

ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem

userdb {
  driver = passwd
}

userdb {
  args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
  driver = static
}

userdb {
  driver = passwd
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /home/vmail/dovecot-deliver.log
  #mail_plugins = cmusieve
  #mail_plugins = sieve
  postmaster_address = postmaster@mirocow.com
}