ansible-role-mailserver/templates/mailman_cfg.py

67 lines
2.4 KiB
Python
Raw Normal View History

2020-07-24 15:08:50 +02:00
# -*- python -*-
# Copyright (C) 1998-2018 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""This module contains your site-specific settings.
From a brand new distribution it should be copied to mm_cfg.py. If you
already have an mm_cfg.py, be careful to add in only the new settings you
want. Mailman's installation procedure will never overwrite your mm_cfg.py
file.
The complete set of distributed defaults, with documentation, are in the file
Defaults.py. In mm_cfg.py, override only those you want to change, after the
from Defaults import *
line (see below).
Note that these are just default settings; many can be overridden via the
administrator and user interfaces on a per-list or per-user basis.
Also note that many of these settings will not be effective until Mailman
is restarted. Thus, you should always restart Mailman after changing this
file.
Further, settings which relate to a list's host_name and web_page_url only
affect lists created after the change. For existing lists, see the FAQ at
<http://wiki.list.org/x/mIA9>.
"""
###############################################
# Here's where we get the distributed defaults.
from Defaults import *
##################################################
# Put YOUR site-specific settings below this line.
MTA = 'Postfix'
DEFAULT_EMAIL_HOST = '{{ mailserver_mailman_domains[0].mail }}'
DEFAULT_URL_HOST = '{{ mailserver_mailman_domains[0].web }}'
VIRTUAL_HOSTS.clear()
{% for domain in mailserver_mailman_domains %}
add_virtualhost('{{ domain.web }}', '{{ domain.mail }}')
{% endfor %}
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['{{ mailserver_mailman_domains | map(attribute='mail') | join('\', \'') }}']
DEFAULT_URL_PATTERN = 'https://%s/'
PUBLIC_ARCHIVE_URL = 'https://%(hostname)s/archives/%(listname)s'