Fix Postfix mynetworks if IPv6 is disabled

If a deployer sets disable_ipv6 = yes, we should ensure that the
mynetworks directive in /etc/postfix/main.cf contains only IPv4
addresses. The `newalias` command fails if IPv6 addresses appear
in mynetworks but IPv6 is disable system-wide.

Closes-bug: 1538268
Change-Id: I45f09d631e9b81554f8463851143fd27c9f51ead
This commit is contained in:
Major Hayden 2016-02-03 09:37:37 -06:00
parent 3b3ba5892c
commit 945bd869f4
1 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,17 @@
- cat3
- V-38669
- name: V-38669 - Use only IPv4 addresses in mynetworks if IPv6 is disabled
lineinfile:
dest: /etc/postfix/main.cf
regexp: "^(#)?mynetworks"
line: "mynetworks = 127.0.0.0/8"
when: disable_ipv6 | bool
tags:
- mail
- cat3
- V-38669
# Be sure to set root_forward_email so that this task is executed. See the
# documentation for more details.
- name: V-38446 - Mail system must forward root's email