[Rt-commit] r7906 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .

ruz at bestpractical.com ruz at bestpractical.com
Tue May 22 02:46:49 EDT 2007


Author: ruz
Date: Tue May 22 02:46:48 2007
New Revision: 7906

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Email.pm

Log:
 r4764 at cubic-pc (orig r7250):  jesse | 2007-03-14 21:23:00 +0300
  r48450 at pinglin:  jesse | 2007-02-21 13:56:09 -0500
  * Move RT's detection of incoming mail that may be a loop or autogenerated to better catch such cases before certain "Permission denied" messages are generated.
 


Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Email.pm	Tue May 22 02:46:48 2007
@@ -657,6 +657,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 );
 
@@ -774,16 +783,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 );
     }
     
@@ -955,6 +956,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",
@@ -966,6 +968,7 @@
         MIMEObj  => $args{'Message'},
         LogLevel => 'error'
     );
+    }
 }
 
 =head2 _HandleMachineGeneratedMail


More information about the Rt-commit mailing list