-
Epic
-
Resolution: Unresolved
-
Undefined
-
None
-
[Epic]: fix: configure postfix to listen only to IPv4 if IPv6 is disabled
-
Low
-
Red Hat Enterprise Linux
-
0% To Do, 0% In Progress, 100% Done
-
rhel-system-roles
-
False
-
-
Yes
-
Dev ack
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
- links to