commit 5eee098: [Test] SPF PERMFAIL REDIRECT WITHOUT SPF
korgoth1
vladislav.stakhov at gmail.com
Sat Dec 7 20:56:05 UTC 2019
Author: korgoth1
Date: 2019-12-06 22:55:00 +0300
URL: https://github.com/rspamd/rspamd/commit/5eee09843993f42cb8de30116968ac175600976c
[Test] SPF PERMFAIL REDIRECT WITHOUT SPF
---
test/functional/cases/117_spf.robot | 5 +++++
test/functional/configs/dmarc.conf | 4 +++-
test/functional/configs/plugins.conf | 10 ++++++++++
test/functional/messages/external_relay.eml | 18 ++++++++++++++++++
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/test/functional/cases/117_spf.robot b/test/functional/cases/117_spf.robot
index 309a0aaef..99e50075b 100644
--- a/test/functional/cases/117_spf.robot
+++ b/test/functional/cases/117_spf.robot
@@ -127,6 +127,11 @@ SPF PERMFAIL REDIRECT WITHOUT SPF
... -i 192.0.2.1 -F a at fail1.org.org.za
Check Rspamc ${result} R_SPF_PERMFAIL
+SPF EXTERNAL RELAY
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/external_relay.eml
+ ... -F root at trusted.client
+ Check Rspamc ${result} R_SPF_PERMFAIL
+
*** Keywords ***
SPF Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dmarc.conf
diff --git a/test/functional/configs/dmarc.conf b/test/functional/configs/dmarc.conf
index 0d931b7d3..903e28a71 100644
--- a/test/functional/configs/dmarc.conf
+++ b/test/functional/configs/dmarc.conf
@@ -1,2 +1,4 @@
dmarc { }
-spf { }
+spf {
+ external_relay = 192.168.1.1
+}
\ No newline at end of file
diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf
index 851f280d9..2ac6e7a2c 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -218,6 +218,16 @@ options = {
type = "txt";
replies = ["v=spf1 ip4:8.8.8.8 a -all"];
},
+ {
+ name = "trusted.relay",
+ type = "txt";
+ replies = ["v=spf1 -all"];
+ },
+ {
+ name = "external.client",
+ type = "txt";
+ replies = ["v=spf1 ip4:37.98.67.26"];
+ },
{
name = "co.za",
type = "txt";
diff --git a/test/functional/messages/external_relay.eml b/test/functional/messages/external_relay.eml
new file mode 100644
index 000000000..ab52479d1
--- /dev/null
+++ b/test/functional/messages/external_relay.eml
@@ -0,0 +1,18 @@
+Received: from trusted.relay (192.168.1.1) by
+ example.com (37.98.67.26) with Microsoft SMTP
+ Server id for <test at example.com>
+ 15.1.1847.3; Thu, 5 Dec 2019 18:22:18 +0300
+Received: from external.client (37.48.67.26) by
+ trusted.relay (192.168.1.1) with Microsoft SMTP
+ Server id 15.1.1847.3 via Frontend Transport; Thu, 5 Dec 2019 18:22:18 +0300
+To: test at example.com
+From: root at external.client
+Subject: test Sat, 26 Jan 2019 12:04:58 +0100
+Message-Id: <20190126120458.015328 at srv.example.com>
+Date: Sat, 26 Jan 2019 12:04:58 +0100
+MIME-Version: 1.0
+Content-Type: multipart/mixed
+
+dsadas
+
+fail6.org.org.za
\ No newline at end of file
More information about the Commits
mailing list