-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
dovecot: update to 2.4 #6692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
dovecot: update to 2.4 #6692
Conversation
|
Nice! Can you add |
| !include_try /etc/dovecot/sni.conf | ||
| !include_try /etc/dovecot/sogo_trusted_ip.conf | ||
| !include_try /etc/dovecot/shared_namespace.conf | ||
| !include_try /etc/dovecot/conf.d/fts.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this line is needed anymore.
| driver = mysql | ||
| connect = "host=/var/run/mysqld/mysqld.sock dbname=${DBNAME} user=${DBUSER} password=${DBPASS}" | ||
| user_query = SELECT CONCAT(JSON_UNQUOTE(JSON_VALUE(attributes, '$.mailbox_format')), mailbox_path_prefix, '%d/%n/${MAILDIR_SUB}:VOLATILEDIR=/var/volatile/%u:INDEX=/var/vmail_index/%u') AS mail, '%s' AS protocol, 5000 AS uid, 5000 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND (active = '1' OR active = '2') | ||
| query = SELECT CONCAT(JSON_UNQUOTE(JSON_VALUE(attributes, '$.mailbox_format')), mailbox_path_prefix, '%{user | domain }}/%{user | username }/Maildir:VOLATILEDIR=/var/volatile/%{user}:INDEX=/var/vmail_index/%{user}') AS mail, '%{protocol}' AS protocol, 5000 AS uid, 5000 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%{user}' AND (active = '1' OR active = '2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You seem to have an accidental double-brace here - see "}}".
| function auth_password_verify(request, password) | ||
| request.domain = request.auth_user:match("@(.+)") or nil | ||
| if request.domain == nil then | ||
| return dovecot.auth.PASSDB_RESULT_USER_UNKNOWN, "No such user" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this return value, as well as the other return values, will return an error like Error: lua: passdb-lua: db-lua: auth_password_verify invalid return value (expected nil or table, got string). Instead, I think you should just return dovecot.auth.PASSDB_RESULT_USER_UNKNOWN without the string.
| driver = mysql | ||
| connect = "host=/var/run/mysqld/mysqld.sock dbname=${DBNAME} user=${DBUSER} password=${DBPASS}" | ||
| user_query = SELECT CONCAT(JSON_UNQUOTE(JSON_VALUE(attributes, '$.mailbox_format')), mailbox_path_prefix, '%d/%n/${MAILDIR_SUB}:VOLATILEDIR=/var/volatile/%u:INDEX=/var/vmail_index/%u') AS mail, '%s' AS protocol, 5000 AS uid, 5000 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND (active = '1' OR active = '2') | ||
| query = SELECT CONCAT(JSON_UNQUOTE(JSON_VALUE(attributes, '$.mailbox_format')), mailbox_path_prefix, '%{user | domain }}/%{user | username }/Maildir:VOLATILEDIR=/var/volatile/%{user}:INDEX=/var/vmail_index/%{user}') AS mail, '%{protocol}' AS protocol, 5000 AS uid, 5000 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%{user}' AND (active = '1' OR active = '2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you probably want to keep ${MAILDIR_SUB} instead of hard-coding Maildir for backward compatibility, along with the corresponding change in data/conf/dovecot/conf.d/10-mail.conf
Contribution Guidelines
What does this PR include?
Short Description
This pull request introduces a major overhaul and modernization of the Dovecot configuration for the mail server. The changes include a migration to new-style configuration files, significant improvements to SQL and authentication integration, updated plugin and service management, and enhanced security defaults. The Dockerfile is also updated to use a newer Alpine base image. Below are the most important changes grouped by theme:
Configuration Modernization and Structure:
data/conf/dovecot/conf.d/, covering core, mail, SSL, SQL, storage, performance, authentication, userdb, and service definitions for improved clarity and maintainability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Authentication and SQL Integration:
Plugin and Service Management:
quota_clone,mail_compress) and removed deprecated options, with conditional handling based on FTS settings.Security and Protocol Improvements:
Other Notable Changes:
These changes collectively bring the Dovecot setup up to date with current best practices, improve maintainability, and enhance both security and feature support.
Affected Containers
Did you run tests?
What did you tested?
WIP