mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
add imap_compress option to chatmail.ini
This commit is contained in:
@@ -44,6 +44,7 @@ class Config:
|
|||||||
self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true"
|
self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true"
|
||||||
self.acme_email = params.get("acme_email", "")
|
self.acme_email = params.get("acme_email", "")
|
||||||
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
|
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
|
||||||
|
self.imap_compress = params.get("imap_compress", "false").lower() == "true"
|
||||||
if "iroh_relay" not in params:
|
if "iroh_relay" not in params:
|
||||||
self.iroh_relay = "https://" + params["mail_domain"]
|
self.iroh_relay = "https://" + params["mail_domain"]
|
||||||
self.enable_iroh_relay = True
|
self.enable_iroh_relay = True
|
||||||
|
|||||||
@@ -99,6 +99,12 @@ acme_email =
|
|||||||
# so use this option with caution on production servers.
|
# so use this option with caution on production servers.
|
||||||
imap_rawlog = false
|
imap_rawlog = false
|
||||||
|
|
||||||
|
# set to true if you want to enable the IMAP COMPRESS Extension,
|
||||||
|
# which allows IMAP connections to be efficiently compressed.
|
||||||
|
# WARNING: Enabling this makes it impossible to hibernate IMAP
|
||||||
|
# processes which will result in much higher memory/RAM usage.
|
||||||
|
imap_compress = false
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Privacy Policy
|
# Privacy Policy
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ mail_attribute_dict = proxy:/run/chatmail-metadata/metadata.socket:metadata
|
|||||||
# `imap_zlib` enables IMAP COMPRESS (RFC 4978).
|
# `imap_zlib` enables IMAP COMPRESS (RFC 4978).
|
||||||
# <https://datatracker.ietf.org/doc/html/rfc4978.html>
|
# <https://datatracker.ietf.org/doc/html/rfc4978.html>
|
||||||
protocol imap {
|
protocol imap {
|
||||||
mail_plugins = $mail_plugins imap_zlib imap_quota last_login
|
mail_plugins = $mail_plugins imap_quota last_login {% if config.imap_compress %}imap_zlib{% endif %}
|
||||||
imap_metadata = yes
|
imap_metadata = yes
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,3 +252,26 @@ protocol imap {
|
|||||||
rawlog_dir = %h
|
rawlog_dir = %h
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Hibernate IDLE users to save memory and CPU resources
|
||||||
|
# NOTE: this will have no effect if imap_zlib plugin is used
|
||||||
|
imap_hibernate_timeout = 30s
|
||||||
|
service imap {
|
||||||
|
# Note that this change will allow any process running as
|
||||||
|
# $default_internal_user (dovecot) to access mails as any other user.
|
||||||
|
# This may be insecure in some installations, which is why this isn't
|
||||||
|
# done by default.
|
||||||
|
unix_listener imap-master {
|
||||||
|
user = $default_internal_user
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# The following is the default already in v2.3.1+:
|
||||||
|
service imap {
|
||||||
|
extra_groups = $default_internal_group
|
||||||
|
}
|
||||||
|
service imap-hibernate {
|
||||||
|
unix_listener imap-hibernate {
|
||||||
|
mode = 0660
|
||||||
|
group = $default_internal_group
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user