Skip to content

Commit

Permalink
Clean up SASL logic from postfix
Browse files Browse the repository at this point in the history
Per Joe's comment here [1].

[1]: #478 (comment)
  • Loading branch information
jchristgit committed Aug 23, 2024
1 parent 369110a commit b84fb3f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
2 changes: 0 additions & 2 deletions ansible/roles/sasl/files/smtpd.conf

This file was deleted.

33 changes: 16 additions & 17 deletions ansible/roles/sasl/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
tags:
- role::sasl

- name: Copy Postfix SASL configuration
copy:
src: smtpd.conf
dest: /etc/postfix/sasl/smtpd.conf
mode: "0644"
owner: root
group: root
tags:
- role::sasl
notify:
- Reload postfix

- name: Update SASL authentication daemon preferences
lineinfile:
path: /etc/default/saslauthd
Expand Down Expand Up @@ -55,13 +43,24 @@
notify:
- Reload SASL

- name: Add Postfix to SASL group
user:
name: postfix
groups: sasl
append: true
# BEGIN temporary tasks. Can be removed after initial deploy.
- name: Remove Postfix from SASL group
command: "gpasswd -d postfix sasl"
register: command_result
changed_when: "not 'is not a member of' in command_result.stderr"
failed_when: false
tags:
- role::sasl

- name: Remove Postfix SASL configuration
file:
path: /etc/postfix/sasl/smtpd.conf
state: absent
tags:
- role::sasl
notify:
- Reload postfix
# END temporary tasks. Can be removed after initial deploy.

- name: Enable and start SASL authentication daemon
service:
Expand Down

0 comments on commit b84fb3f

Please sign in to comment.