Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| docker_notes:docker-mailserver [2025-06-01 Sun wk22 18:56] – [dovecot] baumkp | docker_notes:docker-mailserver [2025-08-16 Sat wk33 19:39] (current) – [exim] baumkp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{tag> | {{tag> | ||
| ======Docker mailserver====== | ======Docker mailserver====== | ||
| - | This mailserver setup follows Workaround' | + | This mailserver setup follows Workaround' |
| //As this follows Workaround' | //As this follows Workaround' | ||
| Line 371: | Line 371: | ||
| =====dovecot===== | =====dovecot===== | ||
| - | ''/ | + | In Dovecot <2.4.x the main configuration are in files ''/ |
| < | < | ||
| 2.3.20 (80a5ac675d) </ | 2.3.20 (80a5ac675d) </ | ||
| Line 377: | Line 377: | ||
| *'' | *'' | ||
| - | 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 |
| + | ++++Discussion on configuration files| | ||
| + | I suspect the '' | ||
| + | The only other issue is use of override files in '' | ||
| + | ++++ | ||
| + | ====dovecot.conf==== | ||
| + | ++++/ | ||
| + | # Start new configs with the latest Dovecot version numbers here:\\ | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | # | ||
| + | # | ||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | mail_path = ~/ | ||
| + | |||
| + | mail_plugins {\\ | ||
| + | quota = yes\\ | ||
| + | }\\ | ||
| + | |||
| + | # | ||
| + | # sieve_extprograms = yes\\ | ||
| + | #}\\ | ||
| + | |||
| + | managesieve_notify_capability = mailto\\ | ||
| + | managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i; | ||
| + | |||
| + | mbox_write_locks = fcntl\\ | ||
| + | |||
| + | namespace inbox {\\ | ||
| + | inbox = yes\\ | ||
| + | mailbox Drafts {\\ | ||
| + | special_use = \Drafts\\ | ||
| + | }\\ | ||
| + | mailbox Junk {\\ | ||
| + | special_use = \Junk\\ | ||
| + | }\\ | ||
| + | mailbox Sent {\\ | ||
| + | special_use = \Sent\\ | ||
| + | }\\ | ||
| + | mailbox "Sent Messages" | ||
| + | special_use = \Sent\\ | ||
| + | }\\ | ||
| + | mailbox Trash {\\ | ||
| + | special_use = \Trash\\ | ||
| + | }\\ | ||
| + | prefix = \\ | ||
| + | }\\ | ||
| + | |||
| + | quota " | ||
| + | #quota = maildir: | ||
| + | quota_status_nouser = DUNNO\\ | ||
| + | quota_status_overquota = 452 4.2.2 Mailbox is full and cannot receive any more emails\\ | ||
| + | quota_status_success = DUNNO\\ | ||
| + | warning warn-95 {\\ | ||
| + | quota_storage_percentage = 95 \\ | ||
| + | execute quota-warning {\\ | ||
| + | args = 95 %{user}\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | warning warn-80 {\\ | ||
| + | quota_storage_percentage = 80\\ | ||
| + | execute quota-warning {\\ | ||
| + | args = 80 %{user}\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | |||
| + | #sieve = file: | ||
| + | sieve_script_driver = file\\ | ||
| + | sieve_script_active_path = ~/ | ||
| + | sieve_script_type = after \\ | ||
| + | sieve_script_path = / | ||
| + | |||
| + | protocols = imap lmtp\\ | ||
| + | service auth {\\ | ||
| + | unix_listener / | ||
| + | group = postfix\\ | ||
| + | mode = 0660\\ | ||
| + | user = postfix\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | service lmtp {\\ | ||
| + | unix_listener / | ||
| + | group = postfix\\ | ||
| + | mode = 0600\\ | ||
| + | user = postfix\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | service quota-status {\\ | ||
| + | executable = quota-status -p postfix\\ | ||
| + | unix_listener / | ||
| + | user = postfix\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | service quota-warning {\\ | ||
| + | executable = script / | ||
| + | unix_listener quota-warning {\\ | ||
| + | group = vmail\\ | ||
| + | mode = 0660\\ | ||
| + | user = vmail\\ | ||
| + | }\\ | ||
| + | }\\ | ||
| + | ssl = required\\ | ||
| + | ssl_server_cert_file = / | ||
| + | ssl_server_dh_file = / | ||
| + | ssl_server_key_file = / | ||
| + | ssl_server_prefer_ciphers = server\\ | ||
| + | ssl_min_protocol = TLSv1.2\\ | ||
| + | |||
| + | sql_driver = mysql\\ | ||
| + | |||
| + | mysql localhost {\\ | ||
| + | host = mail_db \\ | ||
| + | dbname = mailserver\\ | ||
| + | user = mailserver \\ | ||
| + | password = K6oF4xOZFIo2cYrwTQ03jQWwx7t2my\\ | ||
| + | }\\ | ||
| + | |||
| + | passdb sql {\\ | ||
| + | query = SELECT password FROM virtual_users WHERE email=' | ||
| + | }\\ | ||
| + | |||
| + | userdb sql {\\ | ||
| + | query = SELECT email as user, \ | ||
| + | concat(' | ||
| + | '/ | ||
| + | 5000 AS uid, 5000 AS gid \ | ||
| + | FROM virtual_users WHERE email=' | ||
| + | iterate_query = SELECT email AS user FROM virtual_users\\ | ||
| + | }\\ | ||
| + | |||
| + | protocol lmtp {\\ | ||
| + | mail_plugins = " quota sieve" | ||
| + | }\\ | ||
| + | |||
| + | protocol imap {\\ | ||
| + | mail_plugins = " quota imap_quota" | ||
| + | }\\ | ||
| + | |||
| + | #!include conf.d/ | ||
| + | ++++ | ||
| ====dovecot database configuration and testing==== | ====dovecot database configuration and testing==== | ||
| Line 493: | Line 640: | ||
| ====dovecot logging==== | ====dovecot logging==== | ||
| + | |||
| + | ====dovecot pigeonhole==== | ||
| + | Pigeonhole is the name of the project that adds support for the [[http:// | ||
| ====Dovecot References==== | ====Dovecot References==== | ||
| *Doc Dovecot: | *Doc Dovecot: | ||
| - | *[[https:// | + | *[[https:// |
| - | *[[https://doc.dovecot.org/ | + | |
| - | *[[https:// | + | |
| - | *[[https://wiki.dovecot.org/ | + | |
| - | *[[https:// | + | |
| - | *[[https://wiki2.dovecot.org/ | + | *[[https://doc.dovecot.org/ |
| - | *[[https:// | + | *[[https:// |
| - | *[[https:// | + | *[[https://doc.dovecot.org/ |
| - | *[[https://wiki.dovecot.org/ | + | *[[https:// |
| - | *[[https:// | + | *[[https:// |
| - | *[[https://wiki1.dovecot.org/ | + | *[[https://doc.dovecot.org/ |
| - | *[[https:// | + | *[[https://doc.dovecot.org/ |
| - | *[[https:// | + | *[[https:// |
| - | *[[https:// | + | *[[https:// |
| - | *Other: | + | *Other: |
| - | *[[http:// | + | *[[http:// |
| - | *[[http:// | + | *[[http:// |
| - | *[[https:// | + | *[[https:// |
| - | | + | ++++ |
| =====Certificates SSL/ | =====Certificates SSL/ | ||
| Early on, before 2015 there were not many free SSL certificate providers. I used StartSSL for a free certificate. | Early on, before 2015 there were not many free SSL certificate providers. I used StartSSL for a free certificate. | ||
| Line 884: | Line 1033: | ||
| *[[https:// | *[[https:// | ||
| *[[https:// | *[[https:// | ||
| + | |||
| + | =====exim===== | ||
| + | After updating my VM from Debian 12 to 13 the mailserver container refused to start as it indicated that port 25 was already in use. | ||
| + | |||
| + | It would seem that Debian 13 automatically installed and starts Exim, some kind of system email client. | ||
| + | |||
| + | The solution was simply to stop and disable Exim from running, '' | ||
| + | |||
| + | The method to find the program using the port was the command '' | ||
| + | |||
| + | |||
| =====References===== | =====References===== | ||
| *Workaround.org [[https:// | *Workaround.org [[https:// | ||