[Rspamd-Users] Ignoring mail forward servers & spamtrap Envelope multiple addresses
rspamd.users at tbspace.de
Sat Jan 11 17:18:25 UTC 2020
I took a look at the spamtrap.lua plugin and found the comment in line
113, stating that:
"-- Do not risk a FP by checking for more than one recipient"
I still replaced the:
- if rcpts and #rcpts == 1 then
- target = rcpts['addr']:lower()
+ for _,sr in ipairs(rcpts) do
+ target = sr['addr']:lower()
which now causes the expected behavior for me.
The mail is now trained by the spam trap every time and it seems to work
One side effect is that emails with multiple recipients all listed in
the spam trap now get hit with the SPAMTRAP symbol multiple times.
That's okay (and maybe even desired?) in my application.
When using a map to lookup mail addresses, this could be fixed by
returning after the first positive lookup.
The redis lookups are done async, though and I'm not too sure on how to
get the expected behavior of only one positive lookup (without chaining
Maybe one of the devs can bring a bit more insight into why this was
written the way it is.
More information about the Users