Skip to content

Fix bug 3071#3075

Open
kreshot wants to merge 1 commit into
knadh:masterfrom
kreshot:bugfix/3071-bounce-checking
Open

Fix bug 3071#3075
kreshot wants to merge 1 commit into
knadh:masterfrom
kreshot:bugfix/3071-bounce-checking

Conversation

@kreshot

@kreshot kreshot commented Jun 5, 2026

Copy link
Copy Markdown

In addition to the last message part, allow the text/plain part for bounce reason parsing.

Also, if a read error is encountered, skip the message and move to the next one. This will allow the bounce processor to not get stuck when an error happens, and eventually the bounces mailbox will only contain problematic messages. This will allow easier examination of future issues.

Additionally, if a read error is encountered, skip the message and move to the next one.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues Found

Critical (P0/P1)

  • [P1] Prevent skipped multipart messages from being deleted unprocessed (internal/bounce/mailbox/pop.go:137-143)
    • When mr.NextPart() returns a non-EOF error, the new continue MESSAGES_LOOP skips emitting a Bounce for that message, but the function still runs the unconditional delete loop (Dele(1..count)) afterward. This causes malformed/problematic multipart bounces to be silently dropped (not processed and not left in the mailbox for inspection), which is especially likely with MIME boundary corruption—the exact scenario this change is trying to handle.

Summary

Total issues: 1 critical, 0 important, 0 minor.

Overall Verdict

Status: Patch has blocking issues

Explanation: The new multipart error handling can skip processing a message but the later unconditional POP3 deletion still removes it, leading to lost bounce events and preventing later inspection of problematic messages.


Review generated by Hodor (model: gpt-5.2)

Review Metrics — 10 turns, 9 tool calls, 1m 43s

  • Tokens: in 8.4K | cached 72.1K | out 5.7K (total 86.2K)
  • Cost: $0.1075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hodor-review Automated AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants