Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all accepted mail domains to SRS exclude configuration #528

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ansible/roles/postfix/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
- name: Regenerate sender access table
command: postmap /etc/postfix/sender_access
changed_when: true

- name: Restart postsrsd
service:
name: postsrsd
state: restarted
16 changes: 16 additions & 0 deletions ansible/roles/postfix/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@
tags:
- role::postfix

- name: Update PostSRSD rewriting config
lineinfile:
path: /etc/default/postsrsd
regexp: "^#?{{ item['key'] }}="
line: '{{ item["key"] }}="{{ item["value"] }}"'
mode: "0444"
owner: root
group: root
loop:
- key: SRS_EXCLUDE_DOMAINS
value: "{{ postfix_destination_domains | join(',') }}"
tags:
- role::postfix
notify:
- Restart postsrsd

- name: Pass inbound mail through spamassassin content filter
lineinfile:
path: /etc/postfix/master.cf
Expand Down
Loading