-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Hi there @andris9 and @louis-lau 👋
Just sharing some suggestions for the function here:
- Test for
postmaster@in addition tomailer-daemon@(if postmaster shouldn't bounce) for both MAIL FROM and From header. You may also want to test against no reply addresses. We maintain a list at https://github.com/forwardemail/reserved-email-addresses-list. We also check for a MAIL FROM and From header that ends with+donotreplyand-donotreply(e.g. Google Groups). We also test againstroot,cron, etc. - If
Auto-Submittedis anything other than=no, then don't bounce. Right now you only test forauto-repliedandauto-generated. - If
X-Auto-Response-Suppressis (case insensitive)dr,autoreply,auto-reply,auto_reply, orallthen don't bounce. Right now you only check forall. - You only check Content-Type for
multipart/reportright now, but you might want to specifically check againstreport-typeofdelivery-statusordelivery-notificationfor accuracy. - If it contains
X-MDDSN-Messageand From or MAIL FROM ismdaemonthen it probably shouldn't bounce (Microsoft DSN header) - If every part of the message had
typeofmessageortextAND everysubtypewas eitherrfc822-headersorrfc822(e.g. https://github.com/stalwartlabs/mail-server/blob/4f02e4c96f9dc01f37f077bf2597e5a943bb1f02/resources/config/spamfilter/scripts/bounce.sieve) - If there is a
Precedenceheader with a value that isautoreply,auto-reply,auto_reply(case insensitive) then don't send a bounce. Note thatbulkandlistvalues are excluded from this check, as similar to how we don't check forlist-idnorlist-unsubscribe(and neither do you currently incanSendBounce).
Making this changes will help to decrease the amount of misdirected bounces and backscatter spam in your projects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels