add mailman2
This commit is contained in:
parent
d91391d5fc
commit
7c53014b9a
|
@ -27,3 +27,6 @@ mailserver_rspamd_domain: ""
|
||||||
mailserver_rspamd_dkim_selector: "2020"
|
mailserver_rspamd_dkim_selector: "2020"
|
||||||
|
|
||||||
mailserver_mailman_enabled: true
|
mailserver_mailman_enabled: true
|
||||||
|
mailserver_mailman_domains:
|
||||||
|
- mail: "lists.{{ mailserver_mail_domain }}"
|
||||||
|
web: "lists.{{ mailserver_mail_domain }}"
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
name: rspamd
|
name: rspamd
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: mailman genaliases
|
||||||
|
command: /usr/lib/mailman/bin/genaliases
|
||||||
|
|
||||||
- name: reload postfix
|
- name: reload postfix
|
||||||
systemd:
|
systemd:
|
||||||
name: postfix
|
name: postfix
|
||||||
|
|
|
@ -1,5 +1,27 @@
|
||||||
- name: Install Mailman
|
- name: mailman - install
|
||||||
package:
|
package:
|
||||||
state: latest
|
state: latest
|
||||||
name:
|
name:
|
||||||
- mailman
|
- mailman
|
||||||
|
|
||||||
|
- name: mailman - mm_config
|
||||||
|
notify:
|
||||||
|
- mailman genaliases
|
||||||
|
- reload postfix
|
||||||
|
template:
|
||||||
|
src: mailman_cfg.py
|
||||||
|
dest: /etc/mailman/mm_cfg.py
|
||||||
|
|
||||||
|
- name: mailman - enable timer
|
||||||
|
systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
with_items:
|
||||||
|
- mailman-checkdbs.timer
|
||||||
|
- mailman-disabled.timer
|
||||||
|
- mailman-mailpasswds.timer
|
||||||
|
- mailman-senddigests.timer
|
||||||
|
- mailman-cullbadshunt.timer
|
||||||
|
- mailman-gatenews.timer
|
||||||
|
- mailman-nightlygzip.timer
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
# -*- 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'
|
Loading…
Reference in New Issue