summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2019-12-07 21:47:51 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2019-12-07 21:47:51 +0300
commitd6a1a0f31fa4e8d72faef0f9536cc179b42c37a9 (patch)
treeffb6f553e33472d9b968317a8e3b03a429f80723 /test/functional
parentcad261c52f9cc33144edc6c5e09b11c50c294421 (diff)
downloadrspamd-d6a1a0f31fa4e8d72faef0f9536cc179b42c37a9.tar.gz
rspamd-d6a1a0f31fa4e8d72faef0f9536cc179b42c37a9.zip
[Test] SPF for relay
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/117_spf.robot3
-rw-r--r--test/functional/configs/dmarc.conf2
-rw-r--r--test/functional/configs/plugins.conf8
-rw-r--r--test/functional/configs/spf.conf1
-rw-r--r--test/functional/messages/external_relay.eml18
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@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@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@external.com
+Received: from trusted.com (trusted.com [192.168.1.1]) by
+ example.com with LMTP id MJX+NoRd5F2caAAAzslS3g for <test@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@example.com
-From: root@external.client
+From: root@external.com
Subject: test Sat, 26 Jan 2019 12:04:58 +0100
Message-Id: <20190126120458.015328@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