[Rt-commit] rt branch, 4.2/put-an-X-on-it, created. rt-4.1.19-99-g4f34a6f

Kevin Falcone falcone at bestpractical.com
Wed Sep 4 17:21:48 EDT 2013


The branch, 4.2/put-an-X-on-it has been created
        at  4f34a6f37a4f101729702a4fc9ca497b48284769 (commit)

- Log -----------------------------------------------------------------
commit 4f34a6f37a4f101729702a4fc9ca497b48284769
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Sep 4 17:19:50 2013 -0400

    Prefix headers with X for RFC822 compliance
    
    As documented in issues #20691, Amazon's smarthost service (SES) is
    requiring X prefixes, and while we're technically correct according to
    RFC2822 and RFC6648, it's easier to be more liberal in what we generate
    and not cause problems for users of these services.
    
    This change does not address other problems noted in that ticket, such
    as SES claiming that a message/rfc822 cannot be inlined.

diff --git a/docs/UPGRADING-4.2 b/docs/UPGRADING-4.2
index 38539d4..3a8ec72 100644
--- a/docs/UPGRADING-4.2
+++ b/docs/UPGRADING-4.2
@@ -275,4 +275,15 @@ templates, e.g. "Forward" template could be updated to:
 
 { $ForwardTransaction->Content =~ /\S/ ? $ForwardTransaction->Content : "This is a forward of transaction #".$Transaction->id." of ticket #". $Ticket->id }
 
+=item *
+
+RT has generated RT-Ticket: RT-Originator: and Managed-By: headers in
+compliance with RFC2822/6648 but we've discovered that some smarthost
+providers are requiring strict adherence to RFC822 which mandates X-
+prefixes on these headers. We've made this change in 4.2 for users
+relying on those providers.
+
+Any external scripts which were parsing on these RT mail headers will
+need to be updated.
+
 =cut
diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index 8d56827..16ab27d 100644
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -608,9 +608,9 @@ sub SetRTSpecialHeaders {
     }
 
     $self->SetHeader( 'X-RT-Loop-Prevention', RT->Config->Get('rtname') );
-    $self->SetHeader( 'RT-Ticket',
+    $self->SetHeader( 'X-RT-Ticket',
         RT->Config->Get('rtname') . " #" . $self->TicketObj->id() );
-    $self->SetHeader( 'Managed-by',
+    $self->SetHeader( 'X-Managed-by',
         "RT $RT::VERSION (http://www.bestpractical.com/rt/)" );
 
 # XXX, TODO: use /ShowUser/ShowUserEntry(or something like that) when it would be
@@ -618,7 +618,7 @@ sub SetRTSpecialHeaders {
     if ( my $email = $self->TransactionObj->CreatorObj->EmailAddress
          and RT->Config->Get('UseOriginatorHeader')
     ) {
-        $self->SetHeader( 'RT-Originator', $email );
+        $self->SetHeader( 'X-RT-Originator', $email );
     }
 
 }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list