devocot optimize index

This commit is contained in:
cronekorkn 2022-10-18 18:14:58 +02:00
parent a7d02ca428
commit 702f83ed44
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
3 changed files with 23 additions and 10 deletions

View file

@ -2,7 +2,14 @@ connect = host=${host} dbname=${name} user=${user} password=${password}
driver = pgsql
default_pass_scheme = ARGON2ID
password_query = SELECT CONCAT(users.name, '@', domains.name) AS user, password\
user_query = SELECT '/var/vmail/%u' AS home, 'vmail' AS uid, 'vmail' AS gid
iterate_query = SELECT CONCAT(users.name, '@', domains.name) AS user \
FROM users \
LEFT JOIN domains ON users.domain_id = domains.id \
WHERE redirect IS NULL
password_query = SELECT CONCAT(users.name, '@', domains.name) AS user, password \
FROM users \
LEFT JOIN domains ON users.domain_id = domains.id \
WHERE redirect IS NULL \

View file

@ -13,19 +13,19 @@ namespace inbox {
inbox = yes
separator = .
mailbox Drafts {
auto = subscribe
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = create
auto = create
special_use = \Junk
}
mailbox Trash {
auto = subscribe
auto = subscribe
special_use = \Trash
}
mailbox Sent {
auto = subscribe
auto = subscribe
special_use = \Sent
}
}
@ -35,8 +35,8 @@ passdb {
args = /etc/dovecot/dovecot-sql.conf
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/vmail/%u
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
service auth {
@ -80,10 +80,10 @@ protocol imap {
mail_plugins = $mail_plugins imap_sieve
mail_max_userip_connections = 50
imap_idle_notify_interval = 29 mins
}
}
protocol lmtp {
mail_plugins = $mail_plugins sieve
}
}
protocol sieve {
plugin {
sieve = /var/vmail/sieve/%u.sieve
@ -117,7 +117,7 @@ plugin {
sieve_dir = /var/vmail/sieve/%u/
sieve = /var/vmail/sieve/%u.sieve
sieve_pipe_bin_dir = /var/vmail/sieve/bin
sieve_extensions = +vnd.dovecot.pipe
sieve_extensions = +vnd.dovecot.pipe
sieve_after = /var/vmail/sieve/global/spam-to-folder.sieve

View file

@ -29,6 +29,12 @@ defaults = {
'tcp dport {143, 993, 4190} accept',
},
},
'systemd-timers': {
'dovecot-optimize-index': {
'command': '/usr/bin/doveadm fts optimize -A',
'when': 'daily',
},
},
}
@metadata_reactor.provides(