]> source.dussan.org Git - rspamd.git/commitdiff
[Test] SPF for relay
authorkorgoth1 <vladislav.stakhov@gmail.com>
Sat, 7 Dec 2019 18:47:51 +0000 (21:47 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Sat, 7 Dec 2019 18:47:51 +0000 (21:47 +0300)
test/functional/cases/117_spf.robot
test/functional/configs/dmarc.conf
test/functional/configs/plugins.conf
test/functional/configs/spf.conf [deleted file]
test/functional/messages/external_relay.eml

index 7e1f80f2491a35bea34069222789da09f108bec5..ca4309fcb72dc99974d75d3256d67983c869c2f7 100644 (file)
@@ -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
index 903e28a715f8f547e28bc6df43bee7b3055f1738..08a542c70c9a4ea8827e129531a1005524812ef0 100644 (file)
@@ -1,4 +1,4 @@
 dmarc { }
 spf {
-       external_relay = 192.168.1.1
+       external_relay = 192.168.1.1;
 }
\ No newline at end of file
index 2ac6e7a2c7a5a4540aaf74d538524bb226411026..098209788337ba4e419c66d945ce93b01ba9c267 100644 (file)
@@ -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 (file)
index 37028b1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-spf { }
index ab52479d1bc58379e20120925d019fb702ab8ae0..14ac8ae2ca8d11e16f9acad0b06f69dff2b654ae 100644 (file)
@@ -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