[Rt-commit] rt branch, 4.2/crypt-docs, created. rt-4.2.2-71-gc55a7ce
Alex Vandiver
alexmv at bestpractical.com
Thu Feb 13 15:35:10 EST 2014
The branch, 4.2/crypt-docs has been created
at c55a7ce7873a1a312c8437ff4dd5a4aa97f9c49e (commit)
- Log -----------------------------------------------------------------
commit ecf2050678917e6fdb5b43fd6a77920f9dfc693b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 22 12:47:56 2013 -0500
Crypt: Make clearer that Auth::Crypt needs Auth::MailFrom as well
diff --git a/lib/RT/Crypt.pm b/lib/RT/Crypt.pm
index e275295..d89cdcd 100644
--- a/lib/RT/Crypt.pm
+++ b/lib/RT/Crypt.pm
@@ -84,7 +84,9 @@ additional options to fine-tune behaviour.
However, note that you B<must> add the
L<Auth::Crypt|RT::Interface::Email::Auth::Crypt> email filter to enable
-the handling of incoming encrypted/signed messages.
+the handling of incoming encrypted/signed messages. It should be added
+in addition to the standard
+L<Auth::MailFrom|RT::Interface::Email::Auth::Crypt> plugin.
=head2 %Crypt
diff --git a/lib/RT/Interface/Email/Auth/Crypt.pm b/lib/RT/Interface/Email/Auth/Crypt.pm
index 2703af9..ac12a05 100644
--- a/lib/RT/Interface/Email/Auth/Crypt.pm
+++ b/lib/RT/Interface/Email/Auth/Crypt.pm
@@ -66,6 +66,9 @@ it put the module in the mail plugins list:
Set(@MailPlugins, 'Auth::MailFrom', 'Auth::Crypt', ...other filters...);
+C<Auth::Crypt> will not function without C<Auth::MailFrom> listed before
+it.
+
=head3 GnuPG
To use the gnupg-secured mail gateway, you need to do the following:
commit d3a56ec6b802245f132a55b621238a7d78bab2fb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 22 12:50:27 2013 -0500
Crypt: Warn if we are altering an explicitly provided Incoming or Outgoing list
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index a6b3269..a25aabb 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -665,11 +665,18 @@ our %META;
$opt->{'Incoming'} = [ $opt->{'Incoming'} ]
if $opt->{'Incoming'} and not ref $opt->{'Incoming'};
if ( $opt->{'Incoming'} && @{ $opt->{'Incoming'} } ) {
+ $RT::Logger->warning("$_ explicitly set as incoming Crypt plugin, but not marked Enabled; removing")
+ for grep {not $enabled{$_}} @{$opt->{'Incoming'}};
$opt->{'Incoming'} = [ grep {$enabled{$_}} @{$opt->{'Incoming'}} ];
} else {
$opt->{'Incoming'} = \@enabled;
}
if ( $opt->{'Outgoing'} ) {
+ if (not $enabled{$opt->{'Outgoing'}}) {
+ $RT::Logger->warning($opt->{'Outgoing'}.
+ " explicitly set as outgoing Crypt plugin, but not marked Enabled; "
+ . (@enabled ? "using $enabled[0]" : "removing"));
+ }
$opt->{'Outgoing'} = $enabled[0] unless $enabled{$opt->{'Outgoing'}};
} else {
$opt->{'Outgoing'} = $enabled[0];
commit c55a7ce7873a1a312c8437ff4dd5a4aa97f9c49e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Nov 22 12:50:50 2013 -0500
Crypt: Warn if Auth::Crypt is enabled but no Incoming plugins exist
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index a25aabb..bef4435 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -619,6 +619,10 @@ our %META;
Type => 'ARRAY',
PostLoadCheck => sub {
my $self = shift;
+
+ # Make sure Crypt is post-loaded first
+ $META{Crypt}{'PostLoadCheck'}->( $self, $self->Get( 'Crypt' ) );
+
my @plugins = $self->Get('MailPlugins');
if ( grep $_ eq 'Auth::GnuPG' || $_ eq 'Auth::SMIME', @plugins ) {
$RT::Logger->warning(
@@ -636,6 +640,10 @@ our %META;
} @plugins;
$self->Set( MailPlugins => @plugins );
}
+
+ if ( not @{$self->Get('Crypt')->{Incoming}} and grep $_ eq 'Auth::Crypt', @plugins ) {
+ $RT::Logger->warning("Auth::Crypt enabled in MailPlugins, but no available incoming encryption formats");
+ }
},
},
Crypt => {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list