Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.
Open
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
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ postfix_mydestination:
- localhost

postfix_relayhost:
postfix_relayhost_port:
postfix_relayhost_port: 25
postfix_relaytls: true
postfix_sasl_auth_enable: true
postfix_sasl_user:
postfix_sasl_auth_enable: false
postfix_sasl_user: false
postfix_sasl_password:
postfix_sasl_security_options: noanonymous

Expand Down
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
- name: configure sasl username/password
become: true
template:
src: sasl_passwd.j2
dest: /etc/postfix/sasl_passwd
owner: root
group: root
mode: 0600
when: postfix_relayhost != false
src: sasl_passwd.j2
dest: /etc/postfix/sasl_passwd
owner: root
group: root
mode: 0600
when: postfix_sasl_user != false
notify:
- postmap sasl_passwd
- restart postfix
Expand Down
6 changes: 4 additions & 2 deletions templates/main.cf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# {{ ansible_managed }}

disable_vrfy_command = {{ postfix_disable_vrfy_command }}
# smtpd_banner = $myhostname ESMTP $mail_name
smtpd_banner = $myhostname ESMTP
biff = no

# appending .domain is the MUA's job.
Expand Down Expand Up @@ -52,6 +52,8 @@ debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5

smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination

{% if postfix_relayhost %}
relayhost = [{{ postfix_relayhost }}]:{{ postfix_relayhost_port }}
{% if postfix_sasl_auth_enable %}
Expand All @@ -64,4 +66,4 @@ smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
{% endif %}
{% endif %}
{% endif %}
{% endif %}
10 changes: 10 additions & 0 deletions vars/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# vars file for arillso.postfix

postfix_packages:
- postfix
- cyrus-sasl-plain
- cyrus-sasl
- mailx

psotfix_daemon_directory: /usr/libexec/postfix