Author: Alexander Zangerl  <az@debian.org>
Subject: make the audit logging a configurable option

diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' exmh-2.7.2~/lib/audit.tcl exmh-2.7.2/lib/audit.tcl
--- exmh-2.7.2~/lib/audit.tcl	2011-12-14 15:37:10.000000000 +1000
+++ exmh-2.7.2/lib/audit.tcl	2011-12-14 15:37:27.133409125 +1000
@@ -23,6 +23,10 @@
 
 
 proc Audit { event } {
+    global exmh
+    if {![info exists exmh(auditEnabled)] || !$exmh(auditEnabled)} {
+	return
+    }
     after 1 [list AuditInner $event]
 }
 proc AuditInner { event } {
@@ -107,7 +111,10 @@
     return $x
 }
 proc Audit_CheckPoint {} {
-    global audit mhProfile argv0
+    global audit mhProfile argv0 exmh
+    if {![info exists exmh(auditEnabled)] || !$exmh(auditEnabled)} {
+	return
+    }
     set file $audit(file)
     unset audit(file)
 
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' exmh-2.7.2~/lib/main.tcl exmh-2.7.2/lib/main.tcl
--- exmh-2.7.2~/lib/main.tcl	2011-12-14 15:37:10.000000000 +1000
+++ exmh-2.7.2/lib/main.tcl	2011-12-14 15:37:10.436286953 +1000
@@ -40,6 +40,9 @@
 	{exmh(logLines)	logLines 1000	{Max lines in debug log}
 "The log is implemented in a text widget.  This setting limits
 the number of lines kept in the log."}
+    {exmh(auditEnabled) auditEnabled OFF {Audit log enabled}
+	"This option controls the recording of an audit trail of operations on mail messages.
+ Audit information is collected in .exmhaudit in the exmh tempdir, and appended to ~/Mail/.exmhaudit on exit."}
 	{flist(debug)		flistDebug OFF	{Debug flist}
 "A listbox that displays the unseen and unvisited folder state
 is displayed to debug the flist module."}
