Minimal Dovecot configuration

This page describes in short how to configure Dovecot. This setup uses two configuration files. dovecot.conf, the MainConfig of the Dovecot server and dovecot-sql.conf, containing the settings for passdb and userdb lookups. For more details see also AuthDatabase/SQL.

If you are upgrading your Dovecot installation from v1.0.x to v1.1.x or v1.1.x to v1.2.x, you should also read Upgrading in the Dovecot wiki.

dovecot.conf

The following configuration example can be used as complete configuration file. You can also adjust your existing settings.

#disable_plaintext_auth = no
mail_location = maildir:~/Maildir
mail_privileged_group = mail
first_valid_uid = 70000
first_valid_gid = 70000
protocol lda {
  postmaster_address = postmaster@YOUR-DOMAIN.TLD
  # uncomment this to use server side filtering (Dovecot v1.0.x/v1.1.x)
  #mail_plugins = cmusieve
  # uncomment this to use server side filtering (Dovecot v1.2.x)
  #mail_plugins = sieve
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
# uncomment this to use the ManageSieve protocol, if supported by your installation
#protocol managesieve {
#  # only valid with Dovecot v1.0.x/v1.1.x.
#  # see also: http://wiki.dovecot.org/ManageSieve/Configuration#v1.0.2BAC8-v1.1
#  sieve = ~/.dovecot.sieve
#  sieve_storage = ~/sieve
#}
auth default {
  mechanisms = cram-md5 login plain
  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }
  userdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }
  user = nobody
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0600
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}
# uncomment this if you use the ManageSieve protocol with Dovecot v1.2.x
#plugin {
#  # Sieve and ManageSieve settings
#  # see also: http://wiki.dovecot.org/ManageSieve/Configuration#v1.2
#  sieve = ~/.dovecot.sieve
#  sieve_dir = ~/sieve
#}

dovecot-sql.conf

This lines contains all information that are required by Dovecot to access the database and to do the lookups in passdb and userdb.

driver = pgsql
connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
default_pass_scheme = PLAIN
password_query = SELECT "user", password FROM dovecot_password WHERE "user" = '%u' AND %Ls
user_query = SELECT home, uid, gid, 'maildir:'||mail AS mail FROM dovecot_user WHERE userid = '%u'


Creating_base_dir

ConfiguringPostfix


CategoryInstallation

VMMWiki: ConfiguringDovecot (last edited 2009-09-06 17:24:46 by PascalVolk)

SourceForge.net Logo