<def-group oval_version="5.11">
  <definition class="compliance" id="postfix_network_listening_disabled" version="2">
    {{{ oval_metadata("Postfix network listening should be disabled") }}}
    <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:state state_ref="state_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]*(.*)[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_postfix_network_listening_disabled" version="1">
    <ind:subexpression datatype="string" operation="equals" var_ref="var_postfix_inet_interfaces" />
  </ind:textfilecontent54_state>

  <external_variable comment="external variable for postfix inet_interfaces" datatype="string" id="var_postfix_inet_interfaces" version="1" />

</def-group>
