bounce

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package bounce maps SMTP replies and enhanced status codes (RFC 3463) to ReputeCast's shared bounce taxonomy, so every adapter classifies the same diagnostic the same way: mailbox_unknown, mailbox_full, domain_invalid, policy_block, spam_block, reputation, temporary, other.

Index

Constants

View Source
const (
	MailboxUnknown = "mailbox_unknown"
	MailboxFull    = "mailbox_full"
	DomainInvalid  = "domain_invalid"
	PolicyBlock    = "policy_block"
	SpamBlock      = "spam_block"
	Reputation     = "reputation"
	Temporary      = "temporary"
	Other          = "other"
)

Classes of the shared taxonomy.

Variables

This section is empty.

Functions

func Classify

func Classify(status, diagnostic string) string

Classify returns the taxonomy class for a status code and diagnostic text.

func Enhanced

func Enhanced(s string) string

Enhanced returns the first enhanced status code ("5.1.1") in s, or "".

func Permanent

func Permanent(s string) bool

Permanent reports whether a status or reply is permanent (5xx / 5.x.x). Unknown codes are treated as temporary so nothing is suppressed by guess.

func Split

func Split(reply string) (code, rest string)

Split separates an SMTP reply such as "smtp; 550 5.1.1 <a@b>: User unknown" into its code ("550 5.1.1") and the rest ("<a@b>: User unknown"). Replies without a leading code return ("", reply).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL