diff --git a/src/relay_minitest/test_relay.py b/src/relay_minitest/test_relay.py index 8ac12e4..b350da1 100644 --- a/src/relay_minitest/test_relay.py +++ b/src/relay_minitest/test_relay.py @@ -102,26 +102,27 @@ def test_one_on_one_smtp_only(self, cmfactory, cmfactory2, relayadmin2, lp): msg2 = ac2.wait_for_incoming_msg() assert msg2.get_snapshot().text == "should still arrive over smtp" - def test_hide_senders_ip_address(cmfactory, ssl_context): public_ip = requests.get("http://icanhazip.com").content.decode().strip() assert ipaddress.ip_address(public_ip) user1, user2 = cmfactory.get_online_accounts(2) + user2.set_config("bcc_self", "1") chat = cmfactory.get_accepted_chat(user1, user2) chat.send_text("testing submission header cleanup") user2.wait_for_incoming_msg() + addr = user2.get_config("addr") host = addr.split("@")[1].strip("[]") pw = user2.get_config("mail_pw") mailbox = imap_tools.MailBox(host, ssl_context=ssl_context) mailbox.login(addr, pw) msgs = list(mailbox.fetch(mark_seen=False)) + assert msgs, "expected at least one message" assert public_ip not in msgs[0].obj.as_string() - def test_unencrypted_rejection(cmsetup, lp): """Test that unencrypted messages are rejected by the relay.""" lp.sec("creating users")