diff --git a/data/Dockerfiles/dovecot/docker-entrypoint.sh b/data/Dockerfiles/dovecot/docker-entrypoint.sh index e58abbb6a..f73775404 100755 --- a/data/Dockerfiles/dovecot/docker-entrypoint.sh +++ b/data/Dockerfiles/dovecot/docker-entrypoint.sh @@ -121,7 +121,13 @@ echo -n 'quota acl zlib mail_crypt mail_crypt_acl mail_log notify fts fts_flatcu echo -n 'quota imap_quota imap_acl acl zlib imap_zlib imap_sieve mail_crypt mail_crypt_acl notify mail_log fts fts_flatcurve listescape replication' > /etc/dovecot/mail_plugins_imap echo -n 'quota sieve acl zlib mail_crypt mail_crypt_acl fts fts_flatcurve notify listescape replication' > /etc/dovecot/mail_plugins_lmtp fi -chmod 644 /etc/dovecot/mail_plugins /etc/dovecot/mail_plugins_imap /etc/dovecot/mail_plugins_lmtp /templates/quarantine.tpl + +# Create empty extra plugin files if they don't exist (can be populated via extra.conf or direct file) +[[ ! -f /etc/dovecot/mail_plugins_extra ]] && touch /etc/dovecot/mail_plugins_extra +[[ ! -f /etc/dovecot/mail_plugins_imap_extra ]] && touch /etc/dovecot/mail_plugins_imap_extra +[[ ! -f /etc/dovecot/mail_plugins_lmtp_extra ]] && touch /etc/dovecot/mail_plugins_lmtp_extra + +chmod 644 /etc/dovecot/mail_plugins /etc/dovecot/mail_plugins_imap /etc/dovecot/mail_plugins_lmtp /etc/dovecot/mail_plugins_extra /etc/dovecot/mail_plugins_imap_extra /etc/dovecot/mail_plugins_lmtp_extra /templates/quarantine.tpl cat < /etc/dovecot/sql/dovecot-dict-sql-userdb.conf # Autogenerated by mailcow diff --git a/data/conf/dovecot/dovecot.conf b/data/conf/dovecot/dovecot.conf index 05d9264fa..828c23ef1 100644 --- a/data/conf/dovecot/dovecot.conf +++ b/data/conf/dovecot/dovecot.conf @@ -1,6 +1,13 @@ # -------------------------------------------------------------------------- # Please create a file "extra.conf" for persistent overrides to dovecot.conf # -------------------------------------------------------------------------- +# To extend mail_plugins, you can either: +# 1. Create/edit /etc/dovecot/mail_plugins_extra (for global plugins) +# 2. Create/edit /etc/dovecot/mail_plugins_imap_extra (for IMAP-specific plugins) +# 3. Create/edit /etc/dovecot/mail_plugins_lmtp_extra (for LMTP-specific plugins) +# For example, to add the virtual plugin globally: +# echo -n ' virtual' > data/conf/dovecot/mail_plugins_extra +# -------------------------------------------------------------------------- # LDAP example: #passdb { # args = /etc/dovecot/ldap/passdb.conf @@ -21,7 +28,7 @@ disable_plaintext_auth = yes login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k" mail_home = /var/vmail/%d/%n mail_location = maildir:~/ -mail_plugins =