feat(dovecot): add support for configuring imap_capability
This introduces the `dovecot_imap_capability` variable to allow customization of advertised IMAP capabilities. - Add `dovecot_imap_capability` to `defaults/main.yml` (defaulting to empty). - Update `templates/dovecot.conf.j2` to conditionally include the `protocol imap` block if the capability string is provided. - This enables operators to add or remove specific IMAP extensions (e.g., disabling `LITERAL+` or `NOTIFY`) for client compatibility.
This commit is contained in:
@@ -45,6 +45,13 @@ dovecot_enabled: true
|
|||||||
# Protocols to enable (imap, pop3, lmtp)
|
# Protocols to enable (imap, pop3, lmtp)
|
||||||
dovecot_protocols: "imap pop3 lmtp"
|
dovecot_protocols: "imap pop3 lmtp"
|
||||||
|
|
||||||
|
# IMAP capability adjustments. Set to modify advertised IMAP capabilities.
|
||||||
|
# Use +CAPABILITY to add, -CAPABILITY to remove.
|
||||||
|
# Example: "+IMAP4rev1 -LITERAL+ -NOTIFY" removes modern extensions that
|
||||||
|
# might suppress standard untagged responses.
|
||||||
|
# Leave empty to use Dovecot defaults.
|
||||||
|
dovecot_imap_capability: ""
|
||||||
|
|
||||||
# Mail storage location. Using Maildir in the user's home directory.
|
# Mail storage location. Using Maildir in the user's home directory.
|
||||||
dovecot_mail_location: "maildir:~/Maildir"
|
dovecot_mail_location: "maildir:~/Maildir"
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,12 @@
|
|||||||
# Ansible managed: {{ ansible_managed }}
|
# Ansible managed: {{ ansible_managed }}
|
||||||
|
|
||||||
protocols = {{ dovecot_protocols }}
|
protocols = {{ dovecot_protocols }}
|
||||||
|
{% if dovecot_imap_capability | default('') | length > 0 %}
|
||||||
|
|
||||||
|
protocol imap {
|
||||||
|
imap_capability = {{ dovecot_imap_capability }}
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Dictionary of configuration files
|
# Dictionary of configuration files
|
||||||
!include conf.d/*.conf
|
!include conf.d/*.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user