@@ -25,48 +25,6 @@ def test_postfix_headers(File, header):
25
25
assert re .search (regex , f .content , re .M )
26
26
27
27
28
- @pytest .mark .parametrize ('setting' , [
29
- 'relayhost = [smtp.gmail.com]:587' ,
30
- 'smtp_sasl_auth_enable = yes' ,
31
- 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd' ,
32
- 'smtp_sasl_security_options = noanonymous' ,
33
- 'smtp_use_tls = yes' ,
34
- 'smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache' ,
35
- 'smtp_tls_security_level = secure' ,
36
- 'smtp_tls_CApath = /etc/ssl/certs' ,
37
- 'smtp_tls_ciphers = high' ,
38
- 'smtp_tls_protocols = TLSv1.2 TLSv1.1 TLSv1 !SSLv3 !SSLv2' ,
39
- 'myhostname = ossec.server' ,
40
- 'myorigin = $myhostname' ,
41
- 'smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)' ,
42
- 'biff = no' ,
43
- 'append_dot_mydomain = no' ,
44
- 'readme_directory = no' ,
45
- 'smtp_header_checks = regexp:/etc/postfix/header_checks' ,
46
- 'mailbox_command = /usr/bin/procmail' ,
47
- 'inet_interfaces = loopback-only' ,
48
- 'alias_maps = hash:/etc/aliases' ,
49
- 'alias_database = hash:/etc/aliases' ,
50
- 'mydestination = $myhostname, localhost.localdomain , localhost' ,
51
- 'mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128' ,
52
- 'mailbox_size_limit = 0' ,
53
- 'recipient_delimiter = +' ,
54
- ])
55
- def test_postfix_settings (File , setting ):
56
- """
57
- Check all postfix configuration lines. There are technically multiple
58
- configuration paths regarding the TLS settings, particularly the
59
- fingerprint verification logic, but only the base default config is tested
60
- currently.
61
- """
62
- f = File ("/etc/postfix/main.cf" )
63
- assert f .is_file
64
- assert f .user == 'root'
65
- assert oct (f .mode ) == "0644"
66
- regex = '^{}$' .format (re .escape (setting ))
67
- assert re .search (regex , f .content , re .M )
68
-
69
-
70
28
def test_postfix_generic_maps (File ):
71
29
"""
72
30
Regression test to check that generic Postfix maps are not configured
0 commit comments