• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6749: S/Mime support for notification e-mails

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Enhancement Closed   minor 5.1.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

See forgotten and then updated proposal by TWiki:Main.TimotheLitt at TWiki:Codev.SmimeNotificationSupport.

-- TWiki:Main/PeterThoeny - 2011-06-14

This is now in SVN trunk. Thanks Timothe!

-- TWiki:Main/PeterThoeny - 2011-06-14

Re-opening, default needs to be empty, e.g. no signed e-mail.

-- TWiki:Main.PeterThoeny - 2011-06-20

Additional fixes:

Make default configure fields empty, e.g. no signed e-mail by default:

--- TWiki.spec   (revision 21511)
+++ TWiki.spec   (working copy)
@@ -1043,7 +1043,7 @@
 # must be in PEM format.  You must also use a mail program (not Net::SMTP)
 # in the following settings. <em>If you do not want signed e-mail,
 # leave this field blank. </em>
-$TWiki::cfg{SmimeCertificateFile} = '$TWiki::cfg{DataDir}/cert.pem';
+$TWiki::cfg{SmimeCertificateFile} = '';
 
 # **PATH**
 # Secure email certificate.  If you want e-mail sent by TWiki to be signed,
@@ -1053,7 +1053,7 @@
 # You must also use a mail program (not Net::SMTP)
 # in the following settings. <em>If you do not want signed e-mail,
 # leave this field blank. </em>
-$TWiki::cfg{SmimeKeyFile} = '$TWiki::cfg{DataDir}/key.pem';
+$TWiki::cfg{SmimeKeyFile} = '';
 
 # **COMMAND**
 # Mail program. If Net::SMTP is installed, it will be used in preference. 

Better explanation using example path/filename:

--- TWiki.spec   (revision 21538)
+++ TWiki.spec   (working copy)
@@ -1039,18 +1039,18 @@
 
 # **PATH**
 # Secure email certificate.  If you want e-mail sent by TWiki to be signed,
-# specify the filename of the administrator's X.509 certificate here.  It 
-# must be in PEM format.  You must also use a mail program (not Net::SMTP)
-# in the following settings. <em>If you do not want signed e-mail,
-# leave this field blank. </em>
+# specify the filename of the administrator's X.509 certificate here, such
+# as /etc/pki/tls/certs/cert.pem.  It must be in PEM format.  You must also
+# use a mail program (not Net::SMTP) in the following settings. <em>If you
+# do not want signed e-mail, leave this field blank. </em>
 $TWiki::cfg{SmimeCertificateFile} = '';
 
 # **PATH**
 # Secure email certificate.  If you want e-mail sent by TWiki to be signed,
-# specify the filename of the administrator's X.509 private key here.  It 
-# must be in PEM format.  <em>Be sure that this file is only readable by the 
-# TWiki software; it must NOT be readable by users!</em>
-# You must also use a mail program (not Net::SMTP)
+# specify the filename of the administrator's X.509 private key here, such
+# as /etc/pki/tls/private/key.pem.  It must be in PEM format.  <em>Be sure
+# that this file is only readable by the TWiki software; it must NOT be
+# readable by users!</em> You must also use a mail program (not Net::SMTP)
 # in the following settings. <em>If you do not want signed e-mail,
 # leave this field blank. </em>
 $TWiki::cfg{SmimeKeyFile} = '';

SMIME fields are optional, configure should not complain if values are empty:

Index: TWiki/Configure/Checkers/SmimeCertificateFile.pm
===================================================================
--- TWiki/Configure/Checkers/SmimeCertificateFile.pm   (revision 21512)
+++ TWiki/Configure/Checkers/SmimeCertificateFile.pm   (working copy)
@@ -28,7 +28,8 @@
     my $certFile = $TWiki::cfg{SmimeCertificateFile} || "";
     $certFile =~ s/%DATE%/DATE/;
     TWiki::Configure::Load::expandValue($certFile);
-    my $e = !-r ( $certFile ) && "Can\'t read $certFile";
+    return undef unless( $certFile );
+    my $e = !-r ( $certFile ) && "Can\'t read cert file $certFile";
     $e = $this->ERROR($e) if $e;
     return $e;
 }
Index: TWiki/Configure/Checkers/SmimeKeyFile.pm
===================================================================
--- TWiki/Configure/Checkers/SmimeKeyFile.pm   (revision 21511)
+++ TWiki/Configure/Checkers/SmimeKeyFile.pm   (working copy)
@@ -25,10 +25,11 @@
 sub check {
     my $this = shift;
 
-    my $certFile = $TWiki::cfg{SmimeKeyFile} || "";
-    $certFile =~ s/%DATE%/DATE/;
-    TWiki::Configure::Load::expandValue($certFile);
-    my $e = !-r ( $certFile ) && "Can\'t read $certFile";
+    my $keyFile = $TWiki::cfg{SmimeKeyFile} || "";
+    $keyFile =~ s/%DATE%/DATE/;
+    TWiki::Configure::Load::expandValue($keyFile);
+    return undef unless( $keyFile );
+    my $e = !-r ( $keyFile ) && "Can\'t read key file $keyFile";
     $e = $this->ERROR($e) if $e;
     return $e;
 }

-- TWiki:Main.PeterThoeny - 2011-06-20

ItemTemplate
Summary S/Mime support for notification e-mails
ReportedBy TWiki:Main.TimotheLitt
Codebase ~twiki4
SVN Range TWiki-5.1.0-trunk, Sun, 22 May 2011, build 21317
AppliesTo Engine
Component

Priority Enhancement
CurrentState Closed
WaitingFor

Checkins TWikirev:21509 TWikirev:21510 TWikirev:21511 TWikirev:21512 TWikirev:21538 TWikirev:21539 TWikirev:21540
TargetRelease minor
ReleasedIn 5.1.0
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r13 - 2011-08-22 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback