mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-02-17 14:53:56 +00:00
Compare commits
4 Commits
master
...
copilot/ex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ae8e02ac0 | ||
|
|
6633da54d4 | ||
|
|
c7d020f9ff | ||
|
|
c4135f7033 |
@@ -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)
|
||||
for plugin_file in mail_plugins_extra mail_plugins_imap_extra mail_plugins_lmtp_extra; do
|
||||
[[ ! -f /etc/dovecot/${plugin_file} ]] && touch /etc/dovecot/${plugin_file}
|
||||
done
|
||||
|
||||
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 <<EOF > /etc/dovecot/sql/dovecot-dict-sql-userdb.conf
|
||||
# Autogenerated by mailcow
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
# --------------------------------------------------------------------------
|
||||
# Please create a file "extra.conf" for persistent overrides to dovecot.conf
|
||||
# --------------------------------------------------------------------------
|
||||
# To extend mail_plugins, you have two options:
|
||||
#
|
||||
# Option 1 (Recommended): Use the extra plugin files directly
|
||||
# Create/edit data/conf/dovecot/mail_plugins_extra (for global plugins)
|
||||
# Create/edit data/conf/dovecot/mail_plugins_imap_extra (for IMAP-specific plugins)
|
||||
# Create/edit data/conf/dovecot/mail_plugins_lmtp_extra (for LMTP-specific plugins)
|
||||
# Note: These paths are on the host. Inside the container they are /etc/dovecot/mail_plugins_*
|
||||
# Example to add the virtual plugin for IMAP:
|
||||
# echo -n ' virtual' > data/conf/dovecot/mail_plugins_imap_extra
|
||||
# docker-compose restart dovecot-mailcow
|
||||
#
|
||||
# Option 2: Override protocol sections in extra.conf
|
||||
# Create data/conf/dovecot/extra.conf with protocol-specific overrides:
|
||||
# protocol imap {
|
||||
# mail_plugins = $mail_plugins virtual
|
||||
# }
|
||||
# Note: This requires redefining the entire protocol block and may override
|
||||
# other settings. Option 1 is simpler and less prone to conflicts.
|
||||
# --------------------------------------------------------------------------
|
||||
# LDAP example:
|
||||
#passdb {
|
||||
# args = /etc/dovecot/ldap/passdb.conf
|
||||
@@ -21,7 +40,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 = </etc/dovecot/mail_plugins
|
||||
mail_plugins = </etc/dovecot/mail_plugins </etc/dovecot/mail_plugins_extra
|
||||
mail_attachment_fs = crypt:set_prefix=mail_crypt_global:posix:
|
||||
mail_attachment_dir = /var/attachments
|
||||
mail_attachment_min_size = 128k
|
||||
@@ -180,12 +199,12 @@ userdb {
|
||||
skip = found
|
||||
}
|
||||
protocol imap {
|
||||
mail_plugins = </etc/dovecot/mail_plugins_imap
|
||||
mail_plugins = </etc/dovecot/mail_plugins_imap </etc/dovecot/mail_plugins_imap_extra
|
||||
imap_metadata = yes
|
||||
}
|
||||
mail_attribute_dict = file:%h/dovecot-attributes
|
||||
protocol lmtp {
|
||||
mail_plugins = </etc/dovecot/mail_plugins_lmtp
|
||||
mail_plugins = </etc/dovecot/mail_plugins_lmtp </etc/dovecot/mail_plugins_lmtp_extra
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
}
|
||||
protocol sieve {
|
||||
|
||||
Reference in New Issue
Block a user