diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml index baf09330..aa39d54b 100644 --- a/roles/postfix/tasks/main.yml +++ b/roles/postfix/tasks/main.yml @@ -24,5 +24,5 @@ - sender_login_maps - postscreen_access.cidr - sasl/smtpd.conf -# - canonical + - canonical # - virtual diff --git a/roles/postfix/templates/postfix/canonical.j2 b/roles/postfix/templates/postfix/canonical.j2 new file mode 100644 index 00000000..c0cfd082 --- /dev/null +++ b/roles/postfix/templates/postfix/canonical.j2 @@ -0,0 +1,6 @@ +# {{ ansible_managed }} +# Fichier fournissant des méthodes pour traduire certaines adresses + +/^(.*)@localhost(\.crans\.org)?$/ ${1}@crans.org +/^(.*)@{{ ansible_hostname }}.adm.crans.org$/ ${1}@crans.org +/^(.*)@{{ ansible_hostname }}.crans.org$/ ${1}@crans.org