Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker_notes:docker-mailserver [2025-06-02 Mon wk23 13:10] – [dovecot] baumkpdocker_notes:docker-mailserver [2025-06-07 Sat wk23 18:45] (current) – [dovecot.conf] baumkp
Line 371: Line 371:
  
 =====dovecot===== =====dovecot=====
-In Dovecot <2.4.x the main configuration were in files ''/etc/dovecot/conf.d'', /etc/dovecot/dovecot.conf is still used and can be used for all configuration. In Dovecot >= 2.4.x the main configuration is in /etc/dovecot/dovecot.conf, however configuration files in /etc/dovecot/conf.d may also still be used.  That being said Dovecot version 2.4.x has significant break configuration setting changes from earlier version.+In Dovecot <2.4.x the main configuration are in files ''/etc/dovecot/conf.d'', although /etc/dovecot/dovecot.conf is still used and can be used for all configuration. In Dovecot >= 2.4.x the main configuration is in /etc/dovecot/dovecot.conf, however configuration files in /etc/dovecot/conf.d may also still be used.  That being saidDovecot version 2.4.x has significant breaking configuration setting changes from earlier versions.
 <code>/ # dovecot --version <code>/ # dovecot --version
 2.3.20 (80a5ac675d) </code> 2.3.20 (80a5ac675d) </code>
Line 377: Line 377:
   *''doveconf -n''  to print parameters specifically changed in main.cf   *''doveconf -n''  to print parameters specifically changed in main.cf
  
