]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix REPLYTO_ADDR_EQ_FROM for normalised addresses 3739/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 29 Apr 2021 08:31:59 +0000 (10:31 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 29 Apr 2021 08:31:59 +0000 (10:31 +0200)
rules/headers_checks.lua
test/functional/cases/280_rules.robot
test/functional/messages/replyto_addr_eq_from.eml [new file with mode: 0644]

index f0f64daff6ddfcc644daad8977459db168268832..4613a7dd72a7383a7d7f7bda27b6adb268ca4a11 100644 (file)
@@ -214,7 +214,7 @@ local check_replyto_id = rspamd_config:register_symbol({
     end
 
     -- See if Reply-To matches From in some way
-    local from = task:get_from(2)
+    local from = task:get_from{'mime', 'orig'}
     local from_h = get_raw_header(task, 'From')
     if not (from and from[1]) then
       return false
index 5bab110166b6c92a14cb983799073bb738d3c0d4..ec8e12fb22841a0662d5163ed068af93704db510 100644 (file)
@@ -110,6 +110,9 @@ PHISH_SENDER_ROUTING_PART
   Scan File  ${TESTDIR}/messages/phish_sender6.eml
   Expect Symbol  FROM_INVALID
 
+REPLYTO_ADDR_EQ_FROM
+  Scan File  ${TESTDIR}/messages/replyto_addr_eq_from.eml
+  Expect Symbol  REPLYTO_ADDR_EQ_FROM
 
 
 *** Keywords ***
diff --git a/test/functional/messages/replyto_addr_eq_from.eml b/test/functional/messages/replyto_addr_eq_from.eml
new file mode 100644 (file)
index 0000000..8d61078
--- /dev/null
@@ -0,0 +1,5 @@
+From: "OMG" <kewl.example.20210428@gmail.com>
+Reply-To: "GMO" <kewl.example.20210428@gmail.com>
+Content-type: text/plain
+
+hi