File diff c2f446ec7e2a → 9254a5c167c6
roles/mail_server/molecule/default/tests/test_optional.py
Show inline comments
 
@@ -133,20 +133,6 @@ def test_mail_owner(host):
 
    assert user.groups == ["virtmail"]
 

	
 

	
 
def test_imap_tls_connectivity(host):
 
    """
 
    Tests connectivity over STARTTLS/TLS towards IMAP server.
 
    """
 

	
 
    starttls = host.run('echo "a0001 LOGOUT" | openssl s_client -quiet -starttls imap -connect parameters-optional:143')
 
    assert starttls.rc == 0
 
    assert '* BYE Logging out' in starttls.stdout
 

	
 
    tls = host.run('echo "a0001 LOGOUT" | openssl s_client -quiet -connect parameters-optional:993')
 
    assert tls.rc == 0
 
    assert '* BYE Logging out' in starttls.stdout
 

	
 

	
 
@pytest.mark.parametrize("port", [
 
    143,
 
    993,
 
@@ -221,21 +207,6 @@ def test_imap_max_user_connections_per_ip(host):
 
        assert "  mail_max_userip_connections = 2" in config.stdout
 

	
 

	
 
def test_smtp_tls_connectivity(host):
 
    """
 
    Tests connectivity over default/submission port towards SMTP
 
    server.
 
    """
 

	
 
    starttls = host.run('echo "QUIT" | openssl s_client -quiet -starttls smtp -connect parameters-optional:25')
 
    assert starttls.rc == 0
 
    assert '221 2.0.0 Bye' in starttls.stdout
 

	
 
    tls = host.run('echo "QUIT" | openssl s_client -quiet -starttls smtp -connect parameters-optional:587')
 
    assert tls.rc == 0
 
    assert '221 2.0.0 Bye' in starttls.stdout
 

	
 

	
 
def test_smtp_default_port_tls_version_and_ciphers(host):
 
    """
 
    Tests TLS configuration for SMTP default port (needs to be less