User Tools

Site Tools


setup:mx_v2.5

Primary MX

Dovecot

Liens vers la doc:

dovecot.conf

# Enable IMAP
protocols = imap
#protocols = imaps

# Log files for dovecot
log_path                = /var/log/mail/dovecot.log
info_log_path           = /var/log/mail/dovecot-info.log

# Enable SSL and enforce secure authentication
ssl                     = yes
disable_plaintext_auth  = yes
ssl_cert                = </srv/ssl/certs/dovecot.pem
ssl_key                 = </srv/ssl/private/dovecot.pem
ssl_dh                  = </srv/ssl/dh-4096.pem
ssl_cipher_list         = AESGCM:ALL:!aNULL:!eNULL:!aEDH:!RC4:!MD5:!DES:!3DES

# We're using Maildir format in a virtual setup
mail_uid                = vmail
mail_gid                = vmail
mail_home               = /home/vmail/%d/%n
mail_location           = maildir:~/mail

# If you're using POP3, you'll need this:
pop3_uidl_format = %g

# Authentication configuration:
auth_verbose = yes
auth_mechanisms = plain
passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
  driver = static
  args = uid=vmail gid=vmail home=/home/vmail/%d/%n
}

dovecot-sql.conf

driver = mysql
# The mysqld.sock socket may be in different locations in different systems.
# Use "host= ... pass=foo#bar" with double-quotes if your password has '#' character.
connect = host=/var/run/mysqld/mysqld.sock dbname=mails user=admin password=pass
# Alternatively you can connect to localhost as well:
#connect = host=localhost dbname=mails user=admin password=pass # port=3306

password_query = SELECT userid AS username, domain, password \
  FROM users WHERE userid = '%n' AND domain = '%d'
user_query = SELECT home, uid, gid FROM users WHERE userid = '%n' AND domain = '%d'

# For using doveadm -A:
iterate_query = SELECT userid AS username, domain FROM users
setup/mx_v2.5.txt · Last modified: 2020/11/27 15:02 by root

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki