Add a domain aliases mechanism to lists.o.o
In order to be able to redirect list addresses which have moved from one domain to another, we need a solution to alias the old addresses to the new ones. We have simple aliases but they only match on the local part. Add a new /etc/aliases.domain which matches full local_part@domain addresses instead. Also collect this file in the Mailman deployment test for ease of inspection. Change-Id: I16f871e96792545e1a8cc8eb3834fa4eb82e31c8
This commit is contained in:
parent
2863b5a509
commit
1addce7dbc
@ -34,6 +34,7 @@ exim_aliases:
|
||||
superuser-owner: spam
|
||||
user-committee-owner: spam
|
||||
spam: ':fail: delivery temporarily disabled due to ongoing spam flood'
|
||||
exim_domain_aliases: {}
|
||||
exim_routers:
|
||||
- mailman_verp_router: |
|
||||
{% raw -%}
|
||||
@ -51,6 +52,13 @@ exim_routers:
|
||||
transport = mailman_verp_smtp
|
||||
- dnslookup: '{{ exim_dnslookup_router }}'
|
||||
- system_aliases: '{{ exim_system_aliases_router }}'
|
||||
- domain_aliases: |
|
||||
driver = redirect
|
||||
allow_fail
|
||||
allow_defer
|
||||
data = ${lookup{$local_part@$domain}lsearch{/etc/aliases.domain}}
|
||||
file_transport = address_file
|
||||
pipe_transport = address_pipe
|
||||
- localuser: '{{ exim_localuser_router }}'
|
||||
- mailman_copy: |
|
||||
driver = accept
|
||||
|
@ -91,6 +91,11 @@
|
||||
loop: "{{ mailman_sites }}"
|
||||
loop_control:
|
||||
loop_var: site
|
||||
- name: Write /etc/aliases.domain
|
||||
template:
|
||||
src: "domain_aliases.j2"
|
||||
dest: "/etc/aliases.domain"
|
||||
mode: 0444
|
||||
when: mailman_multihost
|
||||
|
||||
- name: normal mailman configs
|
||||
|
6
playbooks/roles/mailman/templates/domain_aliases.j2
Normal file
6
playbooks/roles/mailman/templates/domain_aliases.j2
Normal file
@ -0,0 +1,6 @@
|
||||
# /etc/aliases.domain
|
||||
{% for k, v in exim_domain_aliases|dictsort %}
|
||||
{% if v %}
|
||||
{{ k }}: {{ v }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
@ -270,6 +270,7 @@
|
||||
'/var/log/mailman': logs
|
||||
lists.openstack.org:
|
||||
host_copy_output:
|
||||
'/etc/aliases.domain': logs_txt
|
||||
'/var/log/mailman': logs
|
||||
|
||||
- job:
|
||||
|
Loading…
x
Reference in New Issue
Block a user