diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-08 18:14:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 18:14:02 +0000 |
commit | a3f235901143eb1e92294cf075349c411c6b0e86 (patch) | |
tree | cb2c2c5b58479e18edae17afd066c611fa170655 /test | |
parent | 03cf7aff97c45a3fdbae75da0d7596cef9578a81 (diff) | |
parent | ae72c0999e2440a460cccf339249b8a0af89275f (diff) | |
download | rspamd-a3f235901143eb1e92294cf075349c411c6b0e86.tar.gz rspamd-a3f235901143eb1e92294cf075349c411c6b0e86.zip |
Merge pull request #1951 from fatalbanana/exim_rcvd
Fix Exim Received header protocol parsing
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/102_multimap.robot | 16 | ||||
-rw-r--r-- | test/functional/configs/maps/rcvd2.list | 2 | ||||
-rw-r--r-- | test/functional/messages/received3.eml | 16 | ||||
-rw-r--r-- | test/functional/messages/received4.eml | 16 |
4 files changed, 48 insertions, 2 deletions
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot index 569f75e3b..c46fff39b 100644 --- a/test/functional/cases/102_multimap.robot +++ b/test/functional/cases/102_multimap.robot @@ -13,6 +13,8 @@ ${REDIS_SCOPE} Suite ${RSPAMD_SCOPE} Suite ${RCVD1} ${TESTDIR}/messages/received1.eml ${RCVD2} ${TESTDIR}/messages/received2.eml +${RCVD3} ${TESTDIR}/messages/received3.eml +${RCVD4} ${TESTDIR}/messages/received4.eml ${URL1} ${TESTDIR}/messages/url1.eml ${URL2} ${TESTDIR}/messages/url2.eml ${URL3} ${TESTDIR}/messages/url3.eml @@ -270,16 +272,26 @@ MAP - RECEIVED - IP MINMAX POS - ONE Check Rspamc ${result} RCVD_TEST_01 Check Rspamc ${result} RCVD_TEST_02 inverse=1 -MAP - RECEIVED - IP MINMAX POS - TWO +MAP - RECEIVED - IP MINMAX POS - TWO / RCVD_AUTHED_ONE HIT ${result} = Scan Message With Rspamc ${RCVD2} Check Rspamc ${result} RCVD_TEST_02 - Check Rspamc ${result} RCVD_TEST_01 inverse=1 + Should Not Contain ${result.stdout} RCVD_TEST_01 + Should Contain ${result.stdout} RCVD_AUTHED_ONE MAP - RECEIVED - REDIS Redis HSET RCVD_TEST 2a01:7c8:aab6:26d:5054:ff:fed1:1da2 ${EMPTY} ${result} = Scan Message With Rspamc ${RCVD1} Check Rspamc ${result} RCVD_TEST_REDIS_01 +RCVD_AUTHED_ONE & RCVD_AUTHED_TWO - MISS + ${result} = Scan Message With Rspamc ${RCVD3} + Check Rspamc ${result} RCVD_AUTHED_ inverse=1 + +RCVD_AUTHED_TWO HIT / RCVD_AUTHED_ONE MISS + ${result} = Scan Message With Rspamc ${RCVD4} + Check Rspamc ${result} RCVD_AUTHED_TWO + Should Not Contain ${result.stdout} RCVD_AUTHED_ONE + *** Keywords *** Multimap Setup ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/multimap.conf diff --git a/test/functional/configs/maps/rcvd2.list b/test/functional/configs/maps/rcvd2.list new file mode 100644 index 000000000..97dba5b6f --- /dev/null +++ b/test/functional/configs/maps/rcvd2.list @@ -0,0 +1,2 @@ +151.18.193.131 + diff --git a/test/functional/messages/received3.eml b/test/functional/messages/received3.eml new file mode 100644 index 000000000..9fea8eeaf --- /dev/null +++ b/test/functional/messages/received3.eml @@ -0,0 +1,16 @@ +Received: apparently
+Received: or is it
+Received: from server.chat-met-vreemden.nl (unknown [IPv6:2a01:7c8:aab6:26d:5054:ff:fed1:1da2])
+ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
+ (Client did not present a certificate)
+ by mx1.freebsd.org (Postfix) with ESMTPS id CF0171862
+ for <test@example.com>; Mon, 6 Jul 2015 09:01:20 +0000 (UTC)
+ (envelope-from upwest201diana@outlook.com)
+Received: from ca-18-193-131.service.infuturo.it ([151.18.193.131] helo=User)
+ by server.chat-met-vreemden.nl with esmtp (Exim 4.76)
+ (envelope-from <upwest201diana@outlook.com>)
+ id 1ZC1sl-0006b4-TU; Mon, 06 Jul 2015 10:36:08 +0200
+MIME-Version: 1.0
+Content-Type: text/plain
+
+Hello
diff --git a/test/functional/messages/received4.eml b/test/functional/messages/received4.eml new file mode 100644 index 000000000..d34ebb1be --- /dev/null +++ b/test/functional/messages/received4.eml @@ -0,0 +1,16 @@ +Received: apparently
+Received: or is it
+Received: from server.chat-met-vreemden.nl (unknown [IPv6:2a01:7c8:aab6:26d:5054:ff:fed1:1da2])
+ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
+ (Client did not present a certificate)
+ by mx1.freebsd.org (Postfix) with ESMTPS id CF0171862
+ for <test@example.com>; Mon, 6 Jul 2015 09:01:20 +0000 (UTC)
+ (envelope-from upwest201diana@outlook.com)
+Received: from ca-18-193-131.service.infuturo.it ([151.18.193.131] helo=User)
+ by server.chat-met-vreemden.nl with esmtpsa (Exim 4.76)
+ (envelope-from <upwest201diana@outlook.com>)
+ id 1ZC1sl-0006b4-TU; Mon, 06 Jul 2015 10:36:08 +0200
+MIME-Version: 1.0
+Content-Type: text/plain
+
+Hello
|