65 lines
2.5 KiB
Diff
65 lines
2.5 KiB
Diff
From 6eada072194037049e5875edc4fda914d9c67f83 Mon Sep 17 00:00:00 2001
|
|
From: starlet-dx <15929766099@163.com>
|
|
Date: Thu, 19 Jan 2023 15:08:54 +0800
|
|
Subject: [PATCH 1/1] Require authheaders >=0.14.0 and adjust tests accordingly.
|
|
|
|
---
|
|
setup.py | 2 +-
|
|
src/mailman/handlers/tests/test_arc_validate.py | 13 ++++++++-----
|
|
2 files changed, 9 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 5eceac2..5171d0e 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -113,7 +113,7 @@ case second 'm'. Any other spelling is incorrect.""",
|
|
'aiosmtpd>=1.1',
|
|
'alembic',
|
|
'atpublic',
|
|
- 'authheaders>=0.9.2',
|
|
+ 'authheaders>=0.14.0',
|
|
'authres>=1.0.1',
|
|
'click>=8.0.0',
|
|
'dnspython>=1.14.0',
|
|
diff --git a/src/mailman/handlers/tests/test_arc_validate.py b/src/mailman/handlers/tests/test_arc_validate.py
|
|
index 6eb2f57..2103b08 100644
|
|
--- a/src/mailman/handlers/tests/test_arc_validate.py
|
|
+++ b/src/mailman/handlers/tests/test_arc_validate.py
|
|
@@ -190,8 +190,9 @@ This is a test message.
|
|
""")
|
|
|
|
ValidateAuthenticity().process(lst, msg, msgdata)
|
|
- res = ["lists.example.org; spf=pass smtp.mfrom=jqd@d1.example"
|
|
- "; dkim=pass header.i=@d1.example; dmarc=pass; arc=fail"]
|
|
+ res = ['lists.example.org; spf=pass smtp.mfrom=jqd@d1.example',
|
|
+ '; dkim=pass header.i=@d1.example; dmarc=pass; arc=fail ',
|
|
+ '(Most recent ARC-Message-Signature did not validate)']
|
|
self.assertEqual(msg["Authentication-Results"], ''.join(res))
|
|
|
|
def test_authentication_whitelist_hit(self):
|
|
@@ -233,8 +234,9 @@ This is a test!
|
|
|
|
ValidateAuthenticity().process(lst, msg, msgdata)
|
|
|
|
- res = ["example.com; spf=pass smtp.mailfrom=gmail.com"
|
|
- "; dkim=pass header.d=valimail.com; arc=none"]
|
|
+ res = ['example.com; spf=pass smtp.mailfrom=gmail.com',
|
|
+ '; dkim=pass header.d=valimail.com; arc=none ',
|
|
+ '(Message is not ARC signed)']
|
|
self.assertEqual(msg["Authentication-Results"], ''.join(res))
|
|
|
|
def test_authentication_whitelist_miss(self):
|
|
@@ -277,7 +279,8 @@ This is a test!
|
|
|
|
ValidateAuthenticity().process(lst, msg, msgdata)
|
|
self.assertEqual(msg["Authentication-Results"],
|
|
- "test.com; dkim=pass header.d=valimail.com; arc=none")
|
|
+ 'test.com; dkim=pass header.d=valimail.com; arc=none '
|
|
+ '(Message is not ARC signed)')
|
|
|
|
|
|
class TestTimeout(unittest.TestCase):
|
|
--
|
|
2.30.0
|
|
|