[Rt-commit] r8539 - in rt/branches/3.7-EXPERIMENTAL: . etc
html/Elements html/NoAuth html/Ticket lib/RT lib/t
lib/t/data/crypt-gnupg-realmail lib/t/data/mail t t/api t/mail t/web
jesse at bestpractical.com
jesse at bestpractical.com
Tue Aug 14 12:19:02 EDT 2007
Author: jesse
Date: Tue Aug 14 12:19:00 2007
New Revision: 8539
Added:
rt/branches/3.7-EXPERIMENTAL/lib/RT/TicketLocking.pm
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/pubring.gpg (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-pubkey
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-seckey
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-test-pubkey
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-test-seckey
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/secring.gpg (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/trustdb.gpg (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/1-signed-MIME-plain.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/10-encrypted-inline-plain.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/11-encrypted-inline-attachment.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/12-encrypted-inline-binary.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/13-signed-encrypted-MIME-plain.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/14-signed-encrypted-MIME-attachment.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/15-signed-encrypted-MIME-binary.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/16-signed-encrypted-inline-plain.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/17-signed-encrypted-inline-attachment.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/18-signed-encrypted-inline-binary.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/2-signed-MIME-plain-with-attachment.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/3-signed-MIME-plain-with-binary.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/4-signed-inline-plain.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/5-signed-inline-with-attachment.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/6-signed-inline-with-binary.txt
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/7-encrypted-MIME-plain.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/8-encrypted-MIME-with-attachment.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/9-encrypted-MIME-with-binary.txt (contents, props changed)
rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/text-attachment
rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-bad.t
rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-realmail.t
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowLock
rt/branches/3.7-EXPERIMENTAL/html/NoAuth/Logout.html
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html
rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/t/utils.pl
rt/branches/3.7-EXPERIMENTAL/t/00-mason-syntax.t
rt/branches/3.7-EXPERIMENTAL/t/api/date.t
rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t
rt/branches/3.7-EXPERIMENTAL/t/web/cf_select_one.t
rt/branches/3.7-EXPERIMENTAL/t/web/custom_frontpage.t
Log:
tunis -> 3.7 merge
Modified: rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in Tue Aug 14 12:19:00 2007
@@ -35,11 +35,11 @@
# token matching and that you should use only "non-capturing" parenthesis
# grouping. For example:
#
-# Set($EmailSubjectTagRegex, qr/(?:example.com|example.org)/i );
+# Set($EmailSubjectTagRegex, qr/(?:example.com|example.org)/i );
#
# and NOT
#
-# Set($EmailSubjectTagRegex, qr/(example.com|example.org)/i );
+# Set($EmailSubjectTagRegex, qr/(example.com|example.org)/i );
#
# This setting would make RT behave exactly as it does without the
# setting enabled.
@@ -693,6 +693,20 @@
# }}}
+
+# {{{ Ticket Locking
+#
+# RT can be configured to use advisory locks on tickets, so that a user
+# can be notified if another user is making changes to a particular ticket.
+#
+# Locks have a maximum duration, which can be defined here (in seconds).
+
+Set($LockExpiry, 300);
+
+#}}}
+
+
+
# {{{ Development Mode
#
# RT comes with a "Development mode" setting.
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowLock
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowLock (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowLock Tue Aug 14 12:19:00 2007
@@ -28,43 +28,53 @@
% if ($Duration ||($u->id && $u->id == $session{'CurrentUser'}->id)) {
<div class="locked-by-you">
% if(defined $Duration && !$Lock) {
- <&|/l, $TicketLabel, $ago &>You had [_1] locked for [_2]. It is now unlocked</&>.
+ <&|/l, $TicketLabel, $ago &>You had [_1] locked for [_2]. It is now unlocked</&>.
% #Do not display time if it is very little time, since such a short time probably
% #means the lock was just created.
-% } elsif($ago < 5) {
- <&|/l, $TicketLabel &>You have locked [_1]</&>.
-% if($Unlock && !$Id) {
- [<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
-% }
-% } else {
- <&|/l, $TicketLabel, $ago &>You have had [_1] locked for [_2]</&>.
-% if($Unlock) {
- [<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
-% }
+% } elsif($timePassed < 5) {
+ <&|/l, $TicketLabel &>You have locked [_1]</&>.
+% if($Unlock && !$Id) {
+ [<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
+% }
+% } else {
+ <&|/l, $TicketLabel, $ago &>You have had [_1] locked for [_2]</&>.
+% if($Unlock) {
+ [<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->id%>&Lock=remove"><&|/l&>Unlock</&></a>]
+% }
% }
</div>
% } else {
-% return unless $u->Name;
-% $TicketLabel = 'This ticket' if $TicketLabel eq 'this ticket';
+% return unless $u->Name;
+% $TicketLabel = 'This ticket' if $TicketLabel eq 'this ticket';
<div class="locked">
<&|/l, $TicketLabel, $u->Name, $ago &>[_1] has been locked by [_2] for [_3]</&>.
</div>
%}
<%INIT>
-$Ticket = LoadTicket($Id) if $Id;
-return unless defined $Ticket;
+if ( $Id ) {
+ $Ticket = LoadTicket($Id);
+}
-my $Lock = $Ticket->Locked;
-$Duration = time - $Lock->Content->{'Timestamp'}
- if $Lock && !defined $Duration;
-return unless defined $Duration;
+my $Lock = $Ticket->Locked() if $Ticket;
+
+return unless (defined $Ticket && defined $Lock) || defined $Duration;
+
+my $timePassed;
+my $date = RT::Date->new($session{'CurrentUser'});
+
+if(defined $Duration) {
+ $timePassed = $Duration;
+}
+elsif($Lock) {
+ $timePassed = time() - $Lock->Content->{'Timestamp'};
+}
+
+my $ago = $date->DurationAsString($timePassed);
my $u = RT::User->new($session{'CurrentUser'});
$u->Load($Lock->Content->{'User'}) if $Lock;
-my $date = RT::Date->new($session{'CurrentUser'});
-my $ago = $date->DurationAsString($Duration);
</%INIT>
<%ARGS>
$Ticket => undef
Modified: rt/branches/3.7-EXPERIMENTAL/html/NoAuth/Logout.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/NoAuth/Logout.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/NoAuth/Logout.html Tue Aug 14 12:19:00 2007
@@ -45,7 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% RT::Ticket::RemoveUserLocks($session{'CurrentUser'});
+% $session{'CurrentUser'}->RemoveLocks;
+
<html>
<head>
<title>RT: Logout</title>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Display.html Tue Aug 14 12:19:00 2007
@@ -128,8 +128,8 @@
if ( defined $ARGS{'Action'} ) {
if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
my $action = $1;
- my ($res, $msg) = $TicketObj->$action();
- push(@Actions, $msg);
+ my ($res, $msg) = $TicketObj->$action();
+ push(@Actions, $msg);
}
}
@@ -141,39 +141,30 @@
push @Actions, loc('Your attempt to lock this ticket failed');
}
} elsif ( $ARGS{'Lock'} eq 'remove' ) {
- my $lock = $TicketObj->Locked();
- unless($lock) {
- push @Actions, loc('This ticket was not locked');
- } elsif ( $lock->Content->{'User'} == $session{'CurrentUser'}->id ) {
- $Duration = time() - $lock->Content->{'Timestamp'};
- $TicketObj->Unlock('Hard');
- push @Actions, loc('You have unlocked this ticket');
- } else {
- push @Actions,
- loc("You can't unlock tickets that you did not lock");
- }
-
- } elsif ( $ARGS{'Lock'} eq 'break' ) {
- $TicketObj->BreakLock();
- push @Actions, loc('You have broken the lock on this ticket');
- }
+ my $msg;
+ ($Duration, $msg) = $TicketObj->Unlock('Hard');
+ push @Actions, loc($msg);
+ } elsif ( $ARGS{'Lock'} eq 'break' ) {
+ $TicketObj->BreakLock();
+ push @Actions, loc('You have broken the lock on this ticket');
+ }
}
$ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
if ( $ARGS{'UpdateTimeWorked'} || (
defined $ARGS{'UpdateContent'}
&& $ARGS{'UpdateContent'} ne ''
- && $ARGS{'UpdateContent'} ne "-- \n"
- . $session{'CurrentUser'}->UserObj->Signature ) )
+ && $ARGS{'UpdateContent'} ne "-- \n"
+ . $session{'CurrentUser'}->UserObj->Signature ) )
{
- $ARGS{UpdateAttachments} = $session{'Attachments'};
- push @Actions, ProcessUpdateMessage(
+ $ARGS{UpdateAttachments} = $session{'Attachments'};
+ push @Actions, ProcessUpdateMessage(
ARGSRef => \%ARGS,
- Actions => \@Actions,
- TicketObj => $TicketObj,
+ Actions => \@Actions,
+ TicketObj => $TicketObj,
);
- delete $session{'Attachments'};
- }
+ delete $session{'Attachments'};
+ }
push @Actions, ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessTicketBasics( ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessTicketLinks( ARGSRef => \%ARGS, TicketObj => $TicketObj );
@@ -194,7 +185,7 @@
$m->callback(
CallbackName => 'BeforeDisplay',
- TicketObj => \$TicketObj,
+ TicketObj => \$TicketObj,
Tickets => \$Tickets,
Actions => \@Actions,
ARGSRef => \%ARGS,
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm Tue Aug 14 12:19:00 2007
@@ -475,12 +475,18 @@
return 1;
}
+{ my $last_pack = '';
sub __GetNameByRef
{
my $self = shift;
my $ref = shift;
- my $pack = shift || 'main::';
- $pack .= '::' unless $pack =~ /::$/;
+ my $pack = shift;
+ if ( !$pack && $last_pack ) {
+ my $tmp = $self->__GetNameByRef( $ref, $last_pack );
+ return $tmp if $tmp;
+ }
+ $pack ||= 'main::';
+ $pack .= '::' unless substr($pack, -2) eq '::';
my %ref_sym = (
SCALAR => '$',
@@ -497,7 +503,7 @@
# if entry has trailing '::' then
# it is link to other name space
- if( $k =~ /::$/ ) {
+ if ( $k =~ /::$/ ) {
$name = $self->__GetNameByRef($ref, $k);
return $name if $name;
}
@@ -514,11 +520,12 @@
# if references are equal then we've found
if( $entry_ref == $ref ) {
+ $last_pack = $pack;
return ($ref_sym{ref($ref)} || '*') . $pack . $k;
}
}
return '';
-}
+} }
=head2 Metadata
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm Tue Aug 14 12:19:00 2007
@@ -705,14 +705,14 @@
if ( $args{'Sign'} && !$args{'Encrypt'} ) {
$entity->make_multipart;
$entity->attach(
- Type => 'application/octeat-stream',
+ Type => 'application/octet-stream',
Path => $tmp_fn,
Filename => "$filename.sig",
Disposition => 'attachment',
);
} else {
$entity->bodyhandle( new MIME::Body::File $tmp_fn );
- $entity->effective_type('application/octeat-stream');
+ $entity->effective_type('application/octet-stream');
$args{'Data'}->head->mime_attr( $_ => "$filename.pgp" )
foreach (qw(Content-Type.name Content-Disposition.filename));
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm Tue Aug 14 12:19:00 2007
@@ -245,4 +245,65 @@
return 1;
}
+sub run_mailgate {
+ my $self = shift;
+
+ require RT::Test::Web;
+ my %args = (
+ url => RT::Test::Web->rt_base_url,
+ message => '',
+ action => 'correspond',
+ queue => 'General',
+ @_
+ );
+ my $message = delete $args{'message'};
+
+ my $cmd = $RT::BinPath .'/rt-mailgate';
+ die "Couldn't find mailgate ($cmd) command" unless -f $cmd;
+
+ $cmd .= ' --debug';
+ while( my ($k,$v) = each %args ) {
+ next unless $v;
+ $cmd .= " --$k '$v'";
+ }
+ $cmd .= ' 2>&1';
+
+ DBIx::SearchBuilder::Record::Cachable->FlushCache;
+
+ require IPC::Open2;
+ my ($child_out, $child_in);
+ my $pid = IPC::Open2::open2($child_out, $child_in, $cmd);
+
+ if ( UNIVERSAL::isa($message, 'MIME::Entity') ) {
+ $message->print( $child_in );
+ } else {
+ print $child_in $message;
+ }
+ close $child_in;
+
+ my $result = do { local $/; <$child_out> };
+ close $child_out;
+ waitpid $pid, 0;
+ return ($?, $result);
+}
+
+sub send_via_mailgate {
+ my $self = shift;
+ my $message = shift;
+ my %args = (@_);
+
+ my ($status, $gate_result) = $self->run_mailgate( message => $message, %args );
+
+ my $id;
+ unless ( $status >> 8 ) {
+ ($id) = ($gate_result =~ /Ticket:\s*(\d+)/i);
+ unless ( $id ) {
+ diag "Couldn't find ticket id in text:\n$gate_result" if $ENV{'TEST_VERBOSE'};
+ }
+ } else {
+ diag "Mailgate output:\n$gate_result" if $ENV{'TEST_VERBOSE'};
+ }
+ return ($status, $id);
+}
+
1;
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket.pm Tue Aug 14 12:19:00 2007
@@ -140,7 +140,7 @@
Resolved => '',
Disabled => '0',
- @_);
+ @_);
$self->SUPER::Create(
EffectiveId => $args{'EffectiveId'},
Queue => $args{'Queue'},
@@ -221,89 +221,13 @@
=cut
sub QueueObj {
- my $self = shift;
- my $Queue = RT::Queue->new($self->CurrentUser);
- $Queue->Load($self->__Value('Queue'));
- return($Queue);
+ my $self = shift;
+ my $Queue = RT::Queue->new($self->CurrentUser);
+ $Queue->Load($self->__Value('Queue'));
+ return($Queue);
}
-my @Types = qw(Auto Take Hard);
-sub Locked {
- my $ticket =shift;
- return $ticket->FirstAttribute('RT_Lock');
-}
-
-sub Lock {
- my $ticket = shift;
- my $type = shift || 'Auto';
-
- if ( my $lock = $ticket->Locked() ) {
- return undef if $lock->Content->{'User'} != $ticket->CurrentUser->id;
- my $LockType = $lock->Content->{'Type'};
- my $priority;
- my $LockPriority;
- for(my $i = 0; $i < scalar @Types; $i++) {
- $priority = $i if (lc $Types[$i]) eq (lc $type);
- $LockPriority = $i if (lc $Types[$i]) eq (lc $LockType);
- }
- return undef if $priority <= $LockPriority;
- } else {
- $ticket->Unlock($type); #Remove any existing locks (because this one has greater priority)
- $ticket->SetAttribute(
- Name => 'RT_Lock',
- Content => {
- User => $ticket->CurrentUser->id,
- Timestamp => time(),
- Type => $type
- }
- );
- }
-}
-
-
-sub Unlock {
- my $ticket = shift;
- my $type = shift || 'Auto';
-
- my $lock = $ticket->RT::Ticket::Locked();
- return undef unless $lock;
- return undef unless $lock->Content->{User} == $ticket->CurrentUser->id;
-
- my $LockType = $lock->Content->{'Type'};
- my $priority;
- my $LockPriority;
- for(my $i = 0; $i < scalar @Types; $i++) {
- $priority = $i if (lc $Types[$i]) eq (lc $type);
- $LockPriority = $i if (lc $Types[$i]) eq (lc $LockType);
- }
- return undef if $priority < $LockPriority;
- $ticket->DeleteAttribute('RT_Lock');
- return $lock;
-}
-
-
-sub BreakLock {
- my $ticket = shift;
- my $lock = $ticket->RT::Ticket::Locked();
- return undef unless $lock;
- $ticket->DeleteAttribute('RT_Lock');
-}
-
-
-
-sub RemoveUserLocks {
- my $user = shift;
-
- return undef unless $user;
-
- my $attribs = RT::Attributes->new($user);
- $attribs->Limit(FIELD => 'Creator', OPERATOR=> '=', VALUE => $user->id(), ENTRYAGGREGATOR => 'AND');
- my @attributes = $attribs->Named('RT_Lock');
- foreach my $lock (@attributes) {
- $lock->Delete();
- }
-}
=head2 Type
@@ -670,55 +594,55 @@
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
EffectiveId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Queue =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
IssueStatement =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Resolution =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Owner =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Subject =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => '[no subject]'},
+ {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => '[no subject]'},
InitialPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
FinalPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Priority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
TimeEstimated =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
TimeWorked =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Status =>
- {read => 1, write => 1, sql_type => 12, length => 10, is_blob => 0, is_numeric => 0, type => 'varchar(10)', default => ''},
+ {read => 1, write => 1, sql_type => 12, length => 10, is_blob => 0, is_numeric => 0, type => 'varchar(10)', default => ''},
TimeLeft =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Told =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Starts =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Started =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Due =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Resolved =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
Disabled =>
- {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
+ {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
}
};
Added: rt/branches/3.7-EXPERIMENTAL/lib/RT/TicketLocking.pm
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/TicketLocking.pm Tue Aug 14 12:19:00 2007
@@ -0,0 +1,124 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/copyleft/gpl.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+package RT::Ticket;
+
+my @LockTypes = qw(Auto Take Hard);
+
+sub Locked {
+ my $ticket = shift;
+ my $lock = $ticket->FirstAttribute('RT_Lock');
+ if($lock) {
+ my $duration = time() - $lock->Content->{'Timestamp'};
+ my $expiry = RT->Config->Get('LockExpiry');
+ if($expiry) {
+ unless($duration < $expiry) {
+ $ticket->DeleteAttribute('RT_Lock');
+ undef $lock;
+ }
+ }
+ }
+ return $lock;
+}
+
+sub Lock {
+ my $ticket = shift;
+ my $type = shift || 'Auto';
+
+ if ( my $lock = $ticket->Locked() ) {
+ return undef if $lock->Content->{'User'} != $ticket->CurrentUser->id;
+ my $LockType = $lock->Content->{'Type'};
+ my $priority;
+ my $LockPriority;
+ for(my $i = 0; $i < scalar @LockTypes; $i++) {
+ $priority = $i if (lc $LockTypes[$i]) eq (lc $type);
+ $LockPriority = $i if (lc $LockTypes[$i]) eq (lc $LockType);
+ }
+ return undef if $priority <= $LockPriority;
+ }
+ $ticket->Unlock($type); #Remove any existing locks (because this one has greater priority)
+ $ticket->SetAttribute(
+ Name => 'RT_Lock',
+ Content => {
+ User => $ticket->CurrentUser->id,
+ Timestamp => time(),
+ Type => $type,
+ Ticket => $ticket->id
+ }
+ );
+}
+
+
+sub Unlock {
+ my $ticket = shift;
+ my $type = shift || 'Auto';
+
+ my $lock = $ticket->RT::Ticket::Locked();
+ return (undef, "This ticket was not locked.") unless $lock;
+ return (undef, "You cannot unlock a ticket locked by another user.") unless $lock->Content->{User} == $ticket->CurrentUser->id;
+
+ my $LockType = $lock->Content->{'Type'};
+ my $priority;
+ my $LockPriority;
+ for(my $i = 0; $i < scalar @LockTypes; $i++) {
+ $priority = $i if (lc $LockTypes[$i]) eq (lc $type);
+ $LockPriority = $i if (lc $LockTypes[$i]) eq (lc $LockType);
+ }
+ return (undef, "There is a lock with a higher priority on this ticket.") if $priority < $LockPriority;
+ my $duration = time() - $lock->Content->{'Timestamp'};
+ $ticket->DeleteAttribute('RT_Lock');
+ return ($duration, "You have unlocked this ticket.");
+}
+
+
+sub BreakLock {
+ my $ticket = shift;
+ return $ticket->DeleteAttribute('RT_Lock');
+}
+
+
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm Tue Aug 14 12:19:00 2007
@@ -81,6 +81,7 @@
use RT::URI::fsck_com_rt;
use RT::URI;
use MIME::Entity;
+use RT::TicketLocking;
# {{{ LINKTYPEMAP
@@ -91,11 +92,11 @@
MemberOf => { Type => 'MemberOf',
Mode => 'Target', },
Parents => { Type => 'MemberOf',
- Mode => 'Target', },
+ Mode => 'Target', },
Members => { Type => 'MemberOf',
Mode => 'Base', },
Children => { Type => 'MemberOf',
- Mode => 'Base', },
+ Mode => 'Base', },
HasMember => { Type => 'MemberOf',
Mode => 'Base', },
RefersTo => { Type => 'RefersTo',
@@ -904,18 +905,18 @@
EffectiveId => $EffectiveId,
Queue => $QueueObj->Id,
Owner => $Owner->Id,
- Subject => $args{'Subject'}, # loc
- InitialPriority => $args{'InitialPriority'}, # loc
- FinalPriority => $args{'FinalPriority'}, # loc
- Priority => $args{'InitialPriority'}, # loc
- Status => $args{'Status'}, # loc
- TimeWorked => $args{'TimeWorked'}, # loc
- Type => $args{'Type'}, # loc
- Created => $args{'Created'}, # loc
- Told => $args{'Told'}, # loc
- LastUpdated => $args{'Updated'}, # loc
- Resolved => $args{'Resolved'}, # loc
- Due => $args{'Due'}, # loc
+ Subject => $args{'Subject'}, # loc
+ InitialPriority => $args{'InitialPriority'}, # loc
+ FinalPriority => $args{'FinalPriority'}, # loc
+ Priority => $args{'InitialPriority'}, # loc
+ Status => $args{'Status'}, # loc
+ TimeWorked => $args{'TimeWorked'}, # loc
+ Type => $args{'Type'}, # loc
+ Created => $args{'Created'}, # loc
+ Told => $args{'Told'}, # loc
+ LastUpdated => $args{'Updated'}, # loc
+ Resolved => $args{'Resolved'}, # loc
+ Due => $args{'Due'}, # loc
);
# If the ticket didn't have an id
@@ -1588,8 +1589,8 @@
# no ACL check since this is used in acl decisions
# unless ($self->CurrentUserHasRight('ShowTicket')) {
- # return(undef);
- # }
+ # return(undef);
+ # }
#Tickets won't yet have owners when they're being created.
unless ( $self->OwnerObj->id ) {
@@ -2366,7 +2367,7 @@
$uri_obj->FromURI( $args{'URI'} );
unless ( $uri_obj->Resolver && $uri_obj->Scheme ) {
- my $msg = $self->loc( "Couldn't resolve '[_1]' into a URI.", $args{'URI'} );
+ my $msg = $self->loc( "Couldn't resolve '[_1]' into a URI.", $args{'URI'} );
$RT::Logger->warning( "$msg\n" );
return( 0, $msg );
}
@@ -2902,10 +2903,10 @@
my %args;
if (@_ == 1) {
- $args{Status} = shift;
+ $args{Status} = shift;
}
else {
- %args = (@_);
+ %args = (@_);
}
#Check ACL
@@ -3034,7 +3035,7 @@
# }}}
-
+
# {{{ Actions + Routines dealing with transactions
# {{{ sub SetTold and _SetTold
@@ -3146,10 +3147,10 @@
require RT::Scrips;
RT::Scrips->new($RT::SystemUser)->Apply(
- Stage => 'TransactionBatch',
- TicketObj => $self,
- TransactionObj => $batch->[0],
- Type => join(',', (map { $_->Type } @{$batch}) )
+ Stage => 'TransactionBatch',
+ TicketObj => $self,
+ TransactionObj => $batch->[0],
+ Type => join(',', (map { $_->Type } @{$batch}) )
);
}
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm Tue Aug 14 12:19:00 2007
@@ -264,7 +264,7 @@
if ( $record_transaction ) {
- $self->_NewTransaction( Type => "Create" );
+ $self->_NewTransaction( Type => "Create" );
}
$RT::Handle->Commit;
@@ -519,14 +519,14 @@
if ( UNIVERSAL::isa( $email => 'Mail::Address' ) ) {
($email, $name) = ($email->address, $email->phrase);
} else {
- ($email, $name) = RT::Interface::Email::ParseAddressFromHeader( $email );
+ ($email, $name) = RT::Interface::Email::ParseAddressFromHeader( $email );
}
$self->LoadByEmail( $email );
- $self->Load( $email ) unless $self->Id;
+ $self->Load( $email ) unless $self->Id;
$message = $self->loc('User loaded');
- unless( $self->Id ) {
+ unless( $self->Id ) {
my $val;
($val, $message) = $self->Create(
Name => $email,
@@ -710,12 +710,12 @@
}
my $ret = RT::Interface::Email::SendEmailUsingTemplate(
- To => $self->EmailAddress,
- Template => 'PasswordChange',
- Arguments => {
- NewPassword => $pass,
- },
- );
+ To => $self->EmailAddress,
+ Template => 'PasswordChange',
+ Arguments => {
+ NewPassword => $pass,
+ },
+ );
if ($ret) {
return ( 1, $self->loc('New password notification sent') );
@@ -1198,7 +1198,7 @@
my $groups = RT::Groups->new($self->CurrentUser);
$groups->LimitToUserDefinedGroups;
$groups->WithMember(PrincipalId => $self->Id,
- Recursively => 1);
+ Recursively => 1);
return $groups;
}
@@ -1452,45 +1452,45 @@
sub _CleanupInvalidDelegations {
my $self = shift;
my %args = ( InsideTransaction => undef,
- @_ );
+ @_ );
unless ( $self->Id ) {
- $RT::Logger->warning("User not loaded.");
- return (undef);
+ $RT::Logger->warning("User not loaded.");
+ return (undef);
}
my $in_trans = $args{InsideTransaction};
return(1) if ($self->HasRight(Right => 'DelegateRights',
- Object => $RT::System));
+ Object => $RT::System));
# Look up all delegation rights currently posessed by this user.
my $deleg_acl = RT::ACL->new($RT::SystemUser);
$deleg_acl->LimitToPrincipal(Type => 'User',
- Id => $self->PrincipalId,
- IncludeGroupMembership => 1);
+ Id => $self->PrincipalId,
+ IncludeGroupMembership => 1);
$deleg_acl->Limit( FIELD => 'RightName',
- OPERATOR => '=',
- VALUE => 'DelegateRights' );
+ OPERATOR => '=',
+ VALUE => 'DelegateRights' );
my @allowed_deleg_objects = map {$_->Object()}
- @{$deleg_acl->ItemsArrayRef()};
+ @{$deleg_acl->ItemsArrayRef()};
# Look up all rights delegated by this principal which are
# inconsistent with the allowed delegation objects.
my $acl_to_del = RT::ACL->new($RT::SystemUser);
$acl_to_del->DelegatedBy(Id => $self->Id);
foreach (@allowed_deleg_objects) {
- $acl_to_del->LimitNotObject($_);
+ $acl_to_del->LimitNotObject($_);
}
# Delete all disallowed delegations
while ( my $ace = $acl_to_del->Next() ) {
- my $ret = $ace->_Delete(InsideTransaction => 1);
- unless ($ret) {
- $RT::Handle->Rollback() unless $in_trans;
- $RT::Logger->warning("Couldn't delete delegated ACL entry ".$ace->Id);
- return (undef);
- }
+ my $ret = $ace->_Delete(InsideTransaction => 1);
+ unless ($ret) {
+ $RT::Handle->Rollback() unless $in_trans;
+ $RT::Logger->warning("Couldn't delete delegated ACL entry ".$ace->Id);
+ return (undef);
+ }
}
$RT::Handle->Commit() unless $in_trans;
@@ -1507,8 +1507,8 @@
my %args = (
Field => undef,
Value => undef,
- TransactionType => 'Set',
- RecordTransaction => 1,
+ TransactionType => 'Set',
+ RecordTransaction => 1,
@_
);
@@ -1525,7 +1525,7 @@
my $Old = $self->SUPER::_Value("$args{'Field'}");
my ($ret, $msg) = $self->SUPER::_Set( Field => $args{'Field'},
- Value => $args{'Value'} );
+ Value => $args{'Value'} );
#If we can't actually set the field to the value, don't record
# a transaction. instead, get out of here.
@@ -1613,13 +1613,48 @@
sub BasicColumns {
(
- [ Name => 'User Id' ],
- [ EmailAddress => 'Email' ],
- [ RealName => 'Name' ],
- [ Organization => 'Organization' ],
+ [ Name => 'User Id' ],
+ [ EmailAddress => 'Email' ],
+ [ RealName => 'Name' ],
+ [ Organization => 'Organization' ],
);
}
+
+
+sub GetLocks {
+ my $self = shift;
+
+ my $attribs = RT::Attributes->new($self);
+ $attribs->Limit(FIELD => 'Creator', OPERATOR=> '=', VALUE => $self->id(), ENTRYAGGREGATOR => 'AND');
+
+ my $expiry = RT->Config->Get('LockExpiry');
+ return $attribs->Named('RT_Lock') unless $expiry;
+ my @locks;
+
+ foreach my $lock ($attribs->Named('RT_Lock')) {
+ my $duration = time() - $lock->Content->{'Timestamp'};
+ if($duration < $expiry) {
+ push @locks, $lock;
+ }
+ else {
+ $lock->Delete();
+ }
+ }
+ return @locks;
+}
+
+sub RemoveLocks {
+ my $self = shift;
+
+ my $attribs = RT::Attributes->new($self);
+ $attribs->Limit(FIELD => 'Creator', OPERATOR=> '=', VALUE => $self->id(), ENTRYAGGREGATOR => 'AND');
+ my @attributes = $attribs->Named('RT_Lock');
+ foreach my $lock (@attributes) {
+ $lock->Delete();
+ }
+}
+
1;
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/pubring.gpg
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-pubkey
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-pubkey Tue Aug 14 12:19:00 2007
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+mQGiBEa8u6QRBADCqPh8w3cO51hPVb1Sttqq5UhCeB5t2dAL8aVEDkpPfV7LItDi
+pN4VqHo2zbGE8q2bCoqW06Ogn0R4xsxEeD9Jq9/k3dHReFL2gbA5F/el1PKXVxG8
+62BnjLkDub8yCdWsg0QDJ6ah7LC7vukTMlJj+3HhoXWEqBrTBKjtFkNIrwCg/LtU
+CEyj+z/cl6NQGZUw2A6+5DUD/2DfcLeSir7xrlcidqO4BxtxdWkEBDAnmARKrqaw
+zSATIK11+HO3Gteovf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QXmFcDTX4kzTgpJ3cOBrM9GAO/hcwH
+82eC0j8fYw8mLYR8yQG0jsXJKCvHxTgkOh0nSkLaeLoq1maLp+NbJKCqgpsmeV4n
+QmEJE4Ye7I/L077BtJLv1tk0G0Jh3F2WeSzEvB7cS4hJBBgRAgAJBQJGvLuvAhsM
+AAoJEM4wxB7CJ0om/FcAn2tCGofP7IPmw6VxGBZNPHal4sIBAJ9UCgpOaGtX2fRl
++vvcvfcuIys27g==
+=mo7N
+-----END PGP PUBLIC KEY BLOCK-----
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-seckey
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-recipient-seckey Tue Aug 14 12:19:00 2007
@@ -0,0 +1,33 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+lQHhBEa8u6QRBADCqPh8w3cO51hPVb1Sttqq5UhCeB5t2dAL8aVEDkpPfV7LItDi
+pN4VqHo2zbGE8q2bCoqW06Ogn0R4xsxEeD9Jq9/k3dHReFL2gbA5F/el1PKXVxG8
+62BnjLkDub8yCdWsg0QDJ6ah7LC7vukTMlJj+3HhoXWEqBrTBKjtFkNIrwCg/LtU
+CEyj+z/cl6NQGZUw2A6+5DUD/2DfcLeSir7xrlcidqO4BxtxdWkEBDAnmARKrqaw
+zSATIK11+HO3Gteovfa08J1XXU2+IFqi2Ssyaqss1kteJE8DmOAcllSXqmCfOmPm
+xoW4gXOQfEv6tkTvF9JST1OZRj5w+ecyxn0282XrzKcxNeLjc+JcLfzPmmuhw4lA
+s/nJA/4tBqT0V7QiwaznBo8Bh7N3sz75x0vgSdZLUA0e2VzHKh9mAfK/FeVS1mcJ
+04iHWvxOGMqEfXnpxUrogME7f/TWNBVfT4M2JW0sHLvaiJhTtIhn+Q67awQ1f0qG
+mGQLIo9OAWZnIfBZ8e2tBwJ3ajiS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PAx8Jl8UdqE0hXuSI
+goDtq3s6ID+S4yW0a3ruFS7dsCPEmZllugKxqG3PXuZH4EvHiEkEGBECAAkFAka8
+u68CGwwACgkQzjDEHsInSib8VwCeLdgy5axSbYZ8Ez42Kcj8Ku2Q4ZUAnjJ92jFc
+fC7XWcM/6AX5IyU0jtEW
+=amxm
+-----END PGP PRIVATE KEY BLOCK-----
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-test-pubkey
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-test-pubkey Tue Aug 14 12:19:00 2007
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+mQGiBEa4o04RBADc+2sFcnuTTaqcKRTmSBQKdXvumT4GoATk194UYMghwprrNb1/
+flXQRk9zLkc0YENFHLMoRUmXKEF+WFxzXrZgHJS096tGn+Ud2FXQbSL47Vl3EHng
+c+jSvvVaZRcEySaCyQrsDR7gWlQtCbxbe96Y2x9jX3Zbih9UYnRvWBeczwCg4tgz
+EOmScnWiwUdyZNQsvXDqvKUD/REf0WjWDaykQvXYZ0aTpc/WMBsDS16nl8GNz5eD
+lCB/JJHKh5QDu89p0557AbVDSi5LCOYAM+v4oi8k5zgiO/7HJptirDkZ27Ichyes
+kzhu3Xr9rPLawie/o4FCfncNLbOAEE4EjEGDGRlyowAaXlW7DWT+TLbxY0qL0uHy
+AQPGA/9AmYHBJQqHTfQ4/QXdCnp+UwYs+rhPh7YHymBLn8Saa14heE9SZcYfSerL
+FAE7KKeBx96+RplgsiaqfWrliUwrV3KnnJICMyqWmn2OyMYiV9iFWqAHFTCsitS2
+q1COv5/Lg1a+XkAwEfoIuLrAXT8buIxXs/BhLc1PD1t9My8srbQdUlQgVGVzdCA8
+cnQtdGVzdEBleGFtcGxlLmNvbT6IYAQTEQIAIAUCRrijTgIbAwYLCQgHAwIEFQII
+AwQWAgMBAh4BAheAAAoJENMoA12EiB8bMZoAoIxLNWQ9d9+W4ImPMpUmjLl9ttxW
+AJ9ELlhkfdhPukRe508p5fZqKUfl/rkCDQRGuKNhEAgAjSKFedFcU9RjLmSEGo7E
+4qMQWOtiNooW4NtRsKC2cbJXnGJUOT+GBzGCxjBZt89T6MVsOy7DoAzs+xWKA5Cf
+gFEX5xZWM1c6EA4f7LhC1hawtGQkMQIyHzEy9b7NPEcMlkdOebjjhZ4Ob8svGily
+Q9jN6zpR2c36i0sLaZ5gORIHJ9DOX1k5lUzEhkogEYoYof48VQwHt/5xUURli2kL
+Daqi+X2+6j/vNp96EQ3sbFifmNejWNaDyyrlyGUvx9g/Eh5wMRospmFA/oE1kSws
+tKiBxAPs11OJGBRre2Q6QVW2ULAhxZOFgkCq0DNb8TMnhJOY4jhOP57rrvpMyu9q
+4wADBQgAhRl4aiej9lX+YpZUcyhBkqIB/cDwYemmtIWzo6mVWuDuVcyLl//sJsBi
+pwJF6O5nr0ZC5CT+GRgjBmh9rQjv/UtWBldJ7og/HfuSMG6xIfljO2FxKjabDhGa
+iKzgTk75LnPqfx0FeRNbN78dPy4hV/iIvHPANuyUlmbBsx9hSGqMc78FIDwwfZtB
+im5XUJbpHsahu4/8agQLBu+PFK+5CIVWskrYVL1R66nPHCzsfYcOv+1CYCsuFldG
+tFNPCegGxE7T7CFs7m7aYeSdgycNaR9wuBZeV17JnOJ2z/mtsR+8p4vZZzSMcTkj
+f1j7UCgiKS/ioTD03pU/OZEy9+l1SYhJBBgRAgAJBQJGuKNhAhsMAAoJENMoA12E
+iB8bOvUAoMk0zxF0u3F+YCS8E/iw148OlM3aAJsFIzQgdNfF+muuRJ2jwT0Z7D+D
+eQ==
+=/oO5
+-----END PGP PUBLIC KEY BLOCK-----
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/rt-test-seckey
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data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f7LhC1hawtGQkMQIyHzEy9b7NPEcM
+lkdOebjjhZ4Ob8svGilyQ9jN6zpR2c36i0sLaZ5gORIHJ9DOX1k5lUzEhkogEYoY
+of48VQwHt/5xUURli2kLDaqi+X2+6j/vNp96EQ3sbFifmNejWNaDyyrlyGUvx9g/
+Eh5wMRospmFA/oE1kSwstKiBxAPs11OJGBRre2Q6QVW2ULAhxZOFgkCq0DNb8TMn
+hJOY4jhOP57rrvpMyu9q4wADBQgAhRl4aiej9lX+YpZUcyhBkqIB/cDwYemmtIWz
+o6mVWuDuVcyLl//sJsBipwJF6O5nr0ZC5CT+GRgjBmh9rQjv/UtWBldJ7og/HfuS
+MG6xIfljO2FxKjabDhGaiKzgTk75LnPqfx0FeRNbN78dPy4hV/iIvHPANuyUlmbB
+sx9hSGqMc78FIDwwfZtBim5XUJbpHsahu4/8agQLBu+PFK+5CIVWskrYVL1R66nP
+HCzsfYcOv+1CYCsuFldGtFNPCegGxE7T7CFs7m7aYeSdgycNaR9wuBZeV17JnOJ2
+z/mtsR+8p4vZZzSMcTkjf1j7UCgiKS/ioTD03pU/OZEy9+l1Sf4DAwJIR2mPIH/N
+xWCn2mmj5zcBKW1T3vExBs/kd1VbXAE+UBJuMH9OehGPda8A/+BhUYi3Ws8E0Hsk
+XawE04ojXMbCXrUr/VwMef67s7wpmLl5wBNCiEkEGBECAAkFAka4o2ECGwwACgkQ
+0ygDXYSIHxs69QCgxvFIuPg6xpgRDUXE5+xc9GZI9VYAn3U+8U7AuSGybzySM8Ah
+zyjKaN3s
+=CIhz
+-----END PGP PRIVATE KEY BLOCK-----
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/secring.gpg
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/crypt-gnupg-realmail/trustdb.gpg
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/1-signed-MIME-plain.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/1-signed-MIME-plain.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,34 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 6283437F58; Mon, 13 Aug 2007 13:27:39 -0400 (EDT)
+Date: Mon, 13 Aug 2007 13:27:39 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:1
+Message-ID: <20070813172739.GA6392 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg=pgp-sha1;
+ protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--Nq2Wo0NMKNjxTN9z
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+
+This is a test email with MIME signature.
+
+--Nq2Wo0NMKNjxTN9z
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: Digital signature
+Content-Disposition: inline
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGwJSL0ygDXYSIHxsRAvSfAKCytRVnWCntQYKSNKvSaKWfjk37mACgnmg8
+9HqloCVBFmpgxE9WbMINac0=
+=MdIm
+-----END PGP SIGNATURE-----
+
+--Nq2Wo0NMKNjxTN9z--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/10-encrypted-inline-plain.txt
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/11-encrypted-inline-attachment.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/11-encrypted-inline-attachment.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,80 @@
+Message-ID: <46BCDCA0.4000205 at mit.edu>
+Date: Fri, 10 Aug 2007 17:46:08 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:11
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/mixed;
+ boundary="------------010900070701080408060501"
+
+This is a multi-part message in MIME format.
+--------------010900070701080408060501
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+-----BEGIN PGP MESSAGE-----
+Charset: ISO-8859-1
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAf/dbKZrl//1Q5r/FjPmqjp2+NDajR7Fj2afjKtkR8ySKni
+gc8kTvx2ceQ8bdOMfdn2AngPlKKyADp8xLDge3hwZg/mBRpOtk5B6eqGZDSwDxgQ
+Q2+mUVilhDBqLB5uv4rXoclT/JqR/WBWW1SjZgVVaf/lB9mI5amcmOPuY5vBq/iY
+q+qBAlWc27AfafGPSz0nifohc2qmq/pj2G6YDkKBE01EZRwbwvm35bTjI6rFL6dp
+Zzx2kGhAu928orL5Ft/KtyOEqdGwGlrGApLVV2X6+G1X6ASdgR24OAqnPxYMnhoT
+I3uYidSE6DSmUAm4R0rGRc1yMG5rBgRDDOYumRJFHAgA9WsNlQTkSuzypFzW7xT1
+zAzurHA1OYttjjWSAFb/eOnLxc27r1mBS0JVoEz/9+HtHOgGcsRe/sym6uwOOMT1
+znpgRGtQ+vL0bwBK3HyLqQzY9o5BGphf3ipCpI6HWwBDdGUJT+K7S8J9Og4AmV9V
+iq6V1PCdGwWS/XD4tulHIPUiA7Z6osVqtbHVTuQNWwsFU06SEHOmhNEGDSmO7Q7i
+bUS1YvC1STmJttzSsh+A/dh7uN/mfrPG1BJEAi4iZRGM6GFoKS5CQnpyQ4Az222n
+w1iB3u170ijcgLvDNR1Nz5DVnXdJcbVg46GvAGjctI7qWmFIKuazCA/AA0hwRjfz
+j4UCDgOxaIPydPr+7xAH/AzvNqeXEU9n7Y7K6rALWKwETU98ltzyp0FdO0YCbN/Z
+HWAyazGpPL6VqECWdc9xAYa1zYRf9HEW25yi5BMqbPav7oxfkEMbfLEl2OJr+EfO
+/GeTijv8riPFazcXdj7CKuumsld/GQgVLjwmRdoVtGN8WMRZfM/CII6uhg2wVbxq
+iThRc03DSNwLr0N0aNr66rySOnvTZNEARljPA1VaRgy1YkHXAyj6Z+s5OBZgj3yh
+3f6KZXaRBq9r+7iXJFuOpQ35k/pykHL6wwaTYMmEvlPZ9EO1zgvBxS6NWm4Ct4+X
+l9anXjRRPS9aSEUZQRjP6VfQPrrlhBNIgAEoKHlIJe4H/RVbTUAqRlTf3k4XBwkR
+HoTk/b/vM5grRQTR12DLXKB+NeNEpQPQFbdFOhfX22ZJbVzl3CVxaOEYHB29KT4D
+2frp99spiO8gksYdC5kviXeXXlXINtqsAWCEQr96wOlE03NuKh9TLF3ykAKageqr
+yDVdFjmeuMwL5XWVdWFUCDKROQz0gbX3WglCVhccrB4aMPx1vP4HiQIn7R2Q9/GJ
+I0lrn/se5GuT078BnhpApZkA0zU+Fi32NWTY7TLXYKxK1BpHWREEFIwrPe1D3Sot
+tLh+E65rDp2dt9LrZgGerSQqP1V8z50reNcGdRuWXfJSBwWJfVVo6ApEqD17bPo1
+Y8HSfAGGTN7euRDBuov2eMPKlLTYqQAqOE7DJK1IWQtw9aIMxLuTBCORy+DHh8v3
+elFBb1PxNZ64BJrOK4+gUm09eizynTdtHYhvhe8Gplu6JO5U28djXVqlIiHtEhF1
+VltikOnWlztV/2M8XoUKZneB9MBqhJ3W0lqN5Xzw7Jk=
+=bB9/
+-----END PGP MESSAGE-----
+
+--------------010900070701080408060501
+Content-Type: application/octet-stream;
+ name="text-attachment.pgp"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="text-attachment.pgp"
+
+hQIOA076g5OuwfIOEAf+KE8JLsuGPug17A+1JJwCliRR8Iid4CxXyFplTXYgeFGKh2EN0UJw
+Rj0k10BKnefbhL2gRM90aQaAF4gBF9mCh4H4Rg1reZ5ohoinNPk1Qgkotx1JnyVxIEk7mzKE
+tD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pBVRwT5hzEbLVays0Bju6vKV8CyX9
+apFxFf/vWZ347x+/cK6jc/Bpc8u9PSdOBwGC1ReZixmvgL3fI9ozLOlkNXGvjKxx2Ui6v6LB
+e6SBQsD0cnhRGgfWXgJQsmmPDVPbcmM9+pU/p4JsqdA15lNUILXeeiieFNGHjUORgZtjhY45
+Z1Hw8EOfZWBquFbNt5tRaR6UmroviHO4kNx5N39DtfvSegEma6N5QIsTxrpw0IP2NMVXJ9qa
+4in+Orrc1EQfljFTLYSyK3zowghdHlZsMUo7d5+AMjDlsjKf9H0f1gMB8hWebQQNlyNOmKa/
+uHMcJVlbpGFCOspBgN4N2+s/Ldz+c9hy9W9x7J5U2bcdsdbEKlMF0EkgUE+f3Jhc
+--------------010900070701080408060501--
+
+
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/12-encrypted-inline-binary.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/12-encrypted-inline-binary.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,86 @@
+Message-ID: <46BCDCF2.3080704 at mit.edu>
+Date: Fri, 10 Aug 2007 17:47:30 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:12
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/mixed;
+ boundary="------------090206040704060905090502"
+
+This is a multi-part message in MIME format.
+--------------090206040704060905090502
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+-----BEGIN PGP MESSAGE-----
+Charset: ISO-8859-1
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAf/bD4qivq3N/0qZZnLucbOARr1mypqomT+gvm1It/DllR/
+F3RRLlm0wcBoVQp52aNecT9OJiZNh32oxPW78XBG2OCZv+jATd2vMf4ESOX1Pj4+
+1DATM9V3lOJ8XYJqAX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3+QVGr9sRIVIVD44Be9I8jlcpkn2r5Qs
+9djSXzEBpM+Aiqv5cCBFq2rgYyd9m2c2iHsI6EBaxCzYFz1qobsfvXk4a7ax0/Ck
+ug/jPEq8GK36UTp+51G8JhxzgJKSm4Fo7N3Os8emIlZ2QymPrzPkxEQj9eRsMmp3
+qIQ0rOPjTC8847s4lIlAx7di80OYQ1dV2J8NLL/qxF09rr6f978oH59IfSHRKJ2b
+aCnSfAGfFBr68Zm20se6/0mzrYY2MDljPrKSDQPmNW7nJ761/YjMgVAeZlnKW7JM
+hTdZciuHMTX7+3BDTGCMbAnmYYWurX0jKGJ4X0UJLV8m4nsXvqHvsG6FBzVC5z2w
+kytey5Bqi2gXRjk6xqckH4O79kEJw0kLkxJbT9IPBKw=
+=vGEb
+-----END PGP MESSAGE-----
+
+--------------090206040704060905090502
+Content-Type: application/octet-stream;
+ name="favicon.png.pgp"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="favicon.png.pgp"
+
+hQIOA076g5OuwfIOEAf+P0Qp/k1B0WDRr9bNcEANStTaiefYoLrUrtMJv+aFtkiSqKfft0A9
+okrYkVUKs6kxfgxueuqNMFQh58nl8+d7Z2qGIgVEXxC8rRxexEQ8mXu5LXzzBbc6Dq8Jsa7B
+bXzwGty51culYcKeMEjpEY8Qx76qoNQDNCuvth1JJxJ6xQix/pVyZZbJRu/nLrv1i3Z4KRFY
+qafnJlcsUTVj2o9dLfeU13z8nd0uBPY+hiCgYJHSPDLr+mkA+c6YK0m4a88r/wjLmsVHMkn2
+N5nCjuqP4tzT8SCjhoICGTbu+fFdks9NhQjvsW7MHBi9HFFzm6SoEvquFHThzwMl3hAhTLpi
+Jwf/a6unMP/swAxoFTJ2GRXBmQOH4sJHR/M31rEVkLZGJixhU94Tpx8ptgLXqme5VCXgl+M3
+Oh0GHRXqFYjR/HGUTZokRKR/BgCEpOGlH5FcabHiu/Gy8UBezPbuC+BNvxuCbuwODMp9R5DE
+F8RSCAQ1hrRoJ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ynF1BlbzXI7Z8rA/KrIn8aydzwJUU
+qFr8Dw1C7kbE76+SFVWX8fqpwGmQhDAO+kos6ivgN9HDHtuXmwfGeROi2U0WcmFGbAyLo5fT
+LCcNPOMflU27WDXm8m+tjq9naUynqvwg5zBBz/xY67L1R8uOwfZplvRi35iZAJjzMHGirkiB
+W3ZDXbDqEfKl4aCXqU+XhQZsku2z3OtKZOBVVI5p8nGVEfavg6QECRUNUS7qbtMxlj5IwCGl
+babK3W5YVuERjklrrLUYZjqFIZ2yLK3Z2VmSn7yKAb/eRvdEeha+9PKcN11pXPkS/M3t+Vpr
+G+4TqNgqwLVWMvbENp08dS3OAPpZLDnqG9CJV0qacDMjv69X26V3Xp6vuZoKqAPxMG9QKAfX
+E9LInR1Kd0cpRUkb
+--------------090206040704060905090502--
+
+
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/13-signed-encrypted-MIME-plain.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/13-signed-encrypted-MIME-plain.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,49 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 19FD037F61; Fri, 10 Aug 2007 16:03:35 -0400 (EDT)
+Date: Fri, 10 Aug 2007 16:03:35 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:13
+Message-ID: <20070810200335.GC5815 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="+nBD6E3TurpgldQp"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--+nBD6E3TurpgldQp
+Content-Type: application/pgp-encrypted
+Content-Disposition: attachment
+
+Version: 1
+
+--+nBD6E3TurpgldQp
+Content-Type: application/octet-stream
+Content-Disposition: inline; filename="msg.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5O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kq/vph61cPdus0dgV8U+QITQ4kt1ky8xNBc
+L51c
+=zSIe
+-----END PGP MESSAGE-----
+
+--+nBD6E3TurpgldQp--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/14-signed-encrypted-MIME-attachment.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/14-signed-encrypted-MIME-attachment.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,51 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 061F037F56; Fri, 10 Aug 2007 16:12:29 -0400 (EDT)
+Date: Fri, 10 Aug 2007 16:12:29 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:14
+Message-ID: <20070810201229.GD5815 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="N1GIdlSm9i+YlY4t"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--N1GIdlSm9i+YlY4t
+Content-Type: application/pgp-encrypted
+Content-Disposition: attachment
+
+Version: 1
+
+--N1GIdlSm9i+YlY4t
+Content-Type: application/octet-stream
+Content-Disposition: inline; filename="msg.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAf+MEje2ZVc5yRFxINYBmz8l5oRdrDkldSFISKNlcFogKeA
+ZAwvP0Y2Utxjs+aT25gqR72uftGzCLhKdIb8X/i8CswKHX/1NnLKFTFB+T3Mmwtg
+3a9jiB6kQ5haWvcd9y1DBcm1Wnw5B51QmiHZzHu209dphl7qnoak79M0NK4KPSqr
+NKqn7yTKFOjJ3qIlCLqawQbQy++IFmtJVKMQSNZawqSX/JSGMNPz9hioyOgyjxtE
+XZlrdgV1jumnZ3nVF1bQFMGUMGpi6NAA7+TiPjSZgFkKp2zvyOXwFKjKqkVgAgUh
++295JO9kjFmRYOxpWcSfBaibX4qFSsWvJbvltNceDAf/WCCcvP6+JYHmZL32YL6+
+oSM3SnHuG3PIqaT0/99pMVIhHzhrdrmWsyR6ijcK7PRpQg3mIZDd5pzAgcae3c4M
+mYsImADyUC6CX0PvSOYYvG7CskDUiGk76fjDKTkKPkgqEFJXz1v9TA+ptx9v2PTd
+CW8cES9Du5PdwPLbltfC54ax/tCKcyyHbtgozVQJB6RfkXKhUjYI632qnXa7BDqO
+c5Pcpn7gKKik4MkGEWnf50aqQ6ph4Q9MfOZ+5hc/EBUQd2Genqn8iCTPa2rkrI49
+6sKJ9FSdXL4Xdlat09MxnD5Dw6DKF6G6Ig2SAQA/WBG5+sZxWC5NMd5oeJWHVnCz
+VNLA5QEIo0BNtY+wm2W/YH3hSHV5K+Mz+MEKEUaimYSLWKl1p6vboBjHuk0XY1Tn
+FDGmLVcO/jLBkiPOhNyibRXaCW/x3iws+xCHngjX4rDeidEtphHCxihVtS1Sh1wT
+IHHE+Kl6jlateIeBpug79RsGKcdwYTUg2SuaZXEf5A2tQtUhU6TEWYqhFc0g2dCV
+u/lkhrVRt4S+En4DYJ7myQYdMBeHym52Mz9tFZKKQ54dMWDhDsRZIe0Zy8TKBwXd
+cwc5kMpkwFK3drbhFuf3WnQUUR80oyGKCffJw3n40ET91b+nAYJ8bPvYFE+gDB+S
+vHktXvM+vk4PTAKGN21TyZfB9n8VVtIHq3DUPpStrFFQQUDKjMeZf0TDtEWVd1zl
+7jVJ2d+Su/KcAXUITXAQMl4ECXMZ3VD3fnbyRAHI375+wcBh08rM1DQRdhWd40XZ
+55rzTy6T0RVa3JcQBCtM8FYubYQvy8iU5XcA2LEDWdDn8D89IJ+UAnFHIYoeipj8
+qbYjl9JetF1gcmm3QlUwtec6nb5VSmWdQrdfnvdxrW54J3gqlGnzCQg=
+=7/EE
+-----END PGP MESSAGE-----
+
+--N1GIdlSm9i+YlY4t--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/15-signed-encrypted-MIME-binary.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/15-signed-encrypted-MIME-binary.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,60 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 171AA37F6B; Fri, 10 Aug 2007 16:13:42 -0400 (EDT)
+Date: Fri, 10 Aug 2007 16:13:42 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:15
+Message-ID: <20070810201341.GE5815 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="QWpDgw58+k1mSFBj"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--QWpDgw58+k1mSFBj
+Content-Type: application/pgp-encrypted
+Content-Disposition: attachment
+
+Version: 1
+
+--QWpDgw58+k1mSFBj
+Content-Type: application/octet-stream
+Content-Disposition: inline; filename="msg.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAgAiH54xEwaxc/DL+nyd5f/77c6Vk27bdxRz1eXHVU0ofqs
+oeZHkEWpkub80YQL1HOQTabAF3ZUIGfyfGufnqXpWWNjhnxP/Bi/Itxk4p3oq6Pj
+RDoDsrO6SPcM1wlbz7M/8rTmpjTk0cYl3nA9Bc7ZDP7jRWRRKFp3Jl63fvK2BWG3
+x0yA1WwJX/gzgsRlFSBBFukaffCqaeQZJ2GSKGbuHTH8EYvGDjqALlEwE/iPYRYq
+OoSa27KIzDCwPFJf8/ZK+03qX2D2LrEViflbFlZMcMGrIFmU0BLrlBx8Obimu3lm
+8bCDX5zQsOIptLQqrhQ5E1HIeEFHqJAxJwHu5v7AFggAqSNH4adYAxz3vZyQ3HdV
+IiDYdwwGh4usb7R7afc8uiFGzxmcc9ktyQ8bBAEpGHMU+ahcUMcfg1svcSKKFQqS
+xNJb5rl3Q9D7qqsoFnNdVFGIxhnUpjt16T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8Yv2x0
+AVSQkrXcc4CQXAvLzqNMXa6NgKrVtVNXUgHyIxvOgGyVxULKDQo+3bByccCOjNOZ
+3gN/JnU2HvEk3iYDYPa+VOJzS1i6itZOCeCBF+NDaaTvG30owmINGCGl/nxv+yIO
+9nlCF3QYdaod2TVYfxdp2X7hlPEhv6nHYt2r3/pXYW4Hjy5M/mT7sR+OVAgknpiJ
+yOzeNy/dVoxpAAlOuzwl+sYI6TkDnF0vduJO0jxWP5+oa+Al9sWr4x4E59OkGAg/
+lQ==
+=NbQY
+-----END PGP MESSAGE-----
+
+--QWpDgw58+k1mSFBj--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/16-signed-encrypted-inline-plain.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/16-signed-encrypted-inline-plain.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,45 @@
+*** ENVELOPE RECORDS 98F6C37F69 ***
+message_size: 1571 219 1 0
+message_arrival_time: Fri Aug 10 16:17:42 2007
+create_time: Fri Aug 10 16:17:42 2007
+named_attribute: rewrite_context=local
+sender_fullname: Christian Ternus
+sender: ternus at mit.edu
+original_recipient: rt-recipient at example.com
+recipient: rt-recipient at example.com
+*** MESSAGE CONTENTS 98F6C37F69 ***
+Received: by anduril (Postfix, from userid 1000)
+ id 98F6C37F69; Fri, 10 Aug 2007 16:17:42 -0400 (EDT)
+Date: Fri, 10 Aug 2007 16:17:42 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:16
+Message-ID: <20070810201742.GF5815 at mit.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii; x-action=pgp-encrypted
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAgAsnA+yHerSZnvxR6TIiWSIRlohPBIQHUhoeHBH+9Q0DFJ
+r6in5UmN1luVGtT8kl1dbLAnoVu2Yyf/d57IWgam41MbWi1EmGLQaaLHcIbQ3JXR
+MmXXwG7PTHWdZJismmqCOuT3svTlkqerIBicsHXvfKE209y+jP3lruJ7cVpxZyCI
+M75H8d313r3MwBpoRuEiNMBOjG6MXOATFmgRw93J6pzjWirxwmawhaSNeghkO8tN
+3vdDkzZlLmM/Pq4jQrkWbIbGH/EwdchbWNnhd91o/Lll77fshkXNMYQlgyU154sk
+3wCY5IFGJTUdR1hrETz2nOASLDHIdamhhz1xMItClwgA2uXkVhG0Fslp/A7z4a09
+ivX/gM6a4KuFSNVJtHrlc6Z8/WKe1LNdLiulbFMtbppvMtIkzgZfv/DBavZJBqVI
+EOI+9VzLb6IdqybbNp54nRbniU6aiboEk90waSjqHggCnk5qnOUxrxp2ZCIn9pwP
+KUisxy6cAKGCEeFdvtXIBqfC6uITAu9kNq78rPN64TUaZbJs8VshIj1zpGi6DUYa
+uPvGPIhlLi5xN/oK3Yu2TDrIPxO4m1ZdHQJH8TBn6l6EifAVsDeskSQ4nCZJzc0H
+0D+ofkCzxqRkjDY0IOcl7hI79cRxO5tagtf6od0vcK883wUHxe6Kfv26tKm8IsX1
+ANLAFQFi867dLG+X9wc/QyBwNXZ1hPSE8MulfAYyzT/rXno4nkmQrw6zFLf9q4gA
+Z7aZsgxXPAvWwhwLGyinNgi0ua5LHZL17CWOfG8/GlIK59mesnk8tC9Gyj8aLU3/
+ROteGBBGfk0UJbfcQ+reAjmORofZdHSMCsGYZ5DJEy3KIUrNHzW4yYAlfzLWYfX8
+k9R41E0xGBuooe578MTBtVOPZKY4gurQZdfrHdYnsUXgfpV1w6WYvEM31n90Px6m
+aXWFWq9JVxX/JFOmWJV38fw+EhNgApncTw==
+=J8xa
+-----END PGP MESSAGE-----
+*** HEADER EXTRACTED 98F6C37F69 ***
+*** MESSAGE FILE END 98F6C37F69 ***
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/17-signed-encrypted-inline-attachment.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/17-signed-encrypted-inline-attachment.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,80 @@
+Message-ID: <46BCDC54.5020801 at mit.edu>
+Date: Fri, 10 Aug 2007 17:44:52 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:17
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/mixed;
+ boundary="------------080001030405080001010104"
+
+This is a multi-part message in MIME format.
+--------------080001030405080001010104
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+
+-----BEGIN PGP MESSAGE-----
+Charset: ISO-8859-1
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAf9Gkd+eM+8QDIQusErLU6cOXa7ta22z41E4BEc5BN0X19+
+MGxd40H9Nqp+f8HiQYNFAlaxfAAKRmuqJHJIEjRYqK7h4d/LL3ZhEpXq863CzOtD
+qVR3yNNNd4J52E3hAesPaeYgXZfGLrzsu7x6DGIAFZ0zvimkRHOKf3JOAVA3mHFR
+kWL6yE3T5sVVFy5Ibg3PGkqqLR/MlAFUG91EA5NgKUM7T59fd66X2f2e4FAu3eyQ
+ltdy3pKhQtdF3p4xBav+9IozwSs3Gxi9IXnYV6Ac3n3VHq521yf5qQg9zAsx9XvJ
+Vzci1Uo55LW/qPAY/eqIrlv2EdI1qOxG40dXL49MzQf/VfMDv8HDgz3Ty//3pH9o
+0DutPpiAObLG04b+jmjWwzN2ReFm8dqxQXnxlkO/g8wv0UfmELtIq5us2jrJsFxu
+3aaIzsl7dy9sy4vWVikHf2DTdxi4R2u6EUIdz8NQmC8RuIWpebWX3ISU9CtNXfTz
+O6gFhJZPKgLV37RXKWngYrL2nXs4mxfza4DSVfM0I4TN+2psxmpy5Gk1c6bJ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
+Content-Type: application/octet-stream;
+ name="text-attachment.pgp"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="text-attachment.pgp"
+
+hQIOA076g5OuwfIOEAgA8JomdV8x+R5rYEPkBGnLz1rQuZlf0yuaAB44Qjo72SJ2xRRk7VwN
+t19lLlc0Z9rDwwUhYGoZAORbCQ/07/PgueM0rMMc5LuHczzo3ecQdxWgsyOf7Jljrfr/f8lW
+kKyPCXYhwpetZCeVn72HXSM6WlkKQ5f1mMgANWVVCgtEFzUR7G/lC5jfxXeKHDDNMrWsLY8J
+LnrOCq92KhXwpuCDUfHZSv1pa/tl+sTw3eBzdCT9EfwgsFKQG7W3IhyPDfaBxXeSpsVS/5Vr
+fuvVqIM4V+eETUndUhT9yJoV3LodWuOa7CayaUyQ7d+rZ9EXHkcLp4JYn8tN5cCfjgpkT/R6
+YQf+P/Scf51r0wFmOMo31scuEZN9bgJvTk512kPwunt50nkQ7TDdBpgtc5yuIkIO+CYyKpoV
+LgbZS4F3cZSDRxEAucwCx2Ngj+a2c/1574VT2ivLnWXYyt0BRy52ebVywziCOQe34fpaMqMa
+i5059RGPEYQvhLeh5pg22XmeFWRU9vftVLB5GfyfAQjF5s+6oIEHv24f9dIwreDbVo37nH16
+LgDfAAJlVN3YQ/ws22HUvIzuVXxNeHObAmZWqDiXwctSrIY8ONDczm7bEfuG9XcjL968dNhO
+Xll0Q8ZKXTp97b0PVF5VpJJTCbdwWAw9PpE42oYDWGFlOnlAg2wp5+E1kYUCDgOxaIPydPr+
+7xAH/RLNVJ+zv9UzUzZbKn59DXuRq+pJX1gBVO/qLfOOXauC1L6hVML7V4SNR6h+d4yBh/ak
+1HzCKPFoQd8S0Dl2eWvxna8RqBO7VWk3a2dD6dIR59OVmUUaRjGxyAyVq345iUf/wrFHjvYy
+KhRiF/ms+Gd1tXluL7SJffif6OcbhSLBqkzmF6pCNL0VbTCLnMOYKoW0hsajUyVzw3Pib8kX
+B3BGE+9dBAsO45tfxD8XKIBhuXEYFdlpPJO1Xmm8FIHvX/6+HEw12hgloVsErvm81JcOT+x1
+l/PRvkxnMqZs7ZKJ9O46WDHbyeKYyMKa189DNjVBpzAhe5WSrbksjVIB0VIH/AiXSfA2FWam
+EaGFILfnlpYQBSYgOvRyQ2TvgTpxKLu2KIXPsFpsSo1wgGjR+yjZF3Q6FOGIHIvR+k6eKulf
+8u8e4jn9Ll+eSfYr0rltjN4JRWYY0zNyuxBG19UMQ66FyDxKAjdN7TzUlsrDu+jYzVHuJCna
+V2+I8qLWCQ10xVLnjd9iMEnWW9Ye55+SZlGVNHRYTB0eWdGiLznhFCO4gZuxnh/TsbwIxaDo
+1oz6FQDlJeH77ooixsr4TsKnM0NbUx6+T23/eGsSQGv+BoQgy3JcqDIXQf2tEDgjhcxHCcC2
+gM78aNGswkst1AxUtyrHJ+aGl1oUNAaWpEsSzTel8l/SeQG+1hICV2FskX5jJhEFZu1ZQoRv
+PXPa5+dOLWxSIGrbVjlJT/o7wUBlK+3HvT3GPqeoZ5NuK3aCOtZCrRQ/6XD+Z0DWQLCPnbq2
+sR6im2Faw2w2Pw0KrKQgMcQhPldJGVUnz5D4mUIxXrRfZYSrak01mgK1aPkl2ts=
+--------------080001030405080001010104--
+
+
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/18-signed-encrypted-inline-binary.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/18-signed-encrypted-inline-binary.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,89 @@
+Message-ID: <46BCDC0C.6090400 at mit.edu>
+Date: Fri, 10 Aug 2007 17:43:40 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:18
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/mixed;
+ boundary="------------090909060406090905060708"
+
+This is a multi-part message in MIME format.
+--------------090909060406090905060708
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y2WTp8ozFbsruEqdUG85zQ8X58sy/iC4
+hS9mj+vRs8nanbYABfDHUhoBk8VWUWPlpWTUfzDX0Wuai7LWo5wn7mK0p2i84vMU
+IghS5OGRJfrGVK/1giklqUrmPuiz8M2bG9voLoOVnVIH/izycMW2zZh12TD+YySt
+D1NP6OPy/5PgYgVZvzTYtOW7Y5EI1eTYoC0cMgjITokq6NKqN9aI7sReVV9P24El
+J/LxLvv9Nk7/8Jq6z1CjF0THtFg1mQYTWn52mrYwBr7aPpv/UDDFA0dmIancXwf0
+CHwFMMHFlYSBChy/vwx8+QiE60pLiz6EnajSq8lEQCf6nSFIvmkWn8y3IxmYRgr/
+CMn0BZc+VLgyzIJYG1Ygll10vXDdmjV4Y4f33stWr2Qse5Wp2Pyg/Lsfqw3C7+H1
+1BoxYJma2NmJ6sQu8xDNKPt8dsyOCYEyJqf8KGhi8eslRPuilKOreZ9b/KZh6OE2
+cNTSwA4Buvhbv4626sdq/BJxEi4Cxrhu3dMPCyeyl1540BOSMpThXdKa5pheJTs1
+78UDi87cJBZx8eQ5Gcg2VfwXkolc/dOvIRBEvnuIvA/3DaqH4gxMZ90UCFSzZ9Jm
+By83H0GVB0l8UbneSKtbr4wms5qjSUUzT7NTmqOdZwFmxJIbB0hVZtC1ve00WlkG
+qSmK2BXyG2bccsjeC/XOKO2WmZm9Gfuvtr6KcOnHFQYj08ZSfDPzJCuY7PK4/egc
+TR4wApehk6BzQwbz66uN2PlHIw==
+=2ZQG
+-----END PGP MESSAGE-----
+
+--------------090909060406090905060708
+Content-Type: application/octet-stream;
+ name="favicon.png.pgp"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="favicon.png.pgp"
+
+hQIOA076g5OuwfIOEAf/fVq/LJs3vrFnybm6thFjpDte1mawn7xw9op6UIFqEFRjkesreTn2
+b4vzYgi/8HUKJj6A/b9OBBobsOuHkKddZ+wRnTnMTc6ZGahJOFdOc3C84hEJYvyEgRqJ9hBh
+F6awMfPYHIfN3y6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pgFij7WQlg
+l+C1G630ynSm4bVHSmD0J/kBDfNUF7Kyr/riPuqnyqf2wVffbLIJYe/axb4slACZ+F4FhfsZ
+0NLYL2+pvGW05sv+k/kEyhSQeQZwmu8X4iZdfFK6kOpkHeS7K/yFX7BYRD9nMnZ5Zwekh8l7
+eVno90OdJ4rVJkp4+c2N3kEPPLgrEVlaut9gybv553PSwSIBeo8TwJX0khartEsmJRh4fuQq
+Ni8JhsMDG5Mr8DMvmjhWy5Awp+uQ+neNcnk11wQ+OYDFw4JopRED0m+igEK0i/737ANzEhLN
+ssbKnPSivQCBo7Yzv9o3XUx+UU4c3E2bE3MQRGDgDmB1SS2h+wyLDWDoBHGXZ17Hxcb83huJ
+HxFt+5e2K8T6hL3Rwghtg1DHt9eVS05v35xomDn1zPR+EWTEEhvWrPEw00CGpsq3ub4vJajJ
+Aa+4ClaBivaZVKE4rC87cdLNkiBFbXR3ROvkzoSnrA7/ZUgupDLfagDQKAj91hC1hmF1nRix
+SOIYGGeM1IsKm806Ah58IOUWsE5vAzoFqCMB4kYNZLbXU1ccxZVTU6QnpE8DzHoDqOtyN5y3
+2nyRLH9jBwKfECR3YHH3NxRbbI317fhmU5pAvRWeHpRp1yzGrCf21lgx12Ot1EWxHuXrd23p
+0O2EiQAcwadItgkfKW+UwAxGsVX+vueqSBYmYViCTFWKGqMXmgXgirR4nLt7L20WqrXBFKBH
+ms+7e9LwLHStfAzilr1deHnriNfwz0b9UPAvCV3n6FN3uz2asBWZKjOxlEr2VmaQYLiiFWe0
+UhX685wevk7AOX2LZ7iq7SkVmMLSIMgOVI8vmt2PEw==
+--------------090909060406090905060708--
+
+
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/2-signed-MIME-plain-with-attachment.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/2-signed-MIME-plain-with-attachment.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,48 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 74BF637F75; Mon, 13 Aug 2007 15:23:57 -0400 (EDT)
+Date: Mon, 13 Aug 2007 15:23:57 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:2
+Message-ID: <20070813192357.GB6392 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg=pgp-sha1;
+ protocol="application/pgp-signature"; boundary="bKyqfOwhbdpXa4YI"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--bKyqfOwhbdpXa4YI
+Content-Type: multipart/mixed; boundary="DKU6Jbt7q3WqK7+M"
+Content-Disposition: inline
+
+
+--DKU6Jbt7q3WqK7+M
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+
+This is a test email with a text attachment.
+ID:2
+
+--DKU6Jbt7q3WqK7+M
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: attachment; filename=text-attachment
+
+This is a test attachment. The magic word is: zanzibar.
+
+--DKU6Jbt7q3WqK7+M--
+
+--bKyqfOwhbdpXa4YI
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: Digital signature
+Content-Disposition: inline
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGwK/N0ygDXYSIHxsRAlbuAJ4wxUVCNerg6dLm+w7llCj51YYbFACgvNJR
+ajbUy9MMkljajl6Of3IlqRA=
+=R6Gi
+-----END PGP SIGNATURE-----
+
+--bKyqfOwhbdpXa4YI--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/3-signed-MIME-plain-with-binary.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/3-signed-MIME-plain-with-binary.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,55 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 9745537F7B; Mon, 13 Aug 2007 15:29:41 -0400 (EDT)
+Date: Mon, 13 Aug 2007 15:29:41 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:3
+Message-ID: <20070813192941.GC6392 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/signed; micalg=pgp-sha1;
+ protocol="application/pgp-signature"; boundary="pY3vCvL1qV+PayAL"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--pY3vCvL1qV+PayAL
+Content-Type: multipart/mixed; boundary="at6+YcpfzWZg/htY"
+Content-Disposition: inline
+
+
+--at6+YcpfzWZg/htY
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+
+This is a test email with binary attachment and MIME signature.
+ID:3
+
+--at6+YcpfzWZg/htY
+Content-Type: image/png
+Content-Disposition: attachment; filename="favicon.png"
+Content-Transfer-Encoding: base64
+
+iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QAAAAAAAD5Q7t/AAAB
+BElEQVR42u1WWw6DMAwz0+5FbzbvZuZk2cfUritpea77wVIRIBQ7dhsBdIQkM8AMMJImyW6d
+BXweyJ7UAMnUvQFGwHp2bizIJfUTUHZO8j/k1pt8lntvchbdH8ndtqyS+Gj3fyVPAtZAkm3N
+ffCyi/chBIQQ3iqs3cQ0TZCERzbhngDocOS4z94wXTCmu2V45LuQW8hsSWpaP8v9sy+2IRZj
+ZTP5ububbp8Az4ly5W6QqJ33YwKSkIYbZVy5uNMFsOJGLaLTBMRC8Yy7bmR/OD8TUB00DvkW
+AcPSB7FIPoji0AGQBtU4jt+Fh1R6Dcc6B2Znv4HTHTiAJkfXv+ILFy5c8PACgtsiPj7qOgAA
+AAAASUVORK5CYII=
+
+--at6+YcpfzWZg/htY--
+
+--pY3vCvL1qV+PayAL
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: Digital signature
+Content-Disposition: inline
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGwLEl0ygDXYSIHxsRAuYxAKDQeRS40bRiW5jmrwHNsCDN67vu7wCfV0Pd
+7T/gCO7TrbuGaJ0BVsJnJsY=
+=Pjdg
+-----END PGP SIGNATURE-----
+
+--pY3vCvL1qV+PayAL--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/4-signed-inline-plain.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/4-signed-inline-plain.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,24 @@
+Received: by anduril (Postfix, from userid 1000)
+ id 3EDA537F80; Mon, 13 Aug 2007 15:34:17 -0400 (EDT)
+Date: Mon, 13 Aug 2007 15:34:17 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:4
+Message-ID: <20070813193417.GD6392 at mit.edu>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+This is a test email with inline signature.
+ID:4
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGwLI50ygDXYSIHxsRAp40AJ9ErYdLH2SVRXtgRtx7n/FVFOmKDwCgl/0T
+BeRSaF4Xbi8uGhVIkmU+YCs=
+=e4u6
+-----END PGP SIGNATURE-----
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/5-signed-inline-with-attachment.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/5-signed-inline-with-attachment.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,48 @@
+Message-ID: <46BCDA81.3030308 at mit.edu>
+Date: Fri, 10 Aug 2007 17:37:05 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:5
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/mixed;
+ boundary="------------010302000403000103080306"
+
+This is a multi-part message in MIME format.
+--------------010302000403000103080306
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 7bit
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+This is a test email with a text attachment and inline signature.
+ID:5
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGvNqA0ygDXYSIHxsRAuCHAKC0HnduLWqihY5wzGYDFGbFtA4chwCgr6+t
+mQo4oXIqu+kIZ0ExWyiUENs=
+=3ABp
+-----END PGP SIGNATURE-----
+
+--------------010302000403000103080306
+Content-Type: text/plain;
+ name="text-attachment"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="text-attachment"
+
+This is a test attachment. The magic word is: zanzibar.
+
+--------------010302000403000103080306
+Content-Type: application/octet-stream;
+ name="text-attachment.sig"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="text-attachment.sig"
+
+iD8DBQBGvNqB0ygDXYSIHxsRAmkbAJ0esGNEDMr01u45ZHIIKZpCFSE8tgCfXBedq0Yu5mnZ
+zOZyASZYUIf9wSE=
+--------------010302000403000103080306--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/6-signed-inline-with-binary.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/6-signed-inline-with-binary.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,55 @@
+Message-ID: <46BCDAE6.4090803 at mit.edu>
+Date: Fri, 10 Aug 2007 17:38:46 -0400
+From: Christian Ternus <ternus at mit.edu>
+User-Agent: Thunderbird 1.5.0.12 (X11/20070604)
+MIME-Version: 1.0
+To: rt-recipient at example.com
+Subject: Test Email ID:6
+X-Enigmail-Version: 0.94.2.0
+Content-Type: multipart/signed; micalg=pgp-sha1;
+ protocol="application/pgp-signature";
+ boundary="------------enigAEEA002E4229CA8E5445ED73"
+
+This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
+--------------enigAEEA002E4229CA8E5445ED73
+Content-Type: multipart/mixed;
+ boundary="------------000104020205010403010301"
+
+This is a multi-part message in MIME format.
+--------------000104020205010403010301
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: quoted-printable
+
+This is a email signed inline with a binary attachment.
+ID:6
+
+--------------000104020205010403010301
+Content-Type: image/png;
+ name="favicon.png"
+Content-Transfer-Encoding: base64
+Content-Disposition: inline;
+ filename="favicon.png"
+
+iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QAAAAAAAD5Q7t/AAAB
+BElEQVR42u1WWw6DMAwz0+5FbzbvZuZk2cfUritpea77wVIRIBQ7dhsBdIQkM8AMMJImyW6d
+BXweyJ7UAMnUvQFGwHp2bizIJfUTUHZO8j/k1pt8lntvchbdH8ndtqyS+Gj3fyVPAtZAkm3N
+ffCyi/chBIQQ3iqs3cQ0TZCERzbhngDocOS4z94wXTCmu2V45LuQW8hsSWpaP8v9sy+2IRZj
+ZTP5ububbp8Az4ly5W6QqJ33YwKSkIYbZVy5uNMFsOJGLaLTBMRC8Yy7bmR/OD8TUB00DvkW
+AcPSB7FIPoji0AGQBtU4jt+Fh1R6Dcc6B2Znv4HTHTiAJkfXv+ILFy5c8PACgtsiPj7qOgAA
+AAAASUVORK5CYII=
+--------------000104020205010403010301--
+
+--------------enigAEEA002E4229CA8E5445ED73
+Content-Type: application/pgp-signature; name="signature.asc"
+Content-Description: OpenPGP digital signature
+Content-Disposition: attachment; filename="signature.asc"
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFGvNrm0ygDXYSIHxsRAvwSAKC4d3U6SjfhYpUHu2V/vXtgxGFa1QCfeK6p
+dyDDlvlqP9Ns4EExvHXfHuY=
+=sX3V
+-----END PGP SIGNATURE-----
+
+--------------enigAEEA002E4229CA8E5445ED73--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/7-encrypted-MIME-plain.txt
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/7-encrypted-MIME-plain.txt Tue Aug 14 12:19:00 2007
@@ -0,0 +1,47 @@
+Received: by anduril (Postfix, from userid 1000)
+ id CEA9137F51; Fri, 10 Aug 2007 15:27:49 -0400 (EDT)
+Date: Fri, 10 Aug 2007 15:27:49 -0400
+To: rt-recipient at example.com
+Subject: Test Email ID:7
+Message-ID: <20070810192749.GA5572 at mit.edu>
+MIME-Version: 1.0
+Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
+ boundary="YiEDa0DAkWCtVeE4"
+Content-Disposition: inline
+User-Agent: Mutt/1.5.13 (2006-08-11)
+From: ternus at mit.edu (Christian Ternus)
+
+
+--YiEDa0DAkWCtVeE4
+Content-Type: application/pgp-encrypted
+Content-Disposition: attachment
+
+Version: 1
+
+--YiEDa0DAkWCtVeE4
+Content-Type: application/octet-stream
+Content-Disposition: inline; filename="msg.asc"
+
+-----BEGIN PGP MESSAGE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+hQIOA076g5OuwfIOEAf9FtBMrkLWUKK5BtwuUsYXV9Mbe/YkkmK61MuysAtLcX/M
+DiXPzngjL62Dr9l88R3imf2kPmY36yx5WNeXUrFFVmFPaeZrHEJiMNvPGVVQCqRK
+uar2vsYRK9th4msZnn0hBYnA8+8kZ8rWefWHpszOcJ1YZpyyEMLf8Vnstyf0Pebp
+Wxixr99+mn3MVH38CrhoErI6CMiCFJgPAl5wtGWd0lT3+657dLJCsNI0cT3AY/JC
+IJwWD2sdOXOzDo7tdC3l7/YuGsXvd4jGu4A8PdoBMOgPx/N4KT3+uPhp2sRD3PMg
+LU59613xT8/FOYxQSib9hGqNZPqXS3ryC3ZvY4Sp8AgApCMocKsN7vm8N+6Yh7Nc
+Jjy/kuf8tjuTTs32Yk0ACU3y2SFXKSBZo6cVXgJhUvmG2Dq4O/A8mtP0cjqeBFqp
++vZOb7xhtxxTE6HWWThvx5qxcwjpijzDMS9uzfGaHwLvewdGVLODCup06MJmeAmj
+N1WEZqc/cqFZvZ9omCpcvTGoELpOzcUY1MxAq1IVkMzAk7dPIHYuyPSFQK6Y8IPl
+xsfSMcq9gjth8qautnriB0ohwkUebGnxgM4CjGjnSmLmUFXkndUOXKbM7R7E3QdL
++6TKMr2pvLl8U3OJrCiyyPVyVi3in4TYi4uegXJl05CAEjEXRf5RFhaWRnn66EYN
+WdLAAQHpkESfESVUaWvJwI+JB+LMBoKZjWgvIQ7AQKqLAvIsAqs9PKM4mYOMaawl
+en9XNRkW0dSGUxjW4K8u7fLS/xzWrZeCrafEkvCowVv/nR+Wxm296bxX+7z2R52/
+j+J0zms1fRdVxEs+rOI6JuXg4xWxUdLTav7cqvQ5c/izM+jU4yWEa3y0fHma6Jeh
+o4+1NerQby8Yzxszh9XVfkbYnQilhP8qCVxYe4HGjKlNi5v/xOgCznCKsqkGYMPU
+S32K6lg=
+=xeKr
+-----END PGP MESSAGE-----
+
+--YiEDa0DAkWCtVeE4--
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/8-encrypted-MIME-with-attachment.txt
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/9-encrypted-MIME-with-binary.txt
==============================================================================
Binary file. No diff available.
Added: rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/text-attachment
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/data/mail/text-attachment Tue Aug 14 12:19:00 2007
@@ -0,0 +1 @@
+This is a test attachment. The magic word is: zanzibar.
Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/utils.pl
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/utils.pl (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/utils.pl Tue Aug 14 12:19:00 2007
@@ -6,58 +6,15 @@
use RT;
RT::LoadConfig();
-use IPC::Open2;
-
-our $url = RT->Config->Get('WebURL');
-our $mailgate = $RT::BinPath .'/rt-mailgate';
-die "Couldn't find mailgate ($mailgate) command" unless -f $mailgate;
-$mailgate .= ' --debug';
+warn "lib/t/utils.pl has been deprecated. Use RT::Test module instead";
sub run_gate {
- my %args = (
- url => $url,
- message => '',
- action => 'correspond',
- queue => 'General',
- @_
- );
- my $message = delete $args{'message'};
-
- my $cmd = $mailgate;
- while( my ($k,$v) = each %args ) {
- next unless $v;
- $cmd .= " --$k '$v'";
- }
- $cmd .= ' 2>&1';
-
- DBIx::SearchBuilder::Record::Cachable->FlushCache;
-
- my ($child_out, $child_in);
- my $pid = open2($child_out, $child_in, $cmd);
- if ( UNIVERSAL::isa($message, 'MIME::Entity') ) {
- $message->print( $child_in );
- } else {
- print $child_in $message;
- }
- close $child_in;
- my $result = do { local $/; <$child_out> };
- close $child_out;
- waitpid $pid, 0;
- return ($?, $result);
+ require RT::Test;
+ return RT::Test->run_mailgate(@_);
}
sub create_ticket_via_gate {
- my $message = shift;
- my ($status, $gate_result) = run_gate( message => $message, @_ );
- my $id;
- unless ( $status >> 8 ) {
- ($id) = ($gate_result =~ /Ticket:\s*(\d+)/i);
- unless ( $id ) {
- diag "Couldn't find ticket id in text:\n$gate_result" if $ENV{'TEST_VERBOSE'};
- }
- } else {
- diag "Mailgate output:\n$gate_result" if $ENV{'TEST_VERBOSE'};
- }
- return ($status, $id);
+ require RT::Test;
+ return RT::Test->send_via_mailgate(@_);
}
Modified: rt/branches/3.7-EXPERIMENTAL/t/00-mason-syntax.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/00-mason-syntax.t (original)
+++ rt/branches/3.7-EXPERIMENTAL/t/00-mason-syntax.t Tue Aug 14 12:19:00 2007
@@ -12,10 +12,10 @@
no_chdir => 1,
wanted => sub {
return if /(?:\.(?:jpe?g|png|gif|rej)|\~)$/i;
- if (m!/\.svn$!) {
- $File::Find::prune = 1;
- return;
- }
+ if (m!/\.svn$!) {
+ $File::Find::prune = 1;
+ return;
+ }
return unless -f $_;
diag "testing $_" if $ENV{'TEST_VERBOSE'};
eval { compile_file($_) } and return;
Modified: rt/branches/3.7-EXPERIMENTAL/t/api/date.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/api/date.t (original)
+++ rt/branches/3.7-EXPERIMENTAL/t/api/date.t Tue Aug 14 12:19:00 2007
@@ -22,7 +22,6 @@
}
my $current_user;
-
{
my $user = RT::User->new($RT::SystemUser);
my($uid, $msg) = $user->Create(
@@ -32,7 +31,9 @@
);
ok($uid, "user was created") or diag("error: $msg");
$current_user = RT::CurrentUser->new($user);
+}
+{
my $date = RT::Date->new( $current_user );
is($date->Timezone, 'UTC', "dropped all timzones to UTC");
is($date->Timezone('user'), 'UTC', "dropped all timzones to UTC");
Modified: rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t (original)
+++ rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t Tue Aug 14 12:19:00 2007
@@ -69,8 +69,6 @@
# TODO: --extension queue
-require "lib/t/utils.pl";
-
my $url = $m->rt_base_url;
sub latest_ticket {
@@ -90,7 +88,7 @@
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, url => undef);
+ my ($status, $id) = RT::Test->send_via_mailgate($text, url => undef);
is ($status >> 8, 1, "The mail gateway exited with a failure");
ok (!$id, "No ticket id") or diag "by mistake ticket #$id";
}
@@ -104,7 +102,7 @@
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, url => 'http://this.test.for.non-connection.is.expected.to.generate.an.error');
+ my ($status, $id) = RT::Test->send_via_mailgate($text, url => 'http://this.test.for.non-connection.is.expected.to.generate.an.error');
is ($status >> 8, 75, "The mail gateway exited with a failure");
ok (!$id, "No ticket id");
}
@@ -132,7 +130,7 @@
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "Created ticket");
@@ -152,7 +150,7 @@
Foob!
EOF
local $ENV{'EXTENSION'} = "bad value with\nnewlines\n";
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "Created ticket #$id");
@@ -187,7 +185,7 @@
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, extension => 'some-extension-arg' );
+ my ($status, $id) = RT::Test->send_via_mailgate($text, extension => 'some-extension-arg' );
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "Created ticket #$id");
@@ -221,7 +219,7 @@
Blah!
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, extension => 'some-extension-arg' );
+ my ($status, $id) = RT::Test->send_via_mailgate($text, extension => 'some-extension-arg' );
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "Created ticket #$id");
@@ -241,7 +239,7 @@
Blah!
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok (!$id, "no ticket created");
@@ -275,7 +273,7 @@
Blah!
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "ticket created");
@@ -301,7 +299,7 @@
Blah! (Should not work.)
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok (!$id, "no way to reply to the ticket");
@@ -329,7 +327,7 @@
Blah!
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
is ($id, $ticket_id, "replied to the ticket");
@@ -349,7 +347,7 @@
Foob!
EOF
local $ENV{'EXTENSION'} = $ticket_id;
- my ($status, $id) = create_ticket_via_gate($text, extension => 'ticket');
+ my ($status, $id) = RT::Test->send_via_mailgate($text, extension => 'ticket');
is ($status >> 8, 0, "The mail gateway exited normally");
is ($id, $ticket_id, "replied to the ticket");
@@ -380,7 +378,7 @@
Blah! (Should not work.)
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, action => 'comment');
+ my ($status, $id) = RT::Test->send_via_mailgate($text, action => 'comment');
is ($status >> 8, 0, "The mail gateway exited normally");
ok (!$id, "no way to comment on the ticket");
@@ -409,7 +407,7 @@
Blah!
Foob!
EOF
- my ($status, $id) = create_ticket_via_gate($text, action => 'comment');
+ my ($status, $id) = RT::Test->send_via_mailgate($text, action => 'comment');
is ($status >> 8, 0, "The mail gateway exited normally");
is ($id, $ticket_id, "replied to the ticket");
@@ -429,7 +427,7 @@
Foob!
EOF
local $ENV{'EXTENSION'} = 'comment';
- my ($status, $id) = create_ticket_via_gate($text, extension => 'action');
+ my ($status, $id) = RT::Test->send_via_mailgate($text, extension => 'action');
is ($status >> 8, 0, "The mail gateway exited normally");
is ($id, $ticket_id, "added comment to the ticket");
@@ -474,7 +472,7 @@
Encoding => 'base64',
);
# Create a ticket with a binary attachment
- my ($status, $id) = create_ticket_via_gate($entity);
+ my ($status, $id) = RT::Test->send_via_mailgate($entity);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "created ticket");
@@ -530,7 +528,7 @@
\303\241\303\251\303\255\303\263\303\272
bye
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "created ticket");
@@ -566,7 +564,7 @@
\303\241\303\251\303\255\303\263\303\272
bye
EOF
- my ($status, $id) = create_ticket_via_gate($text);
+ my ($status, $id) = RT::Test->send_via_mailgate($text);
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "created ticket");
Added: rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-bad.t
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-bad.t Tue Aug 14 12:19:00 2007
@@ -0,0 +1,160 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 59;
+use File::Temp;
+use RT::Test;
+use Cwd 'getcwd';
+use String::ShellQuote 'shell_quote';
+use IPC::Run3 'run3';
+
+my $homedir = File::Spec->catdir( getcwd(), qw(lib t data crypt-gnupg) );
+
+RT->Config->Set( LogToScreen => 'debug' );
+RT->Config->Set( 'GnuPG',
+ Enable => 1,
+ OutgoingMessagesFormat => 'RFC' );
+
+RT->Config->Set( 'GnuPGOptions',
+ homedir => $homedir );
+
+RT->Config->Set( 'MailPlugins' => 'Auth::MailFrom', 'Auth::GnuPG' );
+
+my ($baseurl, $m) = RT::Test->started_ok;
+ok(my $user = RT::User->new($RT::SystemUser));
+ok($user->Load('root'), "Loaded user 'root'");
+$user->SetEmailAddress('recipient at example.com');
+
+diag "no signature" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('no-sig');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "no encryption on encrypted queue" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unencrypted');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "mismatched signature" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('bad-sig');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "unknown public key" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unk-pub-key');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "unknown private key" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unk-priv-key');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "signer != sender" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('signer-not-sender');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "encryption to user whose pubkey is not signed" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unsigned-pub-key');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "no encryption of attachment on encrypted queue" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unencrypted-attachment');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "no signature of attachment" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unsigged-attachment');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "revoked key" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('revoked-key');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "expired key" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('expired-key');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+diag "unknown algorithm" if $ENV{TEST_VERBOSE};
+{
+ my $mail = get_contents('unknown-algorithm');
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+}
+
+sub get_contents {
+ my $pattern = shift;
+
+ my $file = glob("lib/t/data/mail/*$pattern*");
+ defined $file
+ or do { diag "Unable to find lib/t/data/mail/*$pattern*"; return };
+
+ open my $mailhandle, '<', $file
+ or do { diag "Unable to read $file: $!"; return };
+
+ my $mail = do { local $/; <$mailhandle> };
+ close $mailhandle;
+
+ return $mail;
+}
+
+sub get_latest_ticket_ok {
+ my $tickets = RT::Tickets->new($RT::SystemUser);
+ $tickets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
+ $tickets->Limit( FIELD => 'id', OPERATOR => '>', VALUE => '0' );
+ my $tick = $tickets->First();
+ ok( $tick->Id, "found ticket " . $tick->Id );
+ return $tick;
+}
+
Added: rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-realmail.t
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/t/mail/gnupg-realmail.t Tue Aug 14 12:19:00 2007
@@ -0,0 +1,160 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 158;
+use File::Temp;
+use RT::Test;
+use Cwd 'getcwd';
+use String::ShellQuote 'shell_quote';
+use IPC::Run3 'run3';
+use Digest::MD5 qw(md5_base64);
+
+my $homedir = File::Spec->catdir( getcwd(), qw(lib t data crypt-gnupg-realmail) );
+
+RT->Config->Set( LogToScreen => 'debug' );
+RT->Config->Set( 'GnuPG',
+ Enable => 1,
+ OutgoingMessagesFormat => 'RFC' );
+
+RT->Config->Set( 'GnuPGOptions',
+ homedir => $homedir,
+ passphrase => 'rt-test');
+
+RT->Config->Set( 'MailPlugins' => 'Auth::MailFrom', 'Auth::GnuPG' );
+
+my ($baseurl, $m) = RT::Test->started_ok;
+
+$m->get( $baseurl."?user=root;pass=password" );
+$m->content_like(qr/Logout/, 'we did log in');
+$m->get( $baseurl.'/Admin/Queues/');
+$m->follow_link_ok( {text => 'General'} );
+$m->submit_form( form_number => 3,
+ fields => { CorrespondAddress => 'rt-recipient at example.com' } );
+$m->content_like(qr/rt-recipient\@example.com.* - never/, 'has key info.');
+
+ok(my $user = RT::User->new($RT::SystemUser));
+ok($user->Load('root'), "Loaded user 'root'");
+$user->SetEmailAddress('ternus at mit.edu');
+
+my %body = (1 => qr/This is a test email with MIME signature./);
+
+my $eid = 0;
+for my $usage (qw/signed encrypted signed&encrypted/) {
+ for my $format (qw/MIME inline/) {
+ for my $attachment (qw/plain text-attachment binary-attachment/) {
+ ++$eid;
+ diag "Email $eid: $usage, $attachment email with $format key" if $ENV{TEST_VERBOSE};
+ eval { email_ok($eid, $usage, $format, $attachment) };
+ }
+ }
+}
+
+sub get_contents {
+ my $eid = shift;
+
+ my ($file) = glob("lib/t/data/mail/$eid-*");
+ defined $file
+ or do { diag "Unable to find lib/t/data/mail/$eid-*"; return };
+
+ open my $mailhandle, '<', $file
+ or do { diag "Unable to read $file: $!"; return };
+
+ my $mail = do { local $/; <$mailhandle> };
+ close $mailhandle;
+
+ return $mail;
+}
+
+sub email_ok {
+ my ($eid, $usage, $format, $attachment) = @_;
+
+ my $mail = get_contents($eid)
+ or return 0;
+
+ my ($status, $id) = RT::Test->send_via_mailgate($mail);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+
+ my $tick = get_latest_ticket_ok();
+ is( $tick->Subject,
+ "Test Email ID:$eid",
+ "Created the ticket"
+ );
+
+ my $txn = $tick->Transactions->First;
+ my ($msg, @attachments) = @{$txn->Attachments->ItemsArrayRef};
+
+ if ($usage =~ /encrypted/) {
+ is( $msg->GetHeader('X-RT-Incoming-Encryption'),
+ 'Success',
+ 'recorded incoming mail that is encrypted'
+ );
+ is( $msg->GetHeader('X-RT-Privacy'),
+ 'PGP',
+ 'recorded incoming mail that is encrypted'
+ );
+
+ #XXX: maybe RT will have already decrypted this for us
+ unlike( $msg->Content,
+ ($body{$eid} || qr/ID:$eid/),
+ 'incoming mail did NOT have original body'
+ );
+ }
+ else {
+ is( $msg->GetHeader('X-RT-Incoming-Encryption'),
+ 'Not encrypted',
+ 'recorded incoming mail that is not encrypted'
+ );
+ like( $msg->Content || $attachments[0]->Content,
+ ($body{$eid} || qr/ID:$eid/),
+ 'got original content'
+ );
+ }
+
+ if ($usage =~ /signed/) {
+ is( $msg->GetHeader('X-RT-Incoming-Signature'),
+ 'RT Test <rt-test at example.com>',
+ 'recorded incoming mail that is signed'
+ );
+ }
+ else {
+ is( $msg->GetHeader('X-RT-Incoming-Signature'),
+ undef,
+ 'recorded incoming mail that is not signed'
+ );
+ }
+
+ if ($attachment =~ /attachment/) {
+ # signed messages should sign each attachment too
+ if ($usage =~ /signed/) {
+ my $sig = pop @attachments;
+ ok ($sig->Id, 'loaded attachment.sig object');
+ my $acontent = $sig->Content;
+ }
+
+ my $a = pop @attachments;
+ my $file = '';
+ ok ($a->Id, 'loaded attachment object');
+ my $acontent = $a->Content;
+ if ($attachment =~ /binary/)
+ {
+ is(md5_base64($acontent), '', "The binary attachment's md5sum matches");
+ }
+ else
+ {
+ like($acontent, qr/zanzibar/, 'The attachment isn\'t screwed up in the database.');
+ }
+
+ }
+
+ return 0;
+}
+
+sub get_latest_ticket_ok {
+ my $tickets = RT::Tickets->new($RT::SystemUser);
+ $tickets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
+ $tickets->Limit( FIELD => 'id', OPERATOR => '>', VALUE => '0' );
+ my $tick = $tickets->First();
+ ok( $tick->Id, "found ticket " . $tick->Id );
+ return $tick;
+}
+
Modified: rt/branches/3.7-EXPERIMENTAL/t/web/cf_select_one.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/web/cf_select_one.t (original)
+++ rt/branches/3.7-EXPERIMENTAL/t/web/cf_select_one.t Tue Aug 14 12:19:00 2007
@@ -80,7 +80,7 @@
diag $msg if $msg && $ENV{'TEST_VERBOSE'};
# we use lc as we really don't care about case
- # so if we later we'll add canonicalization of value
+ # so if later we'll add canonicalization of value
# test should work
is lc $ticket->FirstCustomFieldValue( $cf_name ),
'asd', 'assigned value of the CF';
Modified: rt/branches/3.7-EXPERIMENTAL/t/web/custom_frontpage.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/web/custom_frontpage.t (original)
+++ rt/branches/3.7-EXPERIMENTAL/t/web/custom_frontpage.t Tue Aug 14 12:19:00 2007
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 6;
+use Test::More tests => 7;
use RT::Test;
my ($baseurl, $m) = RT::Test->started_ok;
@@ -32,7 +32,7 @@
$m->get ( $url.'Prefs/MyRT.html' );
$m->content_like (qr/stupid tickets/, 'saved search listed in rt at a glance items');
-$m->login, 'we did log in as root';
+ok $m->login, 'we did log in as root';
$m->get ( $url.'Prefs/MyRT.html' );
$m->form_name ('SelectionBox-body');
More information about the Rt-commit
mailing list