Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-103886

fix: configure postfix to listen only to IPv4 if IPv6 is disabled

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • No
    • Low
    • rhel-system-roles
    • 0
    • Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Release Note Not Required
    • Hide
      Cause: The default postfix configuration uses `inet_interfaces = localhost` which
      tells postfix to listen on all interfaces resolving to `localhost` including
      both IPv4 and IPv6 interfaces.

      Consequence: If IPv6 is disabled on the host, postfix and command line tools
      such as postconf will issue an error, and the role will fail.

      Fix: Using `postconf -h default_database_type`, see if postconf fails with the
      error message that indicates IPv6 is disabled. If so, then set `inet_protocols = ipv4`
      so that postfix will only use the IPv4 interface.

      Result: The postfix role works when IPv6 is disabled.

      Adds a new test tests_disable_ipv6.yml to check for this.

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>

      ## Summary by Sourcery

      Detect IPv6-disabled environments and configure postfix to use only IPv4, streamline configuration management, and add an integration test for IPv6-disabled hosts.

      New Features:
      - Auto-detect when IPv6 is disabled and set postfix to listen only on IPv4
      - Add a test playbook to validate the postfix role on an IPv6-disabled host

      Enhancements:
      - Consolidate configuration application by delegating to manage_config.yml

      Tests:
      - Introduce tests_disable_ipv6.yml to verify role behavior with IPv6 disabled
      Show
      Cause: The default postfix configuration uses `inet_interfaces = localhost` which tells postfix to listen on all interfaces resolving to `localhost` including both IPv4 and IPv6 interfaces. Consequence: If IPv6 is disabled on the host, postfix and command line tools such as postconf will issue an error, and the role will fail. Fix: Using `postconf -h default_database_type`, see if postconf fails with the error message that indicates IPv6 is disabled. If so, then set `inet_protocols = ipv4` so that postfix will only use the IPv4 interface. Result: The postfix role works when IPv6 is disabled. Adds a new test tests_disable_ipv6.yml to check for this. Signed-off-by: Rich Megginson < rmeggins@redhat.com > ## Summary by Sourcery Detect IPv6-disabled environments and configure postfix to use only IPv4, streamline configuration management, and add an integration test for IPv6-disabled hosts. New Features: - Auto-detect when IPv6 is disabled and set postfix to listen only on IPv4 - Add a test playbook to validate the postfix role on an IPv6-disabled host Enhancements: - Consolidate configuration application by delegating to manage_config.yml Tests: - Introduce tests_disable_ipv6.yml to verify role behavior with IPv6 disabled
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Cause: The default postfix configuration uses `inet_interfaces = localhost` which
      tells postfix to listen on all interfaces resolving to `localhost` including
      both IPv4 and IPv6 interfaces.

      Consequence: If IPv6 is disabled on the host, postfix and command line tools
      such as postconf will issue an error, and the role will fail.

      Fix: Using `postconf -h default_database_type`, see if postconf fails with the
      error message that indicates IPv6 is disabled. If so, then set `inet_protocols = ipv4`
      so that postfix will only use the IPv4 interface.

      Result: The postfix role works when IPv6 is disabled.

      Adds a new test tests_disable_ipv6.yml to check for this.

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>

        1. Summary by Sourcery

      Detect IPv6-disabled environments and configure postfix to use only IPv4, streamline configuration management, and add an integration test for IPv6-disabled hosts.

      New Features:

      • Auto-detect when IPv6 is disabled and set postfix to listen only on IPv4
      • Add a test playbook to validate the postfix role on an IPv6-disabled host

      Enhancements:

      • Consolidate configuration application by delegating to manage_config.yml

      Tests:

      • Introduce tests_disable_ipv6.yml to verify role behavior with IPv6 disabled

              rmeggins@redhat.com Richard Megginson
              rmeggins@redhat.com Richard Megginson
              Richard Megginson Richard Megginson
              David Jez David Jez
              Valentina Ashirova Valentina Ashirova
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: