Re: another small modification to the bounce handler

From: "Moshe Katz" <moshe@PROTECTED>
Subject: Re: another small modification to the bounce handler
Date: May 7th 2012

You should consider forking Justin's repository on GitHub (https://github.com/justingit/dada-mail), making your changes, and submitting a pull request.
AFAIK, that is the easiest way if you want to get these changes incorporated.

You could also open a bug there and attavh your changes to the bug for easier tracking.


Moshe Katz
-- moshe@PROTECTED
-- +1(301)867-3732

On Mon, May 7, 2012 at 8:11 PM, Frans Gouverne <fransgnl@PROTECTED> wrote:
One of the attachments of a bounced message contains:

Reporting-MTA: dns; mailfe07.swip.net

Original-Recipient: rfc822;<email@PROTECTED>
Final-Recipient: LOCAL;<cxu-63m-x6e@PROTECTED>
Action: failed
Status: 4.0.0
Diagnostic-Code: smtp;account is full (quota exceeded)

The bounce handler takes cxu-63m-x6e@PROTECTED (the Final-Recipient) as the email address which is not correct here: it should be email@PROTECTED (Original-Recipient). It looks like, when LOCAL is involved, the Original-Recipient is more reliable. So I changed from sub generic_delivery_status_parse the following lines:

   my ( $rfc, $remail ) = split( ';', $diag->{'Final-Recipient'} );
   if ( $remail eq '<>' ) { #example: Final-Recipient: LOCAL;<>
       ( $rfc, $remail ) = split( ';', $diag->{'Original-Recipient'} );
   $email = $remail;


   my ($rfc, $remail) = split(';', $diag->{'Final-Recipient'});
   my ($rfc_org, $remail_org) = split(';', $diag->{'Original-Recipient'});
   if($remail eq '<>' || ($remail_org && $rfc =~ / LOCAL$/)){ #example: Final-Recipient: LOCAL;
     ($rfc, $remail) = ($rfc_org, $remail_org);
   $email = $remail;



List Information:


Developer Info:

Mailing List Powered by Dada Mail



List Information:


Developer Info:

Mailing List Powered by Dada Mail

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This mailing list is to discuss the nerdy programming development of Dada Mail -

If you are just looking for support Dada Mail, consult the message boards at:


To post to this list, send a message to:


All subscribers of this list may post to the list itself.

Some on topic... topics include:

  • Positive Crits on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own internal needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

At the moment, there aren't many people with CVS access for Dada Mail - if you would like CVS access, please first talk about the changes you propose and how it will affect the program. If the idea is sound and agreed upon, the change will be comitted. A good track record of this will allow you to have CVS access. Some reasons that patches will not be accepted is if the patch breaks compatibility with a previous version of the program, the patch is too centric to your own problem or the patch simply isn't very good.

Please, please please familiarize yourself with the documentation at:


Since no one wants to answer the same question twice.

Another sneaky reason for this mailing list is to test out the discussion list capabilities of Dada Mail, since Dada Mail is used for the mailing list itself.

NOTE - because of this, there may be times that this list will be somewhat broken. Although we're not planning on breaking the program by using it, we're giving you the heads up that this may well happen anyways.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.


Unsubscribe at Anytime | Privacy Policy

Dada Mail Project