[Mailman-Users] Mailman subscription/unsubscription reports
Odhiambo Washington
odhiambo at gmail.com
Fri Dec 7 05:12:09 EST 2018
On Fri, 7 Dec 2018 at 07:27, Mark Sapiro <mark at msapiro.net> wrote:
> On 12/3/18 4:55 AM, Odhiambo Washington wrote:
> > Hi All,
> >
> > I am running a list that has members joining and leaving.
> > I'd like to get an inside of these changes:
> > 1. how many members joined last month, this month..
> > 2. How many members left last month, this month, this year.
>
>
> I had some time to play with this so check out
> <https://www.msapiro.net/scripts/subscribe_log> (mirrored at
> <https://fog.ccsf.edu/~msapiro/scripts/subscribe_log>)
>
> If this is close to useful for you, I'm willing to tweak it if you want
> changes.
It is definitely very very useful. Thank you very much for putting this
together.
> As it is, you can feed it a mailman subscribe log covering some period
> and it will report the most recent join/leave event by list and user for
> the whole log or, if specified, a most recent number of days.
>
> Run it under Python3 (it will work with Python 2) with the --help option
> for more info.
>
I have tested it and notice that I need a few changesmods:
1. Give it the -l option to specify a listname (yes, my server has several
lists)
2. The current -l should probably be changed to -f for specifying the
subscribe filename/path
3. Since the subscribe log has dates, maybe -d should instead be used to
parse for and then group by month??
Or perhaps you can add an option to specify the month you want, like
Jan, Feb, so a '-m Nov' will give the join/leave for November..
4. To make it a little fancier, you can display the results in some
tabulated format:
Mailman Subscription Report for $Month
-----------------------------------------------------
LISTNAME ---------------JOINED---------LEFT
list1 15 2
list2 8 12
....
With the MONTH option available, I can then simply run it from cron to get
reports like:
mydate = 'date +%b'
./subscribe_log.py --f /usr/local/mailman/logs/subscribe -l listname -d
$mydate | mail -s "Mailman Subscription Status" john at doe.com
So far that is all in my request.
Once again, thank you very much.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft."
More information about the Mailman-Users
mailing list