Merge pull request 'master' (!16) from adellam/mailman:master into master

Reviewed-on: #16
This commit is contained in:
Andrea Dell'Amico 2023-08-09 12:20:45 +02:00
commit 6f1890f481
5 changed files with 31 additions and 25 deletions

View File

@ -34,7 +34,8 @@ mailman_custom_templates:
- 'it/list:user:notice:probe.txt'
- 'it/list:user:notice:welcome.txt'
# Documentation that must be followed to configure the social auth providers
mailman_enable_daily_notifications: true
# Documentation that must be followed to configure the social auth providers
# https://django-allauth.readthedocs.io/en/latest/installation.html
mailman_use_social_account_providers: False
mailman_postorius_social_auth_providers:
@ -118,12 +119,14 @@ mailman_dmarc_enabled: 'yes'
mailman_dkim_enabled: 'yes'
mailman_antispam_header_checks:
- 'X-Spam: (yes|maybe)'
- 'X-Spam: (YES)'
- 'X-Spam-Flag: (yes|maybe)'
- 'X-Spam-Flag: (YES)'
#- 'Authentication-Results: mail.example.com; dmarc=(fail|quarantine)'
# The chain to jump to if any of the header patterns matches. This must be
# the name of an existing chain such as 'discard', 'reject', 'hold', or
# 'accept', otherwise 'hold' will be used.
mailman_antispam_chain_behaviour: "hold"
mailman_start_nntp_runner: 'no'
mailman_repository: 'https://gitlab.com/mailman/mailman-suite.git'
@ -133,6 +136,8 @@ mailman_postorius_log_dest_dir: mailmansuite
mailman_postorius_log_dir: '/{{ mailman_postorius_var_dir }}/{{ mailman_postorius_log_base_dir }}/{{ mailman_postorius_log_dest_dir }}'
mailman_postorius_dir: '{{ mailman_home }}/mailman-suite/mailman-suite_project'
mailman_postorius_http_port: 8000
mailman_postorius_templates_url: '{{ mailman_site_url }}'
mailman_postorius_uwsgi_servicename: 'mailmansuite-uwsgi'
mailman_postorius_uwsgi_config_file: /etc/mailmansuite-uwsgi.ini
mailman_postorius_uwsgi_rundir: /run/mailmansuite

View File

@ -1,14 +1,16 @@
---
galaxy_info:
author: adellam
author: Andrea Dell'Amico <andrea.dellamico@isti.cnr.it>
namespace: adellam
role_name: mailman
description: Mailman 3 installation, configuration, and management for Linux using pip
company: ISTI-CNR
license: license (EUPL)
min_ansible_version: 2.7
min_ansible_version: "2.7"
platforms:
- name: EL
versions:
- 7
- "7"
galaxy_tags:
- mail
- mailing

View File

@ -111,27 +111,26 @@
- name: Add the maintenance cron jobs
tags: ['mailman', 'mailman_conf', 'mailman_cron']
block:
- name: Add a daily cron job that sends digests
cron:
job: "{{ mailman_bindir }}/mailman digests --periodic > {{ mailman_log_dir }}/mailman_cron_digest.log 2>&1"
special_time: daily
user: '{{ mailman_user }}'
name: "Mailman digests"
cron_file: 'mailman-digests'
state: present
job: "{{ mailman_bindir }}/mailman -C {{ mailman_conf_dir }}/mailman.cfg digests --periodic > {{ mailman_log_dir }}/mailman_cron_digest.log 2>&1"
special_time: daily
user: '{{ mailman_user }}'
name: "Mailman digests"
cron_file: 'mailman-digests'
state: present
- name: Add a daily cron job that sends notifications to the list administrators and list owners
cron:
job: "{{ mailman_bindir }}/mailman notify > {{ mailman_log_dir }}/mailman_cron_notifications.log 2>&1"
minute: '0'
hour: '7'
user: '{{ mailman_user }}'
name: "Mailman notifications"
cron_file: 'mailman-notifications'
state: present
tags: [ 'mailman', 'mailman_conf', 'mailman_cron' ]
job: "{{ mailman_bindir }}/mailman -C {{ mailman_conf_dir }}/mailman.cfg notify > {{ mailman_log_dir }}/mailman_cron_notifications.log 2>&1"
minute: '0'
hour: '7'
user: '{{ mailman_user }}'
name: "Mailman notifications"
cron_file: 'mailman-notifications'
state: "{% if mailman_enable_daily_notifications %}present{% else %}absent{% endif %}"
- name: Install some default templates
block:

View File

@ -242,7 +242,7 @@ header_checks:
# The chain to jump to if any of the header patterns matches. This must be
# the name of an existing chain such as 'discard', 'reject', 'hold', or
# 'accept', otherwise 'hold' will be used.
jump_chain: hold
jump_chain: "{{ mailman_antispam_chain_behaviour }}"
[runner.nntp]
class: mailman.runners.nntp.NNTPRunner

View File

@ -484,8 +484,8 @@ if DEBUG == True:
# Only display mailing-lists from the same virtual host as the webserver
FILTER_VHOST = False
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
# Use a public URL and set http/https correctly
POSTORIUS_TEMPLATE_BASE_URL = '{{ mailman_postorius_templates_url }}'
try:
from settings_local import *