3 # Mine list sizes from MailMan web interfaces
5 # * Must set environment variable FETCHMAIL_LIST_PASS to list admin password
8 admin="http://lists.berlios.de/mailman/admin"
9 adminpw=$FETCHMAIL_LIST_PASS
12 if [ ! "$list" ]; then
13 echo "Usage: $0 list" 1>&2
18 # already gave us the full name, e.g. fetchmail-announce
21 # only gave us the last part of the name, e.g. announce
26 hexpw=`echo "$adminpw" | od -t x1 -w64 | sed -e 's/^[0-9]*//' -e '/^ *$/d' -e 's/ /%/g'`
28 tmp="/tmp/$project-$list.listsize.$$"
29 # First get the login cookie...
30 curl -s -D "$tmp" "$admin/${list}?adminpw=$hexpw" >/dev/null
31 # Second gets the actual stat
32 curl -s -b "$tmp" "$admin/${list}/members" \
33 | sed -n '/.*>(\([0-9][0-9]*\) members total.*/s//\1/p'