Changeset - 6d33383660e7
[Not reviewed]
0 3 0
Branko Majic (branko) - 10 months ago 2025-02-02 19:10:43
branko@majic.rs
MAR-243: Fixed incorrect usage of inventory naming in mail_forwarder role.
3 files changed with 10 insertions and 5 deletions:
0 comments (0 inline, 0 general)
docs/releasenotes.rst
Show inline comments
 
@@ -73,12 +73,17 @@ Upgraded to Ansible 10.4.x. Dropped support for Debian 11
 
* ``common`` role
 

	
 
  * Fixed permission errors with Python cache directories in the pip
 
    requirements upgrade checks virtual environment that can happen if
 
    the initial virtual environment set-up fails.
 

	
 
* ``mail_forwarder`` role
 

	
 
  * Fixed incorrect use of inventory name instead of FQDN and hostname
 
    for deployed files and configuration files.
 

	
 
* ``mail_server`` role
 

	
 
  * Fixed incorrect use of inventory name instead of FQDN and hostname
 
    for deployed files and configuration files.
 

	
 

	
roles/mail_forwarder/tasks/main.yml
Show inline comments
 
@@ -33,13 +33,13 @@
 
    size: 2048
 
  notify:
 
    - Restart Postfix
 

	
 
- name: Configure visible mail name of the system
 
  ansible.builtin.copy:
 
    content: "{{ inventory_hostname }}"
 
    content: "{{ ansible_fqdn }}"
 
    dest: "/etc/mailname"
 
    owner: root
 
    group: root
 
    mode: "0644"
 
  notify:
 
    - Restart Postfix
roles/mail_forwarder/templates/main.cf.j2
Show inline comments
 
@@ -3,13 +3,13 @@
 

	
 

	
 
# General settings
 
# ================
 

	
 
# Internet hostname of this mail system.
 
myhostname = {{ inventory_hostname }}
 
myhostname = {{ ansible_fqdn }}
 

	
 
# Under Debian, when a file name is specified, the first line of the
 
# file be used as the SMTP server name.
 
myorigin = /etc/mailname
 

	
 
# Text shown to connecting clients as part of SMTP greeting.
 
@@ -42,13 +42,13 @@ compatibility_level = 3.6
 

	
 

	
 
# Local mailbox delivery
 
# ======================
 

	
 
# List of domains for local transport deliveries.
 
mydestination = {{ inventory_hostname }}, {{ inventory_hostname_short }}, localhost.localdomain, localhost
 
mydestination = {{ ansible_fqdn }}, {{ ansible_hostname }}, localhost.localdomain, localhost
 

	
 
# Alias maps for local deliveries (to system accounts).
 
alias_maps = hash:/etc/aliases
 

	
 
# Alias database that gets updated when invoking "newaliases" command.
 
alias_database = hash:/etc/aliases
 
@@ -88,14 +88,14 @@ smtpd_tls_security_level = may
 

	
 
# Use locally-issued self-signed certificates for TLS.
 
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
 
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
 

	
 
# Use custom, generated DH parameters for increased security.
 
smtpd_tls_dh1024_param_file = /etc/ssl/private/{{ inventory_hostname }}_smtp.dh.pem
 
smtpd_tls_dh512_param_file = /etc/ssl/private/{{ inventory_hostname }}_smtp.dh.pem
 
smtpd_tls_dh1024_param_file = /etc/ssl/private/{{ ansible_fqdn }}_smtp.dh.pem
 
smtpd_tls_dh512_param_file = /etc/ssl/private/{{ ansible_fqdn }}_smtp.dh.pem
 

	
 
{% if smtp_relay_host %}
 
# Force TLS certificate validation when connecting to relay host using
 
# the dedicated CA certificate truststore.
 
smtp_tls_security_level=verify
 
smtp_tls_CAfile=/etc/ssl/certs/smtp_relay_truststore.pem
0 comments (0 inline, 0 general)