Guest User

Untitled

a guest
Nov 13th, 2025
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. ## Dovecot configuration file
  2. # Dovecot configuration version. This must be the first setting in the
  3. # configuration file. It specifies the configuration syntax, the used setting
  4. # names and the expected default values.
  5. dovecot_config_version = 2.4.2
  6.  
  7. # Dovecot storage file format version. It specifies the oldest Dovecot version
  8. # that must be able to read files written by this Dovecot instance. The
  9. # intention is that when upgrading Dovecot cluster, this setting is first kept
  10. # as the old Dovecot version. Once the cluster is fully upgraded to a new
  11. # version and there is no intention to rollback to the old version anymore,
  12. # this version number can be increased.
  13. dovecot_storage_version = 2.4.2
  14.  
  15. # The configuration below is a minimal configuration file using system user authentication.
  16. # See https://doc.dovecot.org/latest/core/config/quick.html
  17.  
  18. !include_try conf.d/*.conf
  19.  
  20. protocols {
  21. imap = yes
  22. pop3 = yes
  23. sieve = yes
  24. lmtp = yes
  25. }
  26.  
  27. mail_home = /var/mail/%{user|domain}/%{user|username}@%{user|domain}
  28. mail_driver = maildir
  29. mail_path = ~
  30.  
  31. mail_uid = mail
  32. mail_gid = mail
  33.  
  34. auth_verbose = yes
  35. auth_verbose_passwords = yes
  36. auth_debug = yes
  37. auth_debug_passwords = yes
  38. mail_debug = yes
  39. log_debug = category=ssl
  40.  
  41. ssl = yes
  42. ssl_min_protocol = LATEST
  43. ssl_server_cert_file = /etc/letsencrypt/live/example.com/fullchain.pem
  44. ssl_server_key_file = /etc/letsencrypt/live/example.com/privkey.pem
  45. 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
  46.  
  47. auth_allow_cleartext = no
  48. auth_default_domain = example.com
  49. auth_mechanisms = plain login
  50. auth_master_user_separator = *
  51.  
  52. acl_ignore_namespace_prefix = no
  53. acl_driver = vfile
  54. acl_sharing_map {
  55. dict file {
  56. path = /var/mail/shared-folders/shared-mailboxes.db
  57. }
  58. }
  59.  
  60. sieve_script default {
  61. type = default
  62. name = default
  63. driver = file
  64. path = /etc/dovecot/sieve/default.sieve
  65. }
  66.  
  67. sql_driver = mysql
  68.  
  69. mysql localhost {
  70. user = username
  71. password = password
  72. dbname = postfix
  73. }
  74.  
  75. passdb_default_password_scheme = SHA256-CRYPT
  76.  
  77. passdb sql {
  78. 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'
  79. }
  80.  
  81. userdb sql {
  82. 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'
  83. }
  84.  
  85. protocol lda {
  86. mail_plugins = acl sieve
  87. auth_socket_path = /var/run/dovecot/auth-master
  88. deliver_log_format = mail from %f: msgid=%m %$
  89. lda_mailbox_autocreate = yes
  90. lda_mailbox_autosubscribe = yes
  91. }
  92.  
  93. protocol lmtp {
  94. mail_plugins = quota sieve
  95. postmaster_address = support
  96. lmtp_save_to_detail_mailbox = yes
  97. recipient_delimiter = +
  98. }
  99.  
  100. protocol imap {
  101. mail_plugins = acl imap_acl
  102. imap_client_workarounds = tb-extra-mailbox-sep
  103. mail_max_userip_connections = 10
  104. }
  105.  
  106. protocol pop3 {
  107. mail_plugins = acl
  108. pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  109. pop3_uidl_format = %{uid | hex(8)}%{uidvalidity | hex(8)}
  110. mail_max_userip_connections = 10
  111. }
  112.  
  113. service auth {
  114. unix_listener /var/spool/postfix/private/dovecot-auth {
  115. group = postfix
  116. mode = 0660
  117. user = postfix
  118. }
  119. unix_listener auth-master {
  120. user = mail
  121. group = mail
  122. mode = 0666
  123. }
  124. unix_listener auth-userdb {
  125. user = mail
  126. group = mail
  127. mode = 0660
  128. }
  129. }
  130.  
  131. namespace inbox {
  132. type = private
  133. separator = /
  134. prefix =
  135. inbox = yes
  136.  
  137. mailbox Sent {
  138. auto = subscribe
  139. special_use = \Sent
  140. }
  141. mailbox "Sent Messages" {
  142. auto = no
  143. special_use = \Sent
  144. }
  145. mailbox "Sent Items" {
  146. auto = no
  147. special_use = \Sent
  148. }
  149. mailbox Drafts {
  150. auto = subscribe
  151. special_use = \Drafts
  152. }
  153. mailbox Trash {
  154. auto = subscribe
  155. special_use = \Trash
  156. }
  157. mailbox "Deleted Messages" {
  158. auto = no
  159. special_use = \Trash
  160. }
  161. mailbox Junk {
  162. auto = subscribe
  163. special_use = \Junk
  164. }
  165. mailbox Spam {
  166. auto = no
  167. special_use = \Junk
  168. }
  169. mailbox "Junk E-mail" {
  170. auto = no
  171. special_use = \Junk
  172. }
  173. mailbox Archive {
  174. auto = no
  175. special_use = \Archive
  176. }
  177. mailbox Archives {
  178. auto = no
  179. special_use = \Archive
  180. }
  181. }
  182.  
  183. #namespace shared {
  184. # type = shared
  185. # prefix = Shared/
  186. # separator = /
  187. # location = /var/mail/%{user|domain}/%{user|username}@%{user|domain}
  188. # subscriptions = yes
  189. # list = children
  190. #}
  191.  
Advertisement
Add Comment
Please, Sign In to add comment