[Rt-commit] r12800 - in rt/branches/3.8-TESTING: . lib/RT/Interface
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon Jun 2 13:15:15 EDT 2008
Author: alexmv
Date: Mon Jun 2 13:15:14 2008
New Revision: 12800
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Action/Autoreply.pm
rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm
Log:
r32365 at kohr-ah: chmrr | 2008-06-02 13:14:27 -0400
* RFC3834 compliance (Auto-Submitted header)
Modified: rt/branches/3.8-TESTING/lib/RT/Action/Autoreply.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Action/Autoreply.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Action/Autoreply.pm Mon Jun 2 13:15:14 2008
@@ -110,6 +110,23 @@
# }}}
+# {{{{ sub SetRTSpecialHeaders
+
+=head2 SetRTSpecialHeaders
+
+Set the C<Auto-Generated> header to C<auto-replied>, in accordance
+with RFC3834.
+
+=cut
+
+sub SetRTSpecialHeaders {
+ my $self = shift;
+ $self->SUPER::SetRTSpecialHeaders(@_);
+ $self->SetHeader( 'Auto-Submitted', 'auto-replied' );
+}
+
+# }}}
+
eval "require RT::Action::Autoreply_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Autoreply_Vendor.pm});
eval "require RT::Action::Autoreply_Local";
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Email.pm Mon Jun 2 13:15:14 2008
@@ -176,6 +176,13 @@
return (1);
}
+ # Per RFC3834, any Auto-Submitted header which is not "no" means
+ # it is auto-generated.
+ my $AutoSubmitted = $head->get("Auto-Submitted") || "";
+ if ( length $AutoSubmitted and $AutoSubmitted ne "no" ) {
+ return (1);
+ }
+
# First Class mailer uses this as a clue.
my $FCJunk = $head->get("X-FC-Machinegenerated") || "";
if ( $FCJunk =~ /^true/i ) {
More information about the Rt-commit
mailing list