Changeset - 9727c5e3ac7c
[Not reviewed]
0 5 0
Branko Majic (branko) - 5 years ago 2021-01-13 23:54:35
branko@majic.rs
MAR-151: Added support for Debian 10 Buster to mail_forwarder role:

- Updated role reference documentaiton.
- Updated role meta information.
- Updated tests.
- Set the smtpd_relay_restrictions configuration option for Postfix
SMTP server in mail_forwarder role (required for version found in
Debian 10 Buster).
5 files changed with 45 insertions and 1 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -1363,12 +1363,13 @@ Parameters
 
Distribution compatibility
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Role is compatible with the following distributions:
 

	
 
- Debian 9 (Stretch)
 
- Debian 10 (Buster)
 

	
 

	
 
Examples
 
~~~~~~~~
 

	
 
Here is an example configuration for setting-up the mail forwarder:
roles/mail_forwarder/meta/main.yml
Show inline comments
 
@@ -8,8 +8,8 @@ galaxy_info:
 
  description: Sets-up local SMTP server for sending out mails and receiving mails for local users
 
  license: BSD
 
  min_ansible_version: 2.9
 
  platforms:
 
    - name: Debian
 
      versions:
 
        - 8
 
        - 9
 
        - 10
roles/mail_forwarder/molecule/default/molecule.yml
Show inline comments
 
@@ -73,12 +73,48 @@ platforms:
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.32
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-mandatory-buster64
 
    groups:
 
      - parameters-mandatory
 
    box: debian/contrib-buster64
 
    memory: 256
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.20
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-optional-buster64
 
    groups:
 
      - parameters-optional
 
    box: debian/contrib-buster64
 
    memory: 256
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.21
 
        network_name: private_network
 
        type: static
 

	
 
  - name: parameters-no-incoming-buster64
 
    groups:
 
      - parameters-no-incoming
 
    box: debian/contrib-buster64
 
    memory: 256
 
    cpus: 1
 
    interfaces:
 
      - auto_config: true
 
        ip: 10.31.127.22
 
        network_name: private_network
 
        type: static
 

	
 
provisioner:
 
  name: ansible
 
  playbooks:
 
    cleanup: cleanup.yml
 
  config_options:
 
    defaults:
roles/mail_forwarder/molecule/default/prepare.yml
Show inline comments
 
@@ -66,12 +66,15 @@
 
      with_dict:
 
        10.31.127.10: "mail-server domain1"
 
        10.31.127.11: "client1"
 
        10.31.127.30: "parameters-mandatory-stretch64"
 
        10.31.127.31: "parameters-optional-stretch64"
 
        10.31.127.32: "parameters-no-incoming-stretch64"
 
        10.31.127.20: "parameters-mandatory-buster64"
 
        10.31.127.21: "parameters-optional-buster64"
 
        10.31.127.22: "parameters-no-incoming-buster64"
 

	
 
    - name: Install tools for testing
 
      apt:
 
        name: gnutls-bin
 
        state: present
 

	
roles/mail_forwarder/templates/main.cf.j2
Show inline comments
 
@@ -49,6 +49,10 @@ inet_protocols = all
 
# Fall-back to using native lookups (/etc/hosts etc) if DNS lookup fails. Useful
 
# for local overrides of mail servers.
 
smtp_host_lookup = dns, native
 

	
 
# Explicitly set maximum allowed mail size that should be accepted.
 
message_size_limit = {{ mail_message_size_limit }}
 

	
 
# Allow relaying only from trusted networks. Do not relay mails for
 
# domains for which the mail server is not responsible.
 
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
0 comments (0 inline, 0 general)