[Mailman-Users] [Fwd: list statics] - Bounces

Jon Carnes jonc at nc.rr.com
Sat Jul 5 17:49:20 CEST 2003


On Fri, 2003-07-04 at 16:31, veryaner wrote:
> hi everybody,
> I need a module or something to show my list statics? is this posible?
> I want to show, the user who send more mails, and that kind of things...
> thanks in advanced
> veryaner
> 
> -- 

====== Begin script: mm_bounces =======
#!/bin/bash
# mm_bounces: sends an email of bounced folks to the sys at domain.org list
# Note, these bounced emails have been automatically set to "no mail"
# for the Mailman lists that they were a part of.
# written by Jon Carnes, last modified on May 1, 2003

# create temp file to collect stats
TMPFILE=`mktemp /tmp/mm_stats.XXXXXX` || exit 1
BOINK=/var/log/mailman/bounce.1
MONTH="`date -d"last month" +%b`"
 
echo "This is a list of emails from $MONTH that were bouncing" \
    >$TMPFILE
echo "but are still subscribed to local Mailman mailing lists." \
    >>$TMPFILE
echo "The email addresses were automatically set to _no_mail_" \
    >>$TMPFILE
echo "in the specified lists, due to the  bounces."  >>$TMPFILE
echo "You should consider deleting these email addresses from" \
    >>$TMPFILE
echo "all Mailman lists:"   >>$TMPFILE
echo "/home/mailman/bin/remove_members --fromall email at address" \
    >>$TMPFILE
echo " "      >> $TMPFILE
echo "======" >> $TMPFILE
 
grep -hs "disabled " $BOINK | \
   grep -vs "already disabled" | \
   grep -s $MONTH | \
   cut -f6- "-d " |sort >> $TMPFILE
 
TEST="`tail -1 $TMPFILE`"
if [ "$TEST" = "======" ]; then rm $TMPFILE; exit 0; fi
 
# TEST indicates that there were email addresses disabled last month
# So we need to send this message to sys at domain.org
cat $TMPFILE |mail -s "$MONTH: Mailman disable list" sys at domain.org
 
rm $TMPFILE
====== End of Script ======





More information about the Mailman-Users mailing list