Request #7962: PGP reply validate preference
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 11 Aug 2010 05:57:51 +0000 (23:57 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 11 Aug 2010 05:57:51 +0000 (23:57 -0600)
Add preference to control if we check for recipient PGP public
keys when replying.

imp/compose.php
imp/config/prefs.php.dist
imp/docs/CHANGES
imp/lib/Prefs/Ui.php
imp/locale/en_US/help.xml

index 2247827..6407b82 100644 (file)
@@ -651,7 +651,9 @@ foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
 $encrypt_options = $prefs->isLocked('default_encrypt')
       ? $prefs->getValue('default_encrypt')
       : $vars->encrypt_options;
-if ($prefs->getValue('use_pgp') && !$prefs->isLocked('default_encrypt')) {
+if ($prefs->getValue('use_pgp') &&
+    !$prefs->isLocked('default_encrypt') &&
+    $prefs->getValue('pgp_reply_pubkey')) {
     $default_encrypt = $prefs->getValue('default_encrypt');
     if (!$vars->compose_formToken &&
         in_array($default_encrypt, array(IMP::PGP_ENCRYPT, IMP::PGP_SIGNENC))) {
index db69d52..e602ca4 100644 (file)
@@ -1512,7 +1512,7 @@ $prefGroups['pgp'] = array(
     'desc' => sprintf(_("Control PGP support for %s."), $GLOBALS['registry']->get('name')),
     'members' => array(
         'use_pgp', 'use_pgp_text', 'pgp_attach_pubkey', 'pgp_scan_body',
-        'pgp_verify', 'pgppublickey', 'pgpprivatekey'
+        'pgp_verify', 'pgp_reply_pubkey', 'pgppublickey', 'pgpprivatekey'
     )
 );
 
@@ -1550,6 +1550,14 @@ $_prefs['pgp_verify'] = array(
     'help' => 'pgp-option-verify'
 );
 
+$_prefs['pgp_reply_pubkey'] = array(
+    'value' => 1,
+    'advanced' => true,
+    'type' => 'checkbox',
+    'desc' => _("Check for valid recipient PGP public keys while replying?"),
+    'help' => 'pgp-option-reply-pubkey'
+);
+
 $_prefs['pgppublickey'] = array(
     'type' => 'special'
 );
index a508339..9e99a7c 100644 (file)
@@ -2,6 +2,8 @@
 v5.0-git
 --------
 
+[mms] Add preference to control if we check for recipient PGP public keys
+      when replying (Request #7962).
 [mms] Add preference to allow for automatic spam reporting when explicitly
       moving messages to the Spam mailbox (Request #6455).
 [mms] Automatically determine view based on browser and 'dynamic_view'
index 90bc985..f67440f 100644 (file)
@@ -210,6 +210,7 @@ class IMP_Prefs_Ui
                 $ui->suppress[] = 'pgp_attach_pubkey';
                 $ui->suppress[] = 'pgp_scan_body';
                 $ui->suppress[] = 'pgp_verify';
+                $ui->suppress[] = 'pgp_reply_pubkey';
                 $ui->suppress[] = 'pgppublickey';
                 $ui->suppress[] = 'pgpprivatekey';
             }
index df43d4b..b74a9c2 100644 (file)
     </para>
 </entry>
 
+<entry id="pgp-option-reply-pubkey">
+    <title>PGP: Validate PGP Public Keys When Replying</title>
+    <heading>Validate PGP Public Keys When Replying</heading>
+    <para>
+    If set, and PGP encryption is used by default for composing messages, IMP will verify that it can access all recipients' public keys when the reply is first created. This has the disadvantage that it may cause a delay in opening the reply window. However, it has the advantage of informing you immediately if you will be able to correctly send the encrypted message to all recipients immediately.
+    </para>
+</entry>
+
 <entry id="compose-options-encrypt">
     <title>Message Composition: Encryption Options</title>
     <heading>No Encryption</heading>