mirror of
https://github.com/moparisthebest/imapfilter
synced 2024-12-21 23:28:49 -05:00
Match only on the header field body
The match_field() method should match on the header field body and not the whole header field, thus the field name part is ignored.
This commit is contained in:
parent
c6515ebf7f
commit
2599efc94e
@ -1123,7 +1123,7 @@ function Mailbox.match_field(self, field, pattern, messages)
|
||||
|
||||
local results = {}
|
||||
for m, f in pairs(fields) do
|
||||
if (regex_search(pattern, f)) then
|
||||
if (regex_search(pattern, (string.gsub(f, "^[^:]*: ?(.*)$", "%1")))) then
|
||||
table.insert(results, {self, m})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user