[Rt-commit] r7995 - in rt/branches/3.4-RELEASE: .

jesse at bestpractical.com jesse at bestpractical.com
Thu Jun 7 19:11:30 EDT 2007


Author: jesse
Date: Thu Jun  7 19:11:30 2007
New Revision: 7995

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/lib/RT/Interface/Email.pm

Log:
 r53424 at pinglin:  jesse | 2007-03-14 13:25:10 -0400
  * Backported fix for mail looping issue from RT 3.6


Modified: rt/branches/3.4-RELEASE/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Interface/Email.pm	Thu Jun  7 19:11:30 2007
@@ -568,6 +568,15 @@
     #Pull apart the subject line
     my $Subject = $head->get('Subject') || '';
     chomp $Subject;
+    
+    # {{{ Lets check for mail loops of various sorts.
+    my ($message_is_not_machine_generated, $result);
+     ( $message_is_not_machine_generated, $ErrorsTo, $result ) = _HandleMachineGeneratedMail(
+        Message  => $Message,
+        ErrorsTo => $ErrorsTo,
+        Subject  => $Subject,
+        MessageId => $MessageId
+    );
 
     $args{'ticket'} ||= ParseTicketId($Subject);
 
@@ -679,16 +688,8 @@
         );
     }
 
-    # {{{ Lets check for mail loops of various sorts.
-    my ($continue, $result);
-     ( $continue, $ErrorsTo, $result ) = _HandleMachineGeneratedMail(
-        Message  => $Message,
-        ErrorsTo => $ErrorsTo,
-        Subject  => $Subject,
-        MessageId => $MessageId
-    );
 
-    unless ($continue) {
+    unless ($message_is_not_machine_generated) {
         return ( 0, $result, undef );
     }
     
@@ -856,6 +857,7 @@
     );
 
     # Also notify the requestor that his request has been dropped.
+    if ($args{'Requestor'} ne $RT::OwnerEmail) {
     MailError(
         To          => $args{'Requestor'},
         Subject     => "Could not load a valid user",
@@ -867,6 +869,7 @@
         MIMEObj  => $args{'Message'},
         LogLevel => 'error'
     );
+    }
 }
 
 =head2 _HandleMachineGeneratedMail


More information about the Rt-commit mailing list