mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
dovecot: add tmpfs_index chatmail.ini parameter for storing index files in /dev/shm
This commit is contained in:
@@ -56,6 +56,7 @@ class Config:
|
||||
self.privacy_mail = params.get("privacy_mail")
|
||||
self.privacy_pdo = params.get("privacy_pdo")
|
||||
self.privacy_supervisor = params.get("privacy_supervisor")
|
||||
self.tmpfs_index = params.get("tmpfs_index", "false").lower() == "true"
|
||||
|
||||
# deprecated option
|
||||
mbdir = params.get("mailboxes_dir", f"/home/vmail/mail/{self.mail_domain}")
|
||||
|
||||
@@ -48,6 +48,9 @@ passthrough_senders =
|
||||
# (space-separated, item may start with "@" to whitelist whole recipient domains)
|
||||
passthrough_recipients =
|
||||
|
||||
# store index files in tmpfs (good for disk size and I/O, bad for ram)
|
||||
tmpfs_index = false
|
||||
|
||||
# path to www directory - documented here: https://chatmail.at/doc/relay/getting_started.html#custom-web-pages
|
||||
#www_folder = www
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[params]
|
||||
|
||||
tmpfs_index = true
|
||||
|
||||
[privacy]
|
||||
|
||||
|
||||
@@ -68,7 +68,11 @@ userdb {
|
||||
##
|
||||
|
||||
# Mailboxes are stored in the "mail" directory of the vmail user home.
|
||||
{% if config.tmpfs_index %}
|
||||
mail_location = maildir:{{ config.mailboxes_dir }}/%u:INDEX=/dev/shm/%u
|
||||
{% else %}
|
||||
mail_location = maildir:{{ config.mailboxes_dir }}/%u
|
||||
{% endif %}
|
||||
|
||||
# index/cache files are not very useful for chatmail relay operations
|
||||
# but it's not clear how to disable them completely.
|
||||
|
||||
Reference in New Issue
Block a user