summaryrefslogtreecommitdiffstats
path: root/rules/bounce.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
commit662145d0554de5e769b92dab2d41173a98adcee5 (patch)
treeec28311a0bce6181f248ba7b50304293ad764e44 /rules/bounce.lua
parentbbd88232db43d18f5e0de5a6502848d4074621c5 (diff)
downloadrspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz
rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'rules/bounce.lua')
-rw-r--r--rules/bounce.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/rules/bounce.lua b/rules/bounce.lua
index 08e1faef4..fb74b9797 100644
--- a/rules/bounce.lua
+++ b/rules/bounce.lua
@@ -57,12 +57,11 @@ rspamd_config.BOUNCE = {
return false
end
-
local parts = task:get_parts()
local top_type, top_subtype, params = parts[1]:get_type_full()
-- RFC 3464, RFC 8098
if top_type == 'multipart' and top_subtype == 'report' and params and
- (params['report-type'] == 'delivery-status' or params['report-type'] == 'disposition-notification') then
+ (params['report-type'] == 'delivery-status' or params['report-type'] == 'disposition-notification') then
-- Assume that inner parts are OK, don't check them to save time
return true, 1.0, 'DSN'
end
@@ -75,9 +74,9 @@ rspamd_config.BOUNCE = {
-- Check common bounce senders
if (from_user == 'postmaster' or from_user == 'mailer-daemon') then
bounce_sender = from_user
- -- MDaemon >= 14.5 sends multipart/report (RFC 3464) DSN covered above,
- -- but older versions send non-standard bounces with localized subjects and they
- -- are still around
+ -- MDaemon >= 14.5 sends multipart/report (RFC 3464) DSN covered above,
+ -- but older versions send non-standard bounces with localized subjects and they
+ -- are still around
elseif from_user == 'mdaemon' and task:has_header('X-MDDSN-Message') then
return true, 1.0, 'MDaemon'
end