commit d6a1a0f: [Test] SPF for relay
korgoth1
vladislav.stakhov at gmail.com
Sat Dec 7 20:56:09 UTC 2019
Author: korgoth1
Date: 2019-12-07 21:47:51 +0300
URL: https://github.com/rspamd/rspamd/commit/d6a1a0f31fa4e8d72faef0f9536cc179b42c37a9
[Test] SPF for relay
---
test/functional/cases/117_spf.robot | 3 +--
test/functional/configs/dmarc.conf | 2 +-
test/functional/configs/plugins.conf | 8 ++++----
test/functional/configs/spf.conf | 1 -
test/functional/messages/external_relay.eml | 18 ++++++++----------
5 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/test/functional/cases/117_spf.robot b/test/functional/cases/117_spf.robot
index 7e1f80f24..ca4309fcb 100644
--- a/test/functional/cases/117_spf.robot
+++ b/test/functional/cases/117_spf.robot
@@ -129,8 +129,7 @@ SPF PERMFAIL REDIRECT WITHOUT SPF
SPF EXTERNAL RELAY
${result} = Scan Message With Rspamc ${TESTDIR}/messages/external_relay.eml
- ... -F root at trusted.client
- Check Rspamc ${result} R_SPF_PERMFAIL
+ Should contain ${result.stdout} R_SPF_ALLOW (1.00)[+ip4:37.48.67.26]
*** Keywords ***
SPF Setup
diff --git a/test/functional/configs/dmarc.conf b/test/functional/configs/dmarc.conf
index 903e28a71..08a542c70 100644
--- a/test/functional/configs/dmarc.conf
+++ b/test/functional/configs/dmarc.conf
@@ -1,4 +1,4 @@
dmarc { }
spf {
- external_relay = 192.168.1.1
+ 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 2ac6e7a2c..098209788 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -219,14 +219,14 @@ options = {
replies = ["v=spf1 ip4:8.8.8.8 a -all"];
},
{
- name = "trusted.relay",
+ name = "trusted.com",
type = "txt";
- replies = ["v=spf1 -all"];
+ replies = ["v=spf1 ip4:192.168.1.1"];
},
{
- name = "external.client",
+ name = "external.com",
type = "txt";
- replies = ["v=spf1 ip4:37.98.67.26"];
+ replies = ["v=spf1 ip4:37.48.67.26"];
},
{
name = "co.za",
diff --git a/test/functional/configs/spf.conf b/test/functional/configs/spf.conf
deleted file mode 100644
index 37028b1a7..000000000
--- a/test/functional/configs/spf.conf
+++ /dev/null
@@ -1 +0,0 @@
-spf { }
diff --git a/test/functional/messages/external_relay.eml b/test/functional/messages/external_relay.eml
index ab52479d1..14ac8ae2c 100644
--- a/test/functional/messages/external_relay.eml
+++ b/test/functional/messages/external_relay.eml
@@ -1,12 +1,12 @@
-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
+Return-path: root at external.com
+Received: from trusted.com (trusted.com [192.168.1.1]) by
+ example.com with LMTP id MJX+NoRd5F2caAAAzslS3g for <test at example.com>;
+ Thu, 5 Dec 2019 18:22:18 +0300
+Received: from external.com (external.com [37.48.67.26]) by
+ trusted.com (Postfix) with ESMTP id C018DA00021;
+ Thu, 5 Dec 2019 18:22:18 +0300
To: test at example.com
-From: root at external.client
+From: root at external.com
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
@@ -14,5 +14,3 @@ 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