------------------------------------------------------------
revno: 1180
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Fri 2009-07-31 12:59:38 -0700
message:
  Updated contrib/mmdsr to report preserved messages.
modified:
  NEWS
  contrib/mmdsr


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription.
=== modified file 'NEWS'
--- NEWS	2009-02-23 21:18:16 +0000
+++ NEWS	2009-07-31 19:59:38 +0000
@@ -4,6 +4,12 @@
 
 Here is a history of user visible changes to Mailman.
 
+2.1.13 (xx-xxx-xxxx)
+
+  Bug Fixes and other patches
+
+    - Updated contrib/mmdsr to report preserved messages.
+
 2.1.12 (23-Feb-2009)
 
   Bug fixes and other patches

=== modified file 'contrib/mmdsr'
--- contrib/mmdsr	2008-12-03 00:18:14 +0000
+++ contrib/mmdsr	2009-07-31 19:59:38 +0000
@@ -168,6 +168,10 @@
 #		Changed processing of fromusenet posts.  Previously, mmdsr
 #		reported as gated only the first and last of a gated range.
 #		Now mmdsr reports every post from the 'posted to' entries.
+#
+# 0.0.20	Update by Mark Sapiro <[email protected]>
+#		Updated on: Sun Jul 26 08:56:41 PDT 2009
+#		Added report of files in the preserved messages directory.
 
 ###############################################################################
 # Set up locations of standard commands, directories, etc....
@@ -217,6 +221,11 @@
 DATADIR="/usr/local/mailman/data"
 
 ###############################################################################
+# Mailman preserved messages directory
+###############################################################################
+SPAMDIR="/usr/local/mailman/spam"
+
+###############################################################################
 # Maximum number of subdirectory entries to display in report
 ###############################################################################
 MAX_QUEUE_LINES=20
@@ -594,6 +603,33 @@
 $AWK '{ print $NF }' $TMPLOG | $GREP -i '^heldmsg-' | $SED -e 's/^heldmsg-//' -e 's/-[0-9]*\.pck$//' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
 echo "" >> $TMP
 
+if [ -d $SPAMDIR ] ; then
+    cd $SPAMDIR
+    $RM -f $TMPLOG
+    $TOUCH $TMPLOG
+    $LS -la | $GREP -i '\.msg$' >> $TMPLOG
+    LINES=`$WC -l < $TMPLOG`
+    
+    echo "******************************" >> $TMP
+    echo "Preserved Messages Directory Contents" >> $TMP
+    echo "        (.msg files only)" >> $TMP
+    echo "******************************" >> $TMP
+    echo "Files: $LINES" >> $TMP
+    echo "==============================" >> $TMP
+    echo "" >> $TMP
+    
+    if [ $LINES -le $MAX_DATA_LINES ] ; then
+        $CAT $TMPLOG >> $TMP
+    else
+        $HEAD $TMPLOG >> $TMP
+        echo "" >> $TMP
+        echo "  More than $MAX_DATA_LINES total entries, skipping ..." >> $TMP
+        echo "" >> $TMP
+        $TAIL $TMPLOG >> $TMP
+    fi
+    echo "" >> $TMP
+fi
+
 ###############################################################################
 # Okay, we're done with all the code stuff, now handle the output
 ###############################################################################

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to