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 8, 2021
1 parent 21f613f commit 3c53b7d
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 3c53b7d

Please sign in to comment.