[Rt-commit] r18127 - in rt/3.8/trunk: lib/RT/Interface/Email/Auth

ruz at bestpractical.com ruz at bestpractical.com
Mon Feb 2 06:35:43 EST 2009


Author: ruz
Date: Mon Feb  2 06:35:29 2009
New Revision: 18127

Modified:
   rt/3.8/trunk/etc/RT_Config.pm.in
   rt/3.8/trunk/lib/RT/Interface/Email/Auth/GnuPG.pm

Log:
* make gnupg mails rejecting optional and configurable in the config

Modified: rt/3.8/trunk/etc/RT_Config.pm.in
==============================================================================
--- rt/3.8/trunk/etc/RT_Config.pm.in	(original)
+++ rt/3.8/trunk/etc/RT_Config.pm.in	Mon Feb  2 06:35:29 2009
@@ -600,12 +600,21 @@
 If you want to allow people to encrypt attachments inside the DB then
 set C<AllowEncryptDataInDB> to true
 
+Set C<RejectOnMissingPrivateKey> to false if you don't want to reject
+emails encrypted for key RT doesn't have and can not decrypt.
+
+Set C<RejectOnBadData> to false if you don't want to reject letters
+with incorrect GnuPG data.
+
 =cut
 
 Set( %GnuPG,
     Enable => @RT_GPG@,
     OutgoingMessagesFormat => 'RFC', # Inline
     AllowEncryptDataInDB   => 0,
+
+    RejectOnMissingPrivateKey => 1,
+    RejectOnBadData           => 1,
 );
 
 =item C<%GnuPGOptions>

Modified: rt/3.8/trunk/lib/RT/Interface/Email/Auth/GnuPG.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Interface/Email/Auth/GnuPG.pm	(original)
+++ rt/3.8/trunk/lib/RT/Interface/Email/Auth/GnuPG.pm	Mon Feb  2 06:35:29 2009
@@ -149,13 +149,13 @@
         unless ( $sent_once{'NoPrivateKey'} ) {
             unless ( CheckNoPrivateKey( Message => $args{'Message'}, Status => \@status ) ) {
                 $sent_once{'NoPrivateKey'}++;
-                $reject = 1;
+                $reject = 1 if RT->Config->Get('GnuPG')->{'RejectOnMissingPrivateKey'};
             }
         }
         unless ( $sent_once{'BadData'} ) {
             unless ( CheckBadData( Message => $args{'Message'}, Status => \@status ) ) {
                 $sent_once{'BadData'}++;
-                $reject = 1;
+                $reject = 1 if RT->Config->Get('GnuPG')->{'RejectOnBadData'};
             }
         }
     }


More information about the Rt-commit mailing list