commit 003aefe: [TEST] Some rules + FROM_NEQ_ENVFROM
korgoth1
vladislav.stakhov at gmail.com
Fri May 1 13:00:11 UTC 2020
Author: korgoth1
Date: 2020-05-01 15:51:21 +0300
URL: https://github.com/rspamd/rspamd/commit/003aefeb8f991725cd2ba4e229f135fde86931d0 (refs/pull/3356/head)
[TEST] Some rules + FROM_NEQ_ENVFROM
---
test/functional/cases/280_rules.robot | 20 ++++++++++++++++++
test/functional/messages/btc.eml | 33 ++++++++++++++++++++++++++++++
test/functional/messages/rcvd7.eml | 34 +++++++++++++++++++++++++++++++
test/functional/messages/yand_forward.eml | 31 ++++++++++++++++++++++++++++
4 files changed, 118 insertions(+)
diff --git a/test/functional/cases/280_rules.robot b/test/functional/cases/280_rules.robot
index b6b347313..9067084b5 100644
--- a/test/functional/cases/280_rules.robot
+++ b/test/functional/cases/280_rules.robot
@@ -55,6 +55,26 @@ PDF javascript
${result} = Scan Message With Rspamc ${MESSAGE7}
Check Rspamc ${result} PDF_JAVASCRIPT
+BITCOIN ADDR
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/btc.eml
+ Should Contain ${result.stdout} BITCOIN_ADDR
+
+RCVD_COUNT_ONE
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/btc.eml
+ Should Contain ${result.stdout} RCVD_COUNT_ONE
+
+RCVD_COUNT_FIVE
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/yand_forward.eml
+ Should Contain ${result.stdout} RCVD_COUNT_FIVE
+
+RCVD_COUNT_SEVEN
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/rcvd7.eml
+ Should Contain ${result.stdout} RCVD_COUNT_SEVEN
+
+FROM_NEQ_ENVFROM
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/yand_forward.eml
+ Should Contain ${result.stdout} FROM_NEQ_ENVFROM
+
*** Keywords ***
Rules Setup
diff --git a/test/functional/messages/btc.eml b/test/functional/messages/btc.eml
new file mode 100644
index 000000000..d1df8e0c1
--- /dev/null
+++ b/test/functional/messages/btc.eml
@@ -0,0 +1,33 @@
+Received: by mail-lf1-f54.google.com with SMTP id j14so14439709lfg.9
+ for <test at test.ru>; Mon, 27 Apr 2020 09:54:21 -0700 (PDT)
+From: test at test.com
+Date: Mon, 27 Apr 2020 19:54:10 +0300
+Message-ID: <CA+1S=h4aGimA6vSBJF=t1F+5z-Mua5+Cimf+NU_NDWJk8ZNOcw at mail.gmail.com>
+Subject: Fwd:
+To: <test at test.ru>
+Content-Type: multipart/alternative; boundary="00000000000004de7805a4489190"
+
+--0000000000004bee6805a4484c02
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: base64
+
+1EHbEvWFk
+R3oY93EKym1bweaWUW2PKe6v9
+
+--0000000000004bee6805a4484c02
+Content-Type: text/html; charset="UTF-8"
+Content-Transfer-Encoding: quoted-printable
+
+<div dir=3D"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
+=3D"gmail_attr">---------- Forwarded message ---------<br>=D0=9E=D1=82: <st=
+rong class=3D"gmail_sendername" dir=3D"auto">=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=
+=D1=81=D0=BB=D0=B0=D0=B2</strong> <span dir=3D"auto"><<a href=3D"mailto:=
+test at test.ru">test at test.ru</a>></span><br>=
+Date: =D0=BF=D0=BD, 27 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 19:34<br>Sub=
+ject: <br>To: =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2 =D0=A1=
+=D1=82=D0=B0=D1=85=D0=BE=D0=B2 <<a href=3D"mailto:vladislav.stakhov at gmai=
+l.com">test at test.ru</a>><br></div><br><br><div dir=3D"ltr=
+">1EHbEvWFkR3oY93EKym1bweaWUW2PKe6v9<br></div>
+</div></div>
+
+--0000000000004bee6805a4484c02--
\ No newline at end of file
diff --git a/test/functional/messages/rcvd7.eml b/test/functional/messages/rcvd7.eml
new file mode 100644
index 000000000..2da00dee8
--- /dev/null
+++ b/test/functional/messages/rcvd7.eml
@@ -0,0 +1,34 @@
+Return-Path: <test at test.ru>
+Received: from mx7.mail.testler.ru ([] verified)
+ by mail2006.testler.ru (testlerMail 6.1 SMTP 6.1a7)
+ with ESMTP id 60578244 for test at test.com; Mon, 27 Apr 2020 19:45:05 +0300
+Received: from forward106p.mail.test.net (forward106p.mail.test.net [])
+ by mx7.mail.testler.ru (Postfix) with ESMTP id 9B38C6E043A
+ for <test at test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from forward101p.mail.test.net (forward106p.mail.test.net [])
+ by mx7.mail.testler.ru (Postfix) with ESMTP id 9B38C6E043A
+ for <test at test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from forward100p.mail.test.net (forward106p.mail.test.net [])
+ by mx7.mail.testler.ru (Postfix) with ESMTP id 9B38C6E043A
+ for <test at test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from forward106p.mail.test.net (forward106p.mail.test.net [])
+ by resmtp2.mail.testler.ru (resmtp/testler) with ESMTP id j51GAaUB;
+ Mon, 27 Apr 2020 16:45:05 +0000
+Received: from forward102q.mail.test.net (forward102q.mail.test.net [])
+ by forward106p.mail.test.net (test) with ESMTP id 71D441C81C0C
+ for <test at test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from mxback10q.mail.test.net (mxback10q.mail.test.net [])
+ by forward102q.mail.test.net (test) with ESMTP id 6E2CA7F20010
+ for <test at test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+From: test at test.ru
+Envelope-From: test at test.ru
+To: <test at test.ru>,
+ <test at test.com>
+In-Reply-To: <878111588005719 at mail.test.ru>
+Subject: Fwd: 123
+MIME-Version: 1.0
+X-Mailer: test [ http://test.ru ] 5.0
+Date: Mon, 27 Apr 2020 19:45:05 +0300
+Message-Id: <906211588005891 at mail.test.ru>
+Content-Type: text/html; charset=utf-8
+Content-Transfer-Encoding: quoted-printable
\ No newline at end of file
diff --git a/test/functional/messages/yand_forward.eml b/test/functional/messages/yand_forward.eml
new file mode 100644
index 000000000..b95309f33
--- /dev/null
+++ b/test/functional/messages/yand_forward.eml
@@ -0,0 +1,31 @@
+Return-Path: <test at test.eu>
+Received: from mx7.test.ru ([0.0.0.0] verified)
+ by mail.test.ru (test mail)
+ with ESMTP id 60578244
+ (envelope-from <test at test.net>)
+ for test at test.ru; Mon, 27 Apr 2020 19:45:05 +0300
+Received: from forward106p.test.eu (forward106p.test.eu [])
+ by mail.test.ru (Postfix) with ESMTP id 9B38C6E043A
+ (envelope-from <test at test.net>)
+ for <test at test.ru>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from forward106p.test.eu (forward106p.test.eu [])
+ by test.ru (test) with ESMTP id j51GAaUB;
+ Mon, 27 Apr 2020 16:45:05 +0000
+Received: from forward102q.test.eu (forward102q.test.eu [])
+ by forward106p.test.eu (test) with ESMTP id 71D441C81C0C
+ (envelope-from <test at test.net>)
+ for <test at test.ru>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+Received: from mxback10q.test.eu (mxback10q.test.eu [])
+ by forward102q.test.eu (test) with ESMTP id 6E2CA7F20010
+ (envelope-from <test at test.net>)
+ for <test at test.ru>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+From: test at test.eu
+Envelope-From: test at test.net
+To: <test at test.ru>,
+ <test at test.com>
+In-Reply-To: <test at test.eu>
+Subject: Fwd: 123
+MIME-Version: 1.0
+Date: Mon, 27 Apr 2020 19:45:05 +0300
+
+lsakdlsa;dk
\ No newline at end of file
More information about the Commits
mailing list