GithubHelp home page GithubHelp logo

markchipman / mailbouncedetector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rgl/mailbouncedetector

0.0 2.0 0.0 29 KB

Detects whether a MailKit email Message is a bounce message

License: MIT License

C# 100.00%

mailbouncedetector's Introduction

Build status

this library detects whether a message is a bounce message.

this detects standard and qmail bounce messages.

see the unit tests for an example on how that information is exposed by the library.

standard bounce messages

a bounce message is one that has (or is) a multipart/report; report-type=delivery-status MIME part. its comprised of two or three sub-parts:

  1. the human readable description of the bounce. normally this is a text/plain or text/html part.
  2. the machine readable description of the bounce. this is a message/delivery-status part.
  3. the original message that bounced. this part is optional, and might not have the complete message. its useful to known some of the original message headers such as the Message-Id. this is normally a message/rfc822 part.

the most important part is the message/delivery-status part; it looks something like:

 Content-Type: message/delivery-status

 Reporting-MTA: dns; PTPEDGE02.test.local

 Final-recipient: RFC822;
  [email protected]
 Action: failed
 Status: 5.1.1
 Remote-MTA: dns; mx.google.com
 X-Supplementary-Info: <mx.google.com #5.1.1 smtp;550-5.1.1 The email account
  that you tried to reach does not exist.Please try 550-5.1.1 double-checking
 the recipient's email address for typos or 550-5.1.1 unnecessary spaces.
  Learn more at 550 5.1.1  https://support.google.com/mail/answer/6596
  om11si19081667wic.29 - gsmtp>

References

qmail bounce messages

a bounce message is one that is a text/plain (which can also be inside a multipart/alternative) MIME part, e.g.:

Date: 17 Mar 1996 03:54:40 -0000
From: [email protected]
To: [email protected]
Subject: failure notice

Hi. This is the qmail-send program at silverton.berkeley.edu.
I'm afraid I wasn't able to deliver your message to the
following addresses. This is a permanent error; I've given up.
Sorry it didn't work out.

<[email protected]>:
Sorry, I couldn't find any host by that name.

--- Below this line is a copy of the message.

Return-Path: <[email protected]>
Received: (qmail 317 invoked by uid 7); 17 Mar 1996 03:54:38 -0000
Date: 17 Mar 1996 03:54:38 -0000
Message-ID: <[email protected]>
From: [email protected] (D. J. Bernstein)
To: [email protected]
Subject: are you there?

Just checking.

References

mailbouncedetector's People

Contributors

rgl avatar

Watchers

James Cloos avatar Mark Chipman and sidekick Mollie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.