Counting no. of mailman list subscribers

Just wrote a shell script quickly. It can count number of valid subscribers in every Mailman-driven mailing lists. This piece of code is licensed in GPL. 😉

#!/bin/sh
# Counting valid no. of list subscribers in mailman
for i in `list_lists -b`
do
total=`list_members ${i} | wc -l`
nomail=`list_members -n ${i} | wc -l`
valid=`echo ${total} – ${nomail} | bc -l`
echo ${i}: ${total} – ${nomail} = ${valid} valid email addrs.
done

Running Result:

team-a: 123 – 0 = 123 valid email addrs.
team-b: 456 – 78 = 378 valid email addrs.

One Reply to “Counting no. of mailman list subscribers”

  1. Thanks. I quickly run it for voyage linux mailing list and it shows:

    voyage-announce: 76 – 0 = 76 valid email addrs.
    voyage-linux: 401 – 12 = 389 valid email addrs.