feat: add necessary bits to rewrite sender and recipient for external relay

This commit is contained in:
VC
2024-07-05 11:53:34 +02:00
parent 3faef4717a
commit 19f800b796
4 changed files with 28 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
---
- name: "Create {{ item.destination }}"
ansible.builtin.copy:
dest: "{{ item.destination }}"
mode: 0644
content: |
{{ item.content }}
loop:
- {destination: "/etc/postfix/recipient_canonical", content: "/.+/ root@mateu.be"}
- {destination: "/etc/postfix/header_check", content: "/From:.*/ REPLACE From: root@{{ smtprelay_origin }}"}
- {destination: "/etc/postfix/sender_canonical_maps", content: "/.+/ root@{{ smtprelay_origin }}"}