
The mailing list servers have a more complex exim config. Put the routers and transports into ansible variables. While we're doing it, role variables with an exim_ prefix - since 'routers' as a global variable might be a little broad. iteritems isn't a thing in python3, only items. We need to escape the exim config with ${if or{{ - because of the {{ which looks like jinja. Wrap it in a {% raw %} block. Getting the yaml indentation right for things here is non-trivial. Make them strings instead. Add a README.rst file - and use the zuul:rolevar construct in it, because it's nice. Change-Id: Ieccfce99a1d278440c5baa207479a1887898298e
76 lines
2.9 KiB
YAML
76 lines
2.9 KiB
YAML
mm_domains: 'lists.openstack.org:lists.zuul-ci.org:lists.airshipit.org:lists.starlingx.io'
|
|
exim_local_domains: "@:{{ mm_domains }}"
|
|
exim_aliases:
|
|
root: "{{ ','.join(listadmins|default([])) }}"
|
|
ambassadors-owner: spam
|
|
community-owner: spam
|
|
foundation-board-confidential-owner: spam
|
|
foundation-board-owner: spam
|
|
foundation-owner: spam
|
|
legal-discuss-owner: spam
|
|
mailman-owner: spam
|
|
marketing-owner: spam
|
|
openstack-announce-owner: spam
|
|
openstack-dev-owner: spam
|
|
openstack-docs-owner: spam
|
|
openstack-fr-owner: spam
|
|
openstack-i18n-owner: spam
|
|
openstack-infra-owner: spam
|
|
openstack-operators-owner: spam
|
|
openstack-owner: spam
|
|
openstack-qa-owner: spam
|
|
openstack-security-owner: spam
|
|
openstack-tc-owner: spam
|
|
openstack-vi-owner: spam
|
|
product-wg-owner: spam
|
|
superuser-owner: spam
|
|
user-committee-owner: spam
|
|
women-of-openstack-owner: spam
|
|
spam: ':fail: delivery temporarily disabled due to ongoing spam flood'
|
|
exim_routers:
|
|
- mailman_verp_router: |
|
|
{% raw -%}
|
|
driver = dnslookup
|
|
condition = ${if or{{eq{$sender_host_address}{127.0.0.1}}\
|
|
{eq{$sender_host_address}{::1}}}{yes}{no}}
|
|
{% endraw %}
|
|
domains = !+local_domains
|
|
ignore_target_hosts = <; 0.0.0.0; \
|
|
64.94.110.11; \
|
|
127.0.0.0/8; \
|
|
::1/128;fe80::/10;fe \
|
|
c0::/10;ff00::/8
|
|
senders = "*-bounces@*"
|
|
transport = mailman_verp_smtp
|
|
- mailman_router: |
|
|
driver = accept
|
|
domains = {{ mm_domains }}
|
|
local_part_suffix = -admin : \
|
|
-bounces : -bounces+* : \
|
|
-confirm : -confirm+* : \
|
|
-join : -leave : \
|
|
-owner : -request : \
|
|
-subscribe : -unsubscribe
|
|
local_part_suffix_optional
|
|
require_files = ${lookup{${lc::$domain}}lsearch{/etc/mailman/sites}}/lists/${lc::$local_part}/config.pck
|
|
transport = mailman_transport
|
|
exim_transports:
|
|
- mailman_transport: |
|
|
driver = pipe
|
|
command = /var/lib/mailman/mail/mailman \
|
|
'${if def:local_part_suffix \
|
|
{${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
|
|
{post}}' \
|
|
$local_part
|
|
current_directory = /var/lib/mailman
|
|
environment = MAILMAN_SITE_DIR=${lookup{${lc:$domain}}lsearch{/etc/mailman/sites}}
|
|
group = list
|
|
home_directory = /var/lib/mailman
|
|
user = list
|
|
- mailman_verp_smtp: |
|
|
driver = smtp
|
|
headers_add = Errors-To: ${return_path}
|
|
headers_remove = Errors-To
|
|
max_rcpt = 1
|
|
return_path = ${local_part:$return_path}+$local_part=$domain@${domain:$return_path}
|