Hi!

I have looked at Mail::DeliveryStatus::BounceParser

and I needed to use it in combination with Mail::IMAPClient and
IMAP::BodyStructure.

The MD::BounceParser seemed to bee a bit disorganized and had seems to
have the assumption that you only would want to use it for finding out
email-addresses to remove from send-lists.

I was looking for something to get a lot of information from any email
message, for the purpose of updating a CRM database. For that, it would
be interesting to analyze vacation messages, attached v cards and more.

I also want to catch all automated emails and do the right thing with
them, in updating the CRM database, or mark an entry for followup.

Therefore, it should catch anything that doesn't have to be manually
handled by a human. The rest of the email should be sorted into the
right "Request Tracker" queue.

I'm using IMAP because I think that it's more fault tolerant. If a
process dies or misbehaves, you can still find the original messages on
the IMAP server, using a regular IMAP client.

And since the Emails are administrated, in relationship with customer
and project information, through a web interface, I think it's important
to NOT download all those big attachments that are sent around all the
time. All the email handling can be done without having to download,
read into memory, or parse the parts of the message not relevant for
sorting.

I looked around a bit, and found some commonly used terms in regard of
email bounce handling. I think it would be nice to introduce the
classification of a bounce message in the categories of

  hard
  soft
  transient

Depending of what you want to do, you will treat these cases differently.
A hard bounce is a response that the mailbox no longer exist. A soft
bounce is a mailbox over quota or some other thing that may not be a
permanent condition, but could be. A transient bounce is just a status
report and not a failure. But I still want to catch those transient
error messages. They should certainly not go into the request queue, but
they should still be parsed and used to update the status of the
original email and receiving user. This can be done then there is a
custom built web interface for the email handling.



Anyway...


I have set up Email::Classifier. I just took all the code of
MD::BounceParser and converted it.  It uses modules that loads on
demand. Most of the code ended up in the Email::Classifier::Bounce
module, that still needs a lot of cleaning up.

The Email::Classifier::Bounce module, in turn, loads it's own plugin
modules for handing different types of bounces. For now, I created
Email::Classifier::Bounce::AOL_Senderblock.

A lot of MD::Bounceparser code has been cleaned up, corrected and
simplified. But there are bits not yet converted.

Still, it passes all the original tests from MD::Bounceparser


And here is the package:

http://jonas.liljegren.org/perl/dist/Email-Classifier-0.01.tar.gz

--
/ Jonas  -  http://paranormal.se/Jonas_Liljegren.html

Reply via email to