mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
fix runtime dovecot/sieve-compile error on every incoming message
This commit is contained in:
@@ -359,6 +359,13 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool:
|
|||||||
mode="644",
|
mode="644",
|
||||||
)
|
)
|
||||||
need_restart |= sieve_script.changed
|
need_restart |= sieve_script.changed
|
||||||
|
if sieve_script.changed:
|
||||||
|
server.shell(
|
||||||
|
name=f"compile sieve script",
|
||||||
|
commands=[
|
||||||
|
f"/usr/bin/sievec /etc/dovecot/default.sieve"
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
files.template(
|
files.template(
|
||||||
src=importlib.resources.files(__package__).joinpath("dovecot/expunge.cron.j2"),
|
src=importlib.resources.files(__package__).joinpath("dovecot/expunge.cron.j2"),
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
require ["imap4flags"];
|
require ["imap4flags"];
|
||||||
|
|
||||||
|
# flag the message so it doesn't cause a push notification
|
||||||
|
|
||||||
if header :is ["Auto-Submitted"] ["auto-replied", "auto-generated"] {
|
if header :is ["Auto-Submitted"] ["auto-replied", "auto-generated"] {
|
||||||
addflag "$Auto";
|
addflag "$Auto";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user