mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
email: Use the term 'setup' rather than 'repair' for consistency
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
55bd428bd7
commit
ef6619d8d6
@ -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'])
|
||||
|
||||
@ -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/<user> 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)
|
||||
|
||||
@ -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'])
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user