Mark Sapiro wrote:
It wouldn't be difficult to do, but at the moment, it wouldn't provide anything useful because of <https://gitlab.com/mailman/mailman/issues/453>.
The issue is now fixed in the branch head at least. The script corresponding to https://www.msapiro.net/scripts/last_post.py would be almost identical except for changing real_name to display_name, last_post_time to last_post_at and fixing the print for Python 3. Also changing the string interpolation to format(), it becomes:
import time
def last_post(mlist): print('{}: Last post at {}'.format( mlist.display_name, time.ctime(mlist.last_post_at) ))
The only issue with the script is for a list which has had no posts since #453 was fixed, mlist.last_post_at is None and time.ctime(None) is the current date and time.
That too could easily be fixed like:
import time
def last_post(mlist): if mlist.last_post_at: print('{}: Last post at {}'.format( mlist.display_name, time.ctime(mlist.last_post_at) )) else: print('{}: No posts'.format(mlist.display_name))
The trickier part is the Mailman 3 mailman withlist command has no option to run for all lists, so you'd need to run it something like
#!/bin/sh
for list in mailman lists -q
; do
mailman withlist -r last_post -l $list
done
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan