<def-group>
  <definition class="compliance" id="postfix_network_listening_disabled" version="2">
    <metadata>
      <title>Postfix network listening should be disabled</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>Postfix network listening should be disabled</description>
      <reference source="JL" ref_id="RHEL6_20150211" ref_url="test_attestation" />
    </metadata>
    <criteria operator="OR">
      <!-- postfix package not installed or postfix service not configured to start -->
      <extend_definition comment="Postfix installed and configured to start" negate="true" definition_ref="service_postfix_enabled" />
      <!-- postfix network listening disabled -->
      <criterion comment="Check inet_interfaces in /etc/postfix/main.cf" test_ref="test_postfix_network_listening_disabled" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test id="test_postfix_network_listening_disabled" check="all" check_existence="at_least_one_exists" comment="inet_interfaces in /etc/postfix/main.cf should be set correctly" version="1">
    <ind:object object_ref="obj_postfix_network_listening_disabled" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_postfix_network_listening_disabled" comment="inet_interfaces in /etc/postfix/main.cf should be set correctly" version="1">
    <ind:filepath>/etc/postfix/main.cf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*inet_interfaces[\s]*=[\s]*localhost[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
