Diff

mod_anti_spam/mod_anti_spam.lua @ 6158:73c523248558

mod_anti_spam: Fix generation of error bounce stanzas
author Matthew Wild <mwild1@gmail.com>
date Fri, 17 Jan 2025 12:19:55 +0000
parent 6157:ddb0fac151ac
child 6191:94399ad6b5ab
line wrap: on
line diff
--- a/mod_anti_spam/mod_anti_spam.lua	Fri Jan 17 11:19:05 2025 +0000
+++ b/mod_anti_spam/mod_anti_spam.lua	Fri Jan 17 12:19:55 2025 +0000
@@ -50,7 +50,7 @@
 
 	if action == "bounce" then
 		module:log("debug", "Bouncing likely spam %s from %s (%s)", event.stanza.name, event.stanza.attr.from, reason);
-		event.origin.send(st.error_reply("cancel", "policy-violation", reason_messages[reason] or reason_messages.default));
+		event.origin.send(st.error_reply(event.stanza, "cancel", "policy-violation", reason_messages[reason] or reason_messages.default));
 	else
 		module:log("debug", "Discarding likely spam %s from %s (%s)", event.stanza.name, event.stanza.attr.from, reason);
 	end