rgl / MailBounceDetector

Detects whether a MailKit email Message is a bounce message
MIT License
28 stars 13 forks source link

New status codes mostly for Outlook. #13

Open Sicos1977 opened 1 year ago

Sicos1977 commented 1 year ago
private static readonly IDictionary<int, string> CombinedStatusCodes = new Dictionary<int, string>
    {
        { 00, "Not Applicable" },
        { 10, "Other address status" },
        { 11, "Bad destination mailbox address" },
        { 12, "Bad destination system address" },
        { 13, "Bad destination mailbox address syntax" },
        { 14, "Destination mailbox address ambiguous" },
        { 15, "Destination mailbox address valid" },
        { 16, "Mailbox has moved" },
        { 17, "Bad sender\'s mailbox address syntax" },
        { 18, "Bad sender\'s system address" },

        { 20, "Other or undefined mailbox status" },
        { 21, "Mailbox disabled, not accepting messages" },
        { 22, "Mailbox full" },
        { 23, "Message length exceeds administrative limit." },
        { 24, "Mailing list expansion problem" },

        { 30, "Other or undefined mail system status" },
        { 31, "Mail system full" },
        { 32, "System not accepting network messages" },
        { 33, "System not capable of selected features" },
        { 34, "Message too big for system" },

        { 40, "Other or undefined network or routing status" },
        { 41, "No answer from host" },
        { 42, "Bad connection" },
        { 43, "Routing server failure" },
        { 44, "Unable to route" },
        { 45, "Network congestion" },
        { 46, "Routing loop detected" },
        { 47, "Delivery time/message expired" },

        { 50, "Other or undefined protocol status" },
        { 51, "Invalid command" },
        { 52, "Syntax error" },
        { 53, "Too many recipients" },
        { 54, "Invalid command arguments" },
        { 55, "Wrong protocol version" },

        { 60, "Other or undefined media error" },
        { 61, "Media not supported" },
        { 62, "Conversion required and prohibited" },
        { 63, "Conversion required but not supported" },
        { 64, "Conversion with loss performed" },
        { 65, "Conversion failed" },

        { 70, "Other or undefined security status" },
        { 71, "Delivery not authorized, message refused" },
        { 72, "Mailing list expansion prohibited" },
        { 73, "Security conversion required but not possible" },
        { 74, "Security features not supported" },
        { 75, "Cryptographic failure" },
        { 76, "Cryptographic algorithm not supported" },
        { 77, "Message integrity failure" },
        { 110, "Not found by SMTP address lookup" },
        { 190, "Your message can't be sent because you've reached your daily limit for message recipients" },
        { 414, "Routing loop detected" },
        { 611, "Invalid characters" },
        { 712, "Sender was not authenticated by organization"},
        { 713, "Sender was not authenticated for public folder"},
        { 723, "The message was rejected because of Sender Policy Framework violation"},
        { 725, "Access denied, the sending IPv6 address [2a01:111:f200:2004::240] must have a reverse DNS record"},
        { 726, "Access denied, a message sent over IPv6 [2a01:111:f200:2004::240] must pass either SPF or DKIM validation, this message is not signed"},
        { 757, "Client was not authenticated to send anonymous mail during MAIL FROM"},
        { 764, "TenantAttribution; Relay Access Denied"},
        { 2121, "Recipient's per hour message receive limit from specific sender exceeded" },
        { 2122, "Recipient's per hour message receive limit exceeded" },
        { 3190, "Journaling on-premises messages to Microsoft 365 or Office 365 not supported when Journaling Archive is disabled" },
        { 4300, "Message expired" },
        { 4316, "Connection refused" },
        { 7124, "Sender not in allowed-senders list" },
        { 7133, "Sender not authenticated for group" },
        { 7134, "Sender was not authenticated for mailbox" },
        { 7135, "Sender was not authenticated for public folder"},
        { 7136, "Sender was not authenticated"},
        { 7321, "Starttls-not-supported: Destination mail server must support TLS to receive mail" },
        { 7322, "Certificate-expired: Destination mail server's certificate is expired" },
        { 7323, "Tlsa-invalid: The domain failed DANE validation" },
        { 7324, "Dnssec-invalid: Destination domain returned invalid DNSSEC records" },
        { 7325, "Certificate-host-mismatch: Remote certificate MUST have a common name or subject alternative name matching the hostname (DANE)" },
        { 7500, "Access denied, please try again later" },  // 4.7.500-699
        { 7501, "Access denied, spam abuse detected" },
        { 7502, "Access denied, banned sender" },
        { 7503, "Access denied, banned sender" },
        { 7504, "Recipient address rejected: Access denied" },
        { 7505, "Access denied, banned recipient" },
        { 7506, "Access Denied, Bad HELO" },
        { 7507, "Access denied, rejected by recipient" },
        { 7508, "Access denied, [$SenderIPAddress] has exceeded permitted limits within $range range" },
        { 7509, "Access denied, sending domain [$SenderDomain] does not pass DMARC verification and has a DMARC policy of reject" },
        { 7510, "Access denied, does not accept email over IPv6" },
        { 7511, "Access denied, banned sender" },
        { 7512, "Access denied, message must be RFC 5322 section 3.6.2 compliant" },
        { 7513, "Service unavailable, Client host [$ConnectingIP] blocked by $recipientDomain using Customer Block list (AS16012607)" },
        { 7606, "Access denied, banned sending IP [IP1.IP2.IP3.IP4]" }, // 5.7.606-649
        { 7703, "Your message can't be delivered because one or more recipients are blocked by your organization's tenant recipient block policy" },
        { 7705, "Access denied, tenant has exceeded" },
        { 7708, "Access denied, traffic not accepted from this IP" },
        { 7750, "Service unavailable. Client blocked from sending from unregistered domains" },
        { 7850, "Access denied, please try again later" },  // 4.7.850-899
        { 0350, "Generic error, x-dg-ref header is too long, or Requested action not taken: policy violation detected (AS345)" },  // 4.7.850-899
    };
rklec commented 6 days ago

Is this some proprietary invention by Outlook (/Exchange; i guess?) or, if not, is it documented?

Aka what is the source for these?

rklec commented 6 days ago

See also https://github.com/rgl/MailBounceDetector/pull/8 BTW