Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Dovecot configuration file
- # Dovecot configuration version. This must be the first setting in the
- # configuration file. It specifies the configuration syntax, the used setting
- # names and the expected default values.
- dovecot_config_version = 2.4.2
- # Dovecot storage file format version. It specifies the oldest Dovecot version
- # that must be able to read files written by this Dovecot instance. The
- # intention is that when upgrading Dovecot cluster, this setting is first kept
- # as the old Dovecot version. Once the cluster is fully upgraded to a new
- # version and there is no intention to rollback to the old version anymore,
- # this version number can be increased.
- dovecot_storage_version = 2.4.2
- # The configuration below is a minimal configuration file using system user authentication.
- # See https://doc.dovecot.org/latest/core/config/quick.html
- !include_try conf.d/*.conf
- protocols {
- imap = yes
- pop3 = yes
- sieve = yes
- lmtp = yes
- }
- mail_plugins {
- acl = yes
- }
- mailbox_list_layout = fs
- mail_home = /var/mail/%{user|domain}/%{user|username}@%{user|domain}
- mail_driver = maildir
- mail_path = ~
- mail_uid = mail
- mail_gid = mail
- first_valid_uid = 8
- last_valid_uid = 8
- auth_verbose = yes
- auth_debug_passwords = yes
- log_debug = category=auth
- log_debug = category=ssl
- log_debug = category=mail
- ssl = yes
- ssl_min_protocol = LATEST
- ssl_server_cert_file = /etc/letsencrypt/live/example.com/fullchain.pem
- ssl_server_key_file = /etc/letsencrypt/live/example.com/privkey.pem
- ssl_cipher_list = ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
- auth_allow_cleartext = no
- auth_default_domain = example.com
- auth_mechanisms = PLAIN LOGIN
- auth_master_user_separator = *
- acl_driver = vfile
- acl_sharing_map {
- dict file {
- path = /var/lib/dovecot/db/shared-mailboxes.db
- }
- }
- sieve_script default {
- type = default
- name = default
- driver = file
- path = /etc/dovecot/sieve/default.sieve
- }
- sql_driver = mysql
- mysql localhost {
- user = user
- password = password
- dbname = postfix
- }
- passdb_default_password_scheme = SHA256-CRYPT
- passdb sql {
- query = SELECT username as user, '%{user|domain}' as domain, password, '/var/mail/%{user|domain}/%{user|username}@%{user|domain}' as userdb_home, 'maildir:/var/mail/%{user|domain}/%{user|username}@%{user|domain}' as userdb_mail, 8 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%{user}' AND domain = '%{user|domain}' AND active = '1'
- }
- userdb sql {
- query = SELECT '/var/mail/%{user|domain}/%{user|username}@%{user|domain}' as home, 'maildir:/var/mail/%{user|domain}/%{user|username}@%{user|domain}' as mail, 8 AS uid, 12 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%{user}' AND domain = '%{user|domain}' AND active = '1'
- }
- protocol lda {
- mail_plugins {
- sieve = yes
- }
- auth_socket_path = /var/run/dovecot/auth-master
- deliver_log_format = mail from %f: msgid=%m %$
- lda_mailbox_autocreate = yes
- lda_mailbox_autosubscribe = yes
- }
- protocol lmtp {
- mail_plugins {
- quota = yes
- sieve = yes
- }
- postmaster_address = support
- lmtp_save_to_detail_mailbox = yes
- recipient_delimiter = +
- }
- protocol imap {
- mail_plugins {
- imap_acl = yes
- }
- imap_client_workarounds = tb-extra-mailbox-sep
- mail_max_userip_connections = 10
- }
- protocol pop3 {
- pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
- pop3_uidl_format = %{uid | hex(8)}%{uidvalidity | hex(8)}
- mail_max_userip_connections = 10
- }
- service auth {
- unix_listener /var/spool/postfix/private/dovecot-auth {
- group = postfix
- mode = 0660
- user = postfix
- }
- unix_listener auth-master {
- user = mail
- group = mail
- mode = 0666
- }
- unix_listener auth-userdb {
- user = mail
- group = mail
- mode = 0660
- }
- }
- service lmtp {
- unix_listener /var/spool/postfix/private/dovecot-lmtp {
- user = postfix
- group = postfix
- mode = 0600
- }
- }
- namespace inbox {
- type = private
- separator = /
- prefix =
- inbox = yes
- mailbox Sent {
- auto = subscribe
- special_use = \Sent
- }
- mailbox "Sent Messages" {
- auto = no
- special_use = \Sent
- }
- mailbox "Sent Items" {
- auto = no
- special_use = \Sent
- }
- mailbox Drafts {
- auto = subscribe
- special_use = \Drafts
- }
- mailbox Trash {
- auto = subscribe
- special_use = \Trash
- }
- mailbox "Deleted Messages" {
- auto = no
- special_use = \Trash
- }
- mailbox Junk {
- auto = subscribe
- special_use = \Junk
- }
- mailbox Spam {
- auto = no
- special_use = \Junk
- }
- mailbox "Junk E-mail" {
- auto = no
- special_use = \Junk
- }
- mailbox Archive {
- auto = no
- special_use = \Archive
- }
- mailbox Archives {
- auto = no
- special_use = \Archive
- }
- }
- namespace shared {
- type = shared
- separator = /
- prefix = Shared/$user/
- list = children
- subscriptions = yes
- mail_driver = maildir
- mailbox_list_layout = fs
- mail_path = %{owner_home}
- mail_index_path = ~/Shared/%{owner_user}
- }
Advertisement
Add Comment
Please, Sign In to add comment