Bounce Detection
FastLinkIt detects bounced emails through two mechanisms:
1. Send-Time Detection (Immediate)
When sending a mailing, SMTP errors are checked for bounce patterns:
- "mailbox not found", "user unknown", "does not exist"
- SMTP codes: 550 5.1.1, 550 5.1.2, 550 5.4.1
- DNS failures
Contacts are flagged as bounced immediately.
2. IMAP Bounce Checking (Background)
The BounceCheckService polls the bounce mailbox every 5 minutes for NDR (Non-Delivery Report) emails. It classifies messages using:
- RFC 3464 DSN — standard delivery status notifications
- Sender address — mailer-daemon@, postmaster@
- Subject patterns — "undelivered", "delivery failure", "returned mail"
When a bounce is detected:
- The Contact is flagged as
IsBounced = true - The MailingRecipient status is updated to "bounced"
- The mailing's
FailedCountis incremented andSentCountdecremented
Bounced contacts are automatically skipped in future mailings.