]> source.dussan.org Git - rspamd.git/commitdiff
[TEST] Some rules + FROM_NEQ_ENVFROM 3356/head
authorkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 1 May 2020 12:51:21 +0000 (15:51 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 1 May 2020 12:51:21 +0000 (15:51 +0300)
test/functional/cases/280_rules.robot
test/functional/messages/btc.eml [new file with mode: 0644]
test/functional/messages/rcvd7.eml [new file with mode: 0644]
test/functional/messages/yand_forward.eml [new file with mode: 0644]

index b6b34731349b46870f5fa982c270f8971511e8aa..9067084b53036308aebf34623d0126ff5979a9fa 100644 (file)
@@ -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 (file)
index 0000000..d1df8e0
--- /dev/null
@@ -0,0 +1,33 @@
+Received: by mail-lf1-f54.google.com with SMTP id j14so14439709lfg.9
+        for <test@test.ru>; Mon, 27 Apr 2020 09:54:21 -0700 (PDT)
+From: test@test.com
+Date: Mon, 27 Apr 2020 19:54:10 +0300
+Message-ID: <CA+1S=h4aGimA6vSBJF=t1F+5z-Mua5+Cimf+NU_NDWJk8ZNOcw@mail.gmail.com>
+Subject: Fwd:
+To: <test@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">&lt;<a href=3D"mailto:=
+test@test.ru">test@test.ru</a>&gt;</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 &lt;<a href=3D"mailto:vladislav.stakhov@gmai=
+l.com">test@test.ru</a>&gt;<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 (file)
index 0000000..2da00de
--- /dev/null
@@ -0,0 +1,34 @@
+Return-Path: <test@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@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@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@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@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@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@test.com>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+From: test@test.ru
+Envelope-From: test@test.ru
+To: <test@test.ru>, 
+       <test@test.com>
+In-Reply-To: <878111588005719@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@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 (file)
index 0000000..b95309f
--- /dev/null
@@ -0,0 +1,31 @@
+Return-Path: <test@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@test.net>)
+  for test@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@test.net>)
+       for <test@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@test.net>)
+       for <test@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@test.net>)
+       for <test@test.ru>; Mon, 27 Apr 2020 19:45:05 +0300 (MSK)
+From: test@test.eu
+Envelope-From: test@test.net
+To: <test@test.ru>, 
+       <test@test.com>
+In-Reply-To: <test@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