email: Minor indentation and docstring changes

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-02-14 20:09:05 -08:00 committed by James Valleroy
parent 11b4b8fa93
commit 1bc576387e
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
16 changed files with 23 additions and 25 deletions

View File

@ -1,5 +1,7 @@
"""FreedomBox email server app"""
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
FreedomBox app to manage an email server.
"""
import logging

View File

@ -23,7 +23,7 @@ def get_domains():
def set_domains(primary_domain=None):
"""Set the primary domain and all the domains for postfix. """
"""Set the primary domain and all the domains for postfix."""
all_domains = DomainName.list_names()
if not primary_domain:
primary_domain = get_domains()['primary_domain']
@ -36,7 +36,7 @@ def set_domains(primary_domain=None):
def action_set_domains(primary_domain, all_domains):
"""Set the primary domain and all the domains for postfix. """
"""Set the primary domain and all the domains for postfix."""
all_domains = [_clean_domain(domain) for domain in all_domains.split(',')]
primary_domain = _clean_domain(primary_domain)

View File

@ -1,6 +1,8 @@
"""Provides the diagnosis of SASL, mail submission, and user database lookup
configurations"""
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Configure postfix to use auth and local delivery with dovecot. Start smtps and
submission services. Setup aliases database.
"""
import plinth.modules.email.aliases as aliases
import plinth.modules.email.postconf as postconf

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
# Outlook and Windows Mail works only with LOGIN mechanism, not the standard
# PLAIN:

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
# Users in FreedomBox are not expected to access mail by logging into the
# system. Storing the mail in single location instead of home directories and

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
# Use sdbox, a format specific to dovecot, for storing mails. The format allows
# better performance with some IMAP queries. When this is combined with Full

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
protocol lmtp {
mail_plugins = $mail_plugins sieve

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
# Mark various mailboxes with special use flags (RFC 6154). Various names used
# in mail clients for mailboxes: https://www.imapwiki.org/SpecialUse

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
service auth {
unix_listener /var/spool/postfix/private/auth {

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox
# Do not edit this file. Manage your settings on FreedomBox.
# Mozilla Guideline v5.6, Dovecot 2.3.9, OpenSSL 1.1.1d, intermediate
# Generated 2021-08

View File

@ -1,5 +1,4 @@
# Direct edits to this file will be lost!
# Manage your settings on FreedomBox <https://localhost/plinth/apps/email/>
# Do not edit this file. Manage your settings on FreedomBox.
plugin {
sieve_after = /etc/dovecot/freedombox-sieve-after

View File

@ -1,3 +1,5 @@
# Do not edit this file. Manage your settings on FreedomBox.
require ["fileinto", "mailbox"];
if header :is "X-Spam" "Yes" {

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# Do not edit this file. Manage your settings on FreedomBox.
# Maintained by FreedomBox, do not edit.
dbpath = /var/lib/postfix/freedombox-aliases/aliases.sqlite3
query = SELECT value FROM alias WHERE name='%s' AND status=1

View File

@ -1,4 +1,4 @@
# The file is managed by FreedomBox. Do not to edit.
# Do not edit this file. Manage your settings on FreedomBox.
use = ["authentication-results", "x-spam-level", "x-spam-status",
"x-spamd-bar", "x-spamd-result"];

View File

@ -1,4 +1,4 @@
# The file is managed by FreedomBox. Do not to edit.
# Do not edit this file. Manage your settings on FreedomBox.
servers = "127.0.0.1";
db = "7"; # Use database number 8 not to clash with other clients

View File

@ -1,4 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
from django.utils.translation import gettext_lazy as _
from plinth.clients import store_url