-Dovecot version 2.4.0 seems to have broken the configuration files from 2.3.x and earlier.  Alpine Linux version 3.22 from May 2025 used Dovecot 2.4.1 and while I can use an older version of Alpine eventually I would need to upgrade Dovecot to the new configuration file syntax.  Basically Dovecot now recommends placing all configuration in one configuration file instead of many, ''/etc/dovecot/dovecot.conf'' It does allow the previous  configuration files under /etc/dovecot/conf.d to be used by the directive ''!include conf.d/*.conf'' in the dovecot.conf file.  The later directives will overwrite previous. Below is a copy on my update dovecot.conf file that appears to function on Dovecot 2.4.1.+Alpine Linux version 3.22 from May 2025 used Dovecot 2.4.1 and while I can use an older version of Alpine eventually I would need to upgrade Dovecot to the new configuration file syntax.  Basically Dovecot now recommends placing all configuration in one configuration file instead of many, ''/etc/dovecot/dovecot.conf'' It does allow the previous  configuration files under /etc/dovecot/conf.d to be used by the directive ''!include conf.d/*.conf'' in the dovecot.conf file.  The later directives will overwrite previous. Below is a copy on my update dovecot.conf file that appears to function on Dovecot 2.4.1. See [[https://doc.dovecot.org/2.4.1/core/settings/syntax.html#config-version|Dovecot Config File Syntax ]] 
 +====dovecot.conf====
 ++++/etc/dovecot/dovecot.conf| ++++/etc/dovecot/dovecot.conf|
-<code># Start new configs with the latest Dovecot version numbers here: +# Start new configs with the latest Dovecot version numbers here:\\ 
-dovecot_config_version = 2.4.1 +[[https://doc.dovecot.org/main/core/summaries/settings.html#dovecot_config_version|dovecot_config_version]] = 2.4.1\\ 
-dovecot_storage_version = 2.4.1+[[https://doc.dovecot.org/main/core/summaries/settings.html#dovecot_storage_version|dovecot_storage_version]] = 2.4.1\\
  
-#mail_debug = yes +#[[https://doc.dovecot.org/main/core/summaries/settings.html#mail_debug|mail_debug]] = yes\\ 
-#log_debug = category=ssl +#[[https://doc.dovecot.org/main/core/summaries/settings.html#log_debug|log_debug]] = category=ssl\\ 
-mail_cache_max_size = 128M+[[https://doc.dovecot.org/main/core/summaries/settings.html#mail_cache_max_size|mail_cache_max_size]] = 128M\\
  
-auth_mechanisms = plain login +[[https://doc.dovecot.org/main/core/summaries/settings.html#auth_mechanisms|auth_mechanisms]] = plain login\\ 
-info_log_path = /var/log/dovecot-info.log +[[https://doc.dovecot.org/main/core/summaries/settings.html#info_log_path|info_log_path]] = /var/log/dovecot-info.log\\ 
-log_path = /var/log/dovecot.log +[[https://doc.dovecot.org/main/core/summaries/settings.html#log_path|log_path]] = /var/log/dovecot.log\\ 
-mail_driver = maildir +[[https://doc.dovecot.org/main/core/summaries/settings.html#mail_driver|mail_driver]] = maildir\\ 
-mail_path = ~/Maildir +mail_path = ~/Maildir\\
  
-mail_plugins { +mail_plugins {\\ 
-  quota = yes +  quota = yes\\ 
-}+}\\
  
-#sieve_plugins { +#sieve_plugins {\\ 
-#  sieve_extprograms = yes +#  sieve_extprograms = yes\\ 
-#}+#}\\
  
-managesieve_notify_capability = mailto +managesieve_notify_capability = mailto\\ 
-managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext+managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext\\
  
-mbox_write_locks = fcntl+mbox_write_locks = fcntl\\
  
-namespace inbox { +namespace inbox {\\ 
-  inbox = yes +  inbox = yes\\ 
-  mailbox Drafts { +  mailbox Drafts {\\ 
-    special_use = \Drafts +    special_use = \Drafts\\ 
-  } +  }\\ 
-  mailbox Junk { +  mailbox Junk {\\ 
-    special_use = \Junk +    special_use = \Junk\\ 
-  } +  }\\ 
-  mailbox Sent { +  mailbox Sent {\\ 
-    special_use = \Sent +    special_use = \Sent\\ 
-  } +  }\\ 
-  mailbox "Sent Messages"+  mailbox "Sent Messages" {\\ 
-    special_use = \Sent +    special_use = \Sent\\ 
-  } +  }\\ 
-  mailbox Trash { +  mailbox Trash {\\ 
-    special_use = \Trash +    special_use = \Trash\\ 
-  } +  }\\ 
-  prefix =  +  prefix = \\ 
-}+}\\
  
-quota "Shared quota" { +quota "Shared quota" {\\ 
-#quota = maildir:User quota +#quota = maildir:User quota\\ 
-  quota_status_nouser = DUNNO +  quota_status_nouser = DUNNO\\ 
-  quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails +  quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails\\ 
-  quota_status_success = DUNNO +  quota_status_success = DUNNO\\ 
-  warning warn-95 { +  warning warn-95 {\\ 
-    quota_storage_percentage = 95  +    quota_storage_percentage = 95 \\ 
-    execute quota-warning { +    execute quota-warning {\\ 
-      args = 95 %{user} +      args = 95 %{user}\\ 
-      } +      }\\ 
-    } +    }\\ 
-  warning warn-80 { +  warning warn-80 {\\ 
-    quota_storage_percentage = 80 +    quota_storage_percentage = 80\\ 
-    execute quota-warning { +    execute quota-warning {\\ 
-      args = 80 %{user} +      args = 80 %{user}\\ 
-      } +      }\\ 
-    } +    }\\ 
-}+}\\
  
-#sieve = file:~/sieve;active=~/.dovecot.sieve +#sieve = file:~/sieve;active=~/.dovecot.sieve\\ 
-sieve_script_driver = file +sieve_script_driver = file\\ 
-sieve_script_active_path = ~/.dovecot.sieve +sieve_script_active_path = ~/.dovecot.sieve\\ 
-sieve_script_type = after  +sieve_script_type = after \\ 
-sieve_script_path = /etc/dovecot/sieve-after+sieve_script_path = /etc/dovecot/sieve-after\\
  
-protocols = imap lmtp +protocols = imap lmtp\\ 
-service auth { +service auth {\\ 
-  unix_listener /var/spool/postfix/private/auth { +  unix_listener /var/spool/postfix/private/auth {\\ 
-    group = postfix +    group = postfix\\ 
-    mode = 0660 +    mode = 0660\\ 
-    user = postfix +    user = postfix\\ 
-  } +  }\\ 
-+}\\ 
-service lmtp { +service lmtp {\\ 
-  unix_listener /var/spool/postfix/private/dovecot-lmtp { +  unix_listener /var/spool/postfix/private/dovecot-lmtp {\\ 
-    group = postfix +    group = postfix\\ 
-    mode = 0600 +    mode = 0600\\ 
-    user = postfix +    user = postfix\\ 
-  } +  }\\ 
-+}\\ 
-service quota-status { +service quota-status {\\ 
-  executable = quota-status -p postfix +  executable = quota-status -p postfix\\ 
-  unix_listener /var/spool/postfix/private/quota-status { +  unix_listener /var/spool/postfix/private/quota-status {\\ 
-    user = postfix +    user = postfix\\ 
-  } +  }\\ 
-+}\\ 
-service quota-warning { +service quota-warning {\\ 
-  executable = script /usr/local/bin/quota-warning.sh +  executable = script /usr/local/bin/quota-warning.sh\\ 
-  unix_listener quota-warning { +  unix_listener quota-warning {\\ 
-    group = vmail +    group = vmail\\ 
-    mode = 0660 +    mode = 0660\\ 
-    user = vmail +    user = vmail\\ 
-  } +  }\\ 
-+}\\ 
-ssl = required +ssl = required\\ 
-ssl_server_cert_file = /app/certificates/kptree.net.cer +ssl_server_cert_file = /app/certificates/kptree.net.cer\\ 
-ssl_server_dh_file = /etc/dovecot/dh.pem  +ssl_server_dh_file = /etc/dovecot/dh.pem \\ 
-ssl_server_key_file = /app/certificates/kptree.net.key +ssl_server_key_file = /app/certificates/kptree.net.key\\ 
-ssl_server_prefer_ciphers = server +ssl_server_prefer_ciphers = server\\ 
-ssl_min_protocol = TLSv1.2+ssl_min_protocol = TLSv1.2\\
  
-sql_driver = mysql+sql_driver = mysql\\
  
-mysql localhost { +mysql localhost {\\ 
-  host = mail_db  +  host = mail_db \\ 
-  dbname = mailserver +  dbname = mailserver\\ 
-  user = mailserver  +  user = mailserver \\ 
-  password = K6oF4xOZFIo2cYrwTQ03jQWwx7t2my +  password = K6oF4xOZFIo2cYrwTQ03jQWwx7t2my\\ 
-}+}\\
  
-passdb sql { +passdb sql {\\ 
-  query = SELECT password FROM virtual_users WHERE email='%{user}' +  query = SELECT password FROM virtual_users WHERE email='%{user}'\\ 
-}+}\\
  
-userdb sql {+userdb sql {\\
   query = SELECT email as user, \   query = SELECT email as user, \
   concat('*:bytes=', quota) AS quota_rule, \   concat('*:bytes=', quota) AS quota_rule, \
   '/var/vmail/%{user | domain}/%{user | username}' AS home, \   '/var/vmail/%{user | domain}/%{user | username}' AS home, \
   5000 AS uid, 5000 AS gid \   5000 AS uid, 5000 AS gid \
-  FROM virtual_users WHERE email='%{user}' +  FROM virtual_users WHERE email='%{user}'\\ 
-  iterate_query = SELECT email AS user FROM virtual_users +  iterate_query = SELECT email AS user FROM virtual_users\\ 
-}+}\\
  
-protocol lmtp { +protocol lmtp {\\ 
-  mail_plugins = " quota sieve" +  mail_plugins = " quota sieve"\\ 
-}+}\\
  
-protocol imap { +protocol imap {\\ 
-  mail_plugins = " quota imap_quota" +  mail_plugins = " quota imap_quota"\\ 
-}+}\\
  
-#!include conf.d/*.conf  </code>+#!include conf.d/*.conf\\
 ++++ ++++
  
Line 635: Line 636:
  
 ====dovecot logging==== ====dovecot logging====
 +
 +====dovecot pigeonhole====
 +Pigeonhole is the name of the project that adds support for the [[http://www.sieve.info/|Sieve language (RFC 5228)]] and the [[http://tools.ietf.org/html/rfc5804|ManageSieve protocol (RFC 5804)]] to the [[http://www.dovecot.org/|Dovecot Secure IMAP Server]].
  
 ====Dovecot References==== ====Dovecot References====