Skip to content

Commit

Permalink
Adds tests for postfix smtpd recipient restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Feb 9, 2021
1 parent 516248e commit 9f115b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions molecule/testinfra/mon/test_postfix.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ def test_postfix_generic_maps(host):
"""
assert not host.file("/etc/postfix/generic").exists
assert not host.file("/etc/postfix/main.cf").contains("^smtp_generic_maps")
if host.system_info.codename == "focal":
assert host.file("/etc/postfix/main.cf").contains(
"^smtpd_recipient_restrictions = reject_unauth_destination")
if host.system_info.codename == "xenial":
assert not host.file("/etc/postfix/main.cf").contains(
"^smtpd_recipient_restrictions = reject_unauth_destination")


def test_postfix_service(host):
Expand Down

0 comments on commit 9f115b1

Please sign in to comment.