create sieve dir if needed

This commit is contained in:
Spitfireap
2024-01-12 18:52:40 +01:00
committed by Antoine Nguyen
parent 86481417cf
commit a8b2f9f015

View File

@@ -4,6 +4,7 @@ import glob
import os
import pwd
import shutil
import stat
from .. import database
from .. import package
@@ -125,6 +126,17 @@ class Dovecot(base.Installer):
})
return context
def install_config_files(self):
"""Create sieve dir if needed."""
if self.app_config["move_spam_to_junk"]:
utils.mkdir_safe(
f"{self.config_dir}/conf.d/custom_after_sieve",
stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP |
stat.S_IROTH | stat.S_IXOTH,
0, 0
)
super().install_config_files()
def post_run(self):
"""Additional tasks."""
if self.dbengine == "postgres":