diff --git a/plinth/modules/email/__init__.py b/plinth/modules/email/__init__.py index e58ad50c0..867a3f824 100644 --- a/plinth/modules/email/__init__.py +++ b/plinth/modules/email/__init__.py @@ -176,12 +176,12 @@ def setup(helper, old_version=None): app.setup(old_version) # Setup - helper.call('post', privileged.home.repair) + helper.call('post', privileged.home.setup) app.get_component('letsencrypt-email-postfix').setup_certificates() app.get_component('letsencrypt-email-dovecot').setup_certificates() helper.call('post', privileged.domain.set_domains) - helper.call('post', privileged.postfix.repair) - helper.call('post', privileged.spam.repair) + helper.call('post', privileged.postfix.setup) + helper.call('post', privileged.spam.setup) # Reload actions.superuser_run('service', ['reload', 'postfix']) diff --git a/plinth/modules/email/privileged/home.py b/plinth/modules/email/privileged/home.py index 860cd1c52..886c6ed22 100644 --- a/plinth/modules/email/privileged/home.py +++ b/plinth/modules/email/privileged/home.py @@ -6,7 +6,7 @@ import subprocess from plinth import actions -def repair(): +def setup(): """Set correct permissions on /var/mail/ directory. For each user, /var/mail/ is the 'dovecot mail home' for that user. @@ -14,9 +14,9 @@ def repair(): directory. Ensure that 'others' can access /var/mail/. """ - actions.superuser_run('email', ['home', 'set_up']) + actions.superuser_run('email', ['home', 'setup']) -def action_set_up(): +def action_setup(): """Run chmod on /var/mail to remove all permissions for 'others'.""" subprocess.run(['chmod', 'o-rwx', '/var/mail'], check=True) diff --git a/plinth/modules/email/privileged/postfix.py b/plinth/modules/email/privileged/postfix.py index 72f47fc29..0ea743037 100644 --- a/plinth/modules/email/privileged/postfix.py +++ b/plinth/modules/email/privileged/postfix.py @@ -52,8 +52,8 @@ smtps_service = postconf.Service(service='smtps', type_='inet', private='n', SQLITE_ALIASES = 'sqlite:/etc/postfix/freedombox-aliases.cf' -def repair(): - """Tries to repair SASL, mail submission, and user lookup settings.""" +def setup(): + """Set SASL, mail submission, and user lookup settings.""" aliases.first_setup() actions.superuser_run('email', ['postfix', 'setup']) diff --git a/plinth/modules/email/privileged/spam.py b/plinth/modules/email/privileged/spam.py index 7d36e587c..e5597d070 100644 --- a/plinth/modules/email/privileged/spam.py +++ b/plinth/modules/email/privileged/spam.py @@ -16,11 +16,13 @@ _milter_config = { } -def repair(): - actions.superuser_run('email', ['spam', 'set_filter']) +def setup(): + """Trigger a privileged setup action.""" + actions.superuser_run('email', ['spam', 'setup']) -def action_set_filter(): +def action_setup(): + """Compile sieve filters and set rspamd/postfix configuration.""" _compile_sieve() _setup_rspamd() postfix.set_config(_milter_config)