-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions for canSendBounce
method
#432
Comments
Also, you may want to set zone-mta/plugins/core/email-bounce.js Lines 29 to 36 in 49cc03a
|
There's also a nice conditional check here https://github.com/stalwartlabs/mail-server/blob/4f02e4c96f9dc01f37f077bf2597e5a943bb1f02/resources/config/spamfilter/scripts/bounce.sieve#L2-L21 you might want to incorporate to cut down on misdirected bounces. |
I like the approach here of doing a bounce if and only if matches mailer-daemon/root/postmaster/etc and also subject line match Line 125 in 49cc03a
|
Hi there @andris9 and @louis-lau 👋
Just sharing some suggestions for the function here:
https://github.com/zone-eu/zone-mta/blob/49cc03a6dba473f4e6e585ca6f0b2b956a0fa77f/lib/bounces.js#L109C16-L109C29
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+donotreply
and-donotreply
(e.g. Google Groups). We also test againstroot
,cron
, etc.Auto-Submitted
is anything other than=no
, then don't bounce. Right now you only test forauto-replied
andauto-generated
.X-Auto-Response-Suppress
is (case insensitive)dr
,autoreply
,auto-reply
,auto_reply
, orall
then don't bounce. Right now you only check forall
.multipart/report
right now, but you might want to specifically check againstreport-type
ofdelivery-status
ordelivery-notification
for accuracy.X-MDDSN-Message
and From or MAIL FROM ismdaemon
then it probably shouldn't bounce (Microsoft DSN header)type
ofmessage
ortext
AND everysubtype
was eitherrfc822-headers
orrfc822
(e.g. https://github.com/stalwartlabs/mail-server/blob/4f02e4c96f9dc01f37f077bf2597e5a943bb1f02/resources/config/spamfilter/scripts/bounce.sieve)Precedence
header with a value that isautoreply
,auto-reply
,auto_reply
(case insensitive) then don't send a bounce. Note thatbulk
andlist
values are excluded from this check, as similar to how we don't check forlist-id
norlist-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.
The text was updated successfully, but these errors were encountered: