@@ -229,6 +229,22 @@ def test_postfix_main_cf_file(host):
assert config.mode == 0o644
def test_postfix_main_configuration_is_valid(host):
"""
Tests if Postfix main configuration is valid and not producing any
warnings.
postconf = host.run('/usr/sbin/postconf')
# Clean-up the SSH warning from the beginning of stderr if
# present.
stderr = re.sub("^Warning: Permanently added.*?\r\n", "", postconf.stderr)
assert postconf.rc == 0
assert stderr == ""
def test_postfix_delivery_to_dovecot(host):
Tests if mail received by Postfix is properly delivered to Dovecot.