Re: another small modification to the bounce handler

From: Moshe Katz <moshe@ymkatz.net>
Subject: Re: another small modification to the bounce handler
In-Reply-To: another small modification to the bounce handler
Date: May 7th 2012

Frans,

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

--
Moshe Katz
-- moshe@ymkatz.net
-- +1(301)867-3732



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

Reporting-MTA: dns; mailfe07.swip.net

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


The bounce handler takes cxu-63m-x6e@domain.nl (the Final-Recipient) as the email address which is not correct here: it should be email@domain.nl (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;

into:

   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;





Post:
mailto:dadadev@dadamailproject.com

Unsubscribe:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev/

List Information:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev

Archive:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev

Developer Info:
http://dev.dadamailproject.com

Mailing List Powered by Dada Mail




<< Previous: Re: bounce handler does not recognize Content-Type: text/rfc822-headers

| Archive Index |

Next: Re: another small modification to the bounce handler >>

(archive rss , atom rss/atom )

this list's archives:


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:

http://dadamailproject.com/support/boards

To post to this list, send a message to:

dadadev@dadamailproject.com

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:

http://dadamailproject.com/support/documentation/

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.

Subscribe to Dada Mail Developers

* Required