Additional configuration files.

This commit is contained in:
Antoine Nguyen
2015-10-15 15:37:27 +02:00
parent 5212ee6d0d
commit f49909d7e0
4 changed files with 36 additions and 1 deletions

View File

@@ -115,7 +115,9 @@ class Installer(object):
else:
dstname = ftpl
src = self.get_file_path("{}.tpl".format(ftpl))
dst = os.path.join(self.config_dir, dstname)
dst = dstname
if not dst.startswith("/"):
dst = os.path.join(self.config_dir, dst)
utils.copy_from_template(src, dst, context)
def restart_daemon(self):

View File

@@ -0,0 +1,28 @@
#
# Modoboa specific cron jobs
#
PYTHON=%{venv_path}/bin/python
INSTANCE=%{instance_path}
# Operations on mailboxes
* * * * * %{dovecot_mailboxes_owner} $PYTHON $INSTANCE/manage.py handle_mailbox_operations
# Sessions table cleanup
0 0 * * * root $PYTHON $INSTANCE/manage.py clearsessions
# Logs table cleanup
0 0 * * * root $PYTHON $INSTANCE/manage.py cleanlogs
{% if use_amavis %}
# Quarantine cleanup
0 0 * * * root $PYTHON $INSTANCE/manage.py qcleanup
# Notifications about pending release requests
0 12 * * * root $PYTHON $INSTANCE/manage.py amnotify --baseurl='http://%{hostname}'
{% endif %}
# Logs parsing
*/5 * * * * root $PYTHON $INSTANCE/manage.py logparser &> /dev/null
# Radicale rights file
*/2 * * * * root $PYTHON $INSTANCE/manage.py generate_rights

View File

@@ -0,0 +1 @@
%{user} ALL=(%{dovecot_mailboxes_owner}) NOPASSWD: /usr/bin/doveadm

View File

@@ -19,6 +19,10 @@ class Modoboa(base.Installer):
packages = [
"python-dev", "libxml2-dev", "libxslt-dev", "libjpeg-dev",
"librrd-dev", "rrdtool"]
config_files = [
"crontab=/etc/cron.d/modoboa",
"sudoers=/etc/sudoers.d/modoboa",
]
with_db = True
with_user = True