rgl / mailbouncedetector Goto Github PK
View Code? Open in Web Editor NEWDetects whether a MailKit email Message is a bounce message
License: MIT License
Detects whether a MailKit email Message is a bounce message
License: MIT License
Hi,
I was interested in using this package, but it's NuGet package only provides binaries for net452 profile. Would you be willing to provide nuget packages supporting net45 or net451 profiles?
Regards
Pablo
Maybe I am doing something wrong, but a clear bounce message is not recognized as such.
I am reading messages from a dedicated mailbox:
foreach (var uid in uids) {
var message = await inbox.GetMessageAsync (uid);
and than processing the message:
var result = BounceDetector.Detect(message);
This returns as not a bounce message for
Could not deliver message to the following recipient(s):
Failed Recipient: [email protected]
Reason: Remote host said: 550 5.1.1 The email account that you tried to reach does not exist. Please try
5.1.1 double-checking the recipient's email address for typos or
5.1.1 unnecessary spaces. Learn more at
5.1.1 https://support.google.com/mail/?p=SuchUser 4-v6si5409935edh.451 - gsmtp
I have an issue with status codes 5.1.64 & 5.1.10, which seem to be Outlook.com / Exchange specific. I couldn't find them in the RFC. So, the question is, should (and could) they be added to the statusCodes? As example:
{ 110, "not found by SMTP address lookup" },
{ 764, "TenantAttribution; Relay Access Denied"}
I am happy to see something modern that is available for bounce processing. Most products haven't been touched for years. I didn't see anything in the readme file about PHP, so can you let me know?
Thank you.
I got extended delivery status code which crashes detector.
Action: failed
Status: 5.7.133
Diagnostic-Code: smtp;550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group
I propose this to fix an issue:
private static BounceStatus ParseBounceStatus(string statusCode, IDictionary<int, string> statusCodes)
{
var value = int.Parse(statusCode);
if (statusCodes.ContainsKey(value))
return new BounceStatus(value, statusCodes[value]);
else
return new BounceStatus(value, "");
}
I have this
System.InvalidCastException: Unable to cast object of type 'MimeKit.TextPart' to type 'MimeKit.MessagePart'.
at MailBounceDetector.BounceDetectResult..ctor(MimeMessage message, MimeEntity deliveryNotification, MessageDeliveryStatus deliveryStatus, MimeEntity undeliveredMessagePart)
at MailBounceDetector.StandardBounceDetector.Detect(MimeMessage message)
at MailBounceDetector.BounceDetector.Detect(MimeMessage message)
Could you please publish a working nuget for netcore 3?
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
};
Hi, I get the following runtime exception when using the 1.0.3 NuGet version with MailKit/MimeKit 1.16.1.
FileLoadException - Could not load file or assembly 'MimeKit, Version=1.2.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could you please give some hints about this dependency issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.