List:Eventum General Discussion« Previous MessageNext Message »
From:Bryan Alsdorf Date:August 7 2006 5:51pm
Subject:Re: Infinite loop when email bounces and auto-creation is on
View as plain text  
Hi Dan,

Dan Karran wrote:
> I came into work this morning to find that one of our mail servers had
> gone down over the weekend and wasn't accepting incoming mail. As a
> result, email was being bounced back to the Eventum sending address.
> Email that was being bounced back was then being created as a new
> issue each time in the system because issue auto-creation was turned
> on.
> 
> With something like 33000 messages in my inbox, and about half that
> number of issues created in Eventum, there was a lot of cleaning up to
> be done in the database.

Sorry for this, I have issue routing (issue-1234@stripped style) 
setup so I have no encountered this myself, but I can imagine it is 
rather painful.

> Is there anyway that the issue auto-creation system in Eventum can be
> improved to detect bounce messages and not add them as new issues? I
> guess it could, at its most basic, filter out those emails that look
> like a standard bounce message. With some more intelligence, perhaps
> it could check the message ID in the header?

Eventum already checked for bounces in other areas, so I have extended 
this code to issue auto creation. If it detects an email is a mail 
server bounce it will not create an issue, but it will appear on the 
email listing page. This will be in our next release, but for the time 
being here is the patch (Very simple one).

--- 1.83/include/class.support.php	2006-08-07 07:44:19 +02:00
+++ 1.84/include/class.support.php	2006-08-07 17:41:35 +02:00
@@ -815,7 +821,7 @@
              }
          }
          // check whether we need to create a new issue or not
-        if (($info['ema_issue_auto_creation'] == 'enabled') && 
($should_create_issue)) {
+        if (($info['ema_issue_auto_creation'] == 'enabled') && 
($should_create_issue) && (!Notification::isBounceMessage($sender_email))) {
              $options = 
Email_Account::getIssueAutoCreationOptions($info['ema_id']);
              Auth::createFakeCookie(APP_SYSTEM_USER_ID, 
$info['ema_prj_id']);
              $issue_id = Issue::createFromEmail($info['ema_prj_id'], 
APP_SYSTEM_USER_ID,

Best Regards,
-- 
Bryan Alsdorf, Manager of Support Systems
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification
Thread
Infinite loop when email bounces and auto-creation is onDan Karran7 Aug
  • RE: Infinite loop when email bounces and auto-creation is onElm Morrow7 Aug
  • Re: Infinite loop when email bounces and auto-creation is onBryan Alsdorf7 Aug
    • Re: Infinite loop when email bounces and auto-creation is onDan Karran7 Aug
    • Re: Infinite loop when email bounces and auto-creation is onHarri Porten7 Aug