diff --git a/tasks/postsrsd.yml b/tasks/postsrsd.yml index 719508a..3c9531b 100644 --- a/tasks/postsrsd.yml +++ b/tasks/postsrsd.yml @@ -30,7 +30,7 @@ - name: POSTSRSD configuration block: - - name: Install the postsrsd secret. After the first start of the service + - name: Install the postsrsd secret. template: src: postsrsd.secret.j2 dest: '{{ postfix_srs_secret_file }}' diff --git a/templates/main.cf.j2 b/templates/main.cf.j2 index fd144b7..4ec5d77 100644 --- a/templates/main.cf.j2 +++ b/templates/main.cf.j2 @@ -41,7 +41,9 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = {{ ansible_fqdn }} alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases + myorigin = {% if domain_name is defined %}{{ domain_name }}{% else %}{{ ansible_fqdn }}{% endif %} + mydestination = {{ ansible_fqdn }}, localhost {% if postfix_use_relay_host %} relayhost = {{ postfix_relay_host }}:{{ postfix_relay_port }}