mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
email_server: Add front page shortcut, update name and description
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
3dc53046f4
commit
d35ec339d1
@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import plinth.app
|
import plinth.app
|
||||||
import plinth.daemon
|
from plinth import actions, frontpage, menu
|
||||||
import plinth.frontpage
|
from plinth.daemon import Daemon
|
||||||
import plinth.menu
|
|
||||||
from plinth import actions
|
|
||||||
from plinth.modules.apache.components import Webserver
|
from plinth.modules.apache.components import Webserver
|
||||||
from plinth.modules.config import get_domainname
|
from plinth.modules.config import get_domainname
|
||||||
from plinth.modules.firewall.components import Firewall
|
from plinth.modules.firewall.components import Firewall
|
||||||
@ -23,6 +22,10 @@ clamav_packages = ['clamav', 'clamav-daemon']
|
|||||||
clamav_daemons = ['clamav-daemon', 'clamav-freshclam']
|
clamav_daemons = ['clamav-daemon', 'clamav-freshclam']
|
||||||
|
|
||||||
_description = [
|
_description = [
|
||||||
|
_('This is a complete email server solution using Postfix, Dovecot, '
|
||||||
|
'Rspamd and ClamAV. Postfix sends and receives emails. Dovecot allows '
|
||||||
|
'email clients to access your mailbox using IMAP and POP3. Rspamd deals '
|
||||||
|
'with spam. ClamAV identifies viruses and malware.'),
|
||||||
_('<a href="/plinth/apps/roundcube/">Roundcube app</a> provides web '
|
_('<a href="/plinth/apps/roundcube/">Roundcube app</a> provides web '
|
||||||
'interface for users to access email.'),
|
'interface for users to access email.'),
|
||||||
_('During installation, any other email servers in the system will be '
|
_('During installation, any other email servers in the system will be '
|
||||||
@ -44,23 +47,26 @@ class EmailServerApp(plinth.app.App):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
info = plinth.app.Info(
|
info = plinth.app.Info(
|
||||||
app_id=self.app_id, version=self._version, name=_('Email Server'),
|
app_id=self.app_id, version=self._version,
|
||||||
icon_filename='roundcube',
|
name=_('Postfix/Dovecot'), icon_filename='roundcube',
|
||||||
short_description=_('Postfix, Dovecot & Rspamd'),
|
short_description=_('Email Server'), description=_description,
|
||||||
description=_description, manual_page='EmailServer',
|
manual_page='EmailServer', clients=manifest.clients,
|
||||||
clients=manifest.clients,
|
|
||||||
donation_url='https://rspamd.com/support.html')
|
donation_url='https://rspamd.com/support.html')
|
||||||
self.add(info)
|
self.add(info)
|
||||||
|
|
||||||
menu_item = plinth.menu.Menu(
|
menu_item = menu.Menu('menu-email-server', info.name,
|
||||||
'menu_' + self.app_id, # unique id
|
info.short_description, info.icon_filename,
|
||||||
info.name, # app display name
|
'email_server:index', parent_url_name='apps')
|
||||||
info.short_description, # app description
|
|
||||||
'roundcube', # icon name in `static/theme/icons/`
|
|
||||||
'email_server:index', # view name
|
|
||||||
parent_url_name='apps')
|
|
||||||
self.add(menu_item)
|
self.add(menu_item)
|
||||||
|
|
||||||
|
shortcut = frontpage.Shortcut(
|
||||||
|
'shortcut-email-server', info.name,
|
||||||
|
short_description=info.short_description, icon=info.icon_filename,
|
||||||
|
description=info.description,
|
||||||
|
configure_url=reverse_lazy('email_server:index'),
|
||||||
|
clients=info.clients, login_required=True)
|
||||||
|
self.add(shortcut)
|
||||||
|
|
||||||
# Other likely install conflicts have been discarded:
|
# Other likely install conflicts have been discarded:
|
||||||
# - msmtp, nullmailer, sendmail don't cause install faults.
|
# - msmtp, nullmailer, sendmail don't cause install faults.
|
||||||
# - qmail and smail are missing in Bullseye (Not tested,
|
# - qmail and smail are missing in Bullseye (Not tested,
|
||||||
@ -80,22 +86,22 @@ class EmailServerApp(plinth.app.App):
|
|||||||
|
|
||||||
listen_ports = [(25, 'tcp4'), (25, 'tcp6'), (465, 'tcp4'),
|
listen_ports = [(25, 'tcp4'), (25, 'tcp6'), (465, 'tcp4'),
|
||||||
(465, 'tcp6'), (587, 'tcp4'), (587, 'tcp6')]
|
(465, 'tcp6'), (587, 'tcp4'), (587, 'tcp6')]
|
||||||
daemon = plinth.daemon.Daemon('daemon-postfix', 'postfix',
|
daemon = Daemon('daemon-email-server-postfix', 'postfix',
|
||||||
listen_ports=listen_ports)
|
listen_ports=listen_ports)
|
||||||
self.add(daemon)
|
self.add(daemon)
|
||||||
|
|
||||||
listen_ports = [(143, 'tcp4'), (143, 'tcp6'), (993, 'tcp4'),
|
listen_ports = [(143, 'tcp4'), (143, 'tcp6'), (993, 'tcp4'),
|
||||||
(993, 'tcp6'), (110, 'tcp4'), (110, 'tcp6'),
|
(993, 'tcp6'), (110, 'tcp4'), (110, 'tcp6'),
|
||||||
(995, 'tcp4'), (995, 'tcp6'), (4190, 'tcp4'),
|
(995, 'tcp4'), (995, 'tcp6'), (4190, 'tcp4'),
|
||||||
(4190, 'tcp6')]
|
(4190, 'tcp6')]
|
||||||
daemon = plinth.daemon.Daemon('daemon-dovecot', 'dovecot',
|
daemon = Daemon('daemon-email-server-dovecot', 'dovecot',
|
||||||
listen_ports=listen_ports)
|
listen_ports=listen_ports)
|
||||||
self.add(daemon)
|
self.add(daemon)
|
||||||
|
|
||||||
listen_ports = [(11332, 'tcp4'), (11332, 'tcp6'), (11333, 'tcp4'),
|
listen_ports = [(11332, 'tcp4'), (11332, 'tcp6'), (11333, 'tcp4'),
|
||||||
(11333, 'tcp6'), (11334, 'tcp4'), (11334, 'tcp6')]
|
(11333, 'tcp6'), (11334, 'tcp4'), (11334, 'tcp6')]
|
||||||
daemon = plinth.daemon.Daemon('daemon-rspamd', 'rspamd',
|
daemon = Daemon('daemon-email-server-rspamd', 'rspamd',
|
||||||
listen_ports=listen_ports)
|
listen_ports=listen_ports)
|
||||||
self.add(daemon)
|
self.add(daemon)
|
||||||
|
|
||||||
port_names = ['smtp', 'smtps', 'smtp-submission', 'imaps', 'pop3s']
|
port_names = ['smtp', 'smtps', 'smtp-submission', 'imaps', 'pop3s']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user