Skip to content

Instantly share code, notes, and snippets.

@adepasquale
Created September 28, 2014 17:18
Show Gist options
  • Save adepasquale/51f7741d1919ddbb5e55 to your computer and use it in GitHub Desktop.
Save adepasquale/51f7741d1919ddbb5e55 to your computer and use it in GitHub Desktop.
Determine last post sent from each mailman list
#!/usr/bin/env python
'''
http://benjaminjchapman.wordpress.com/2010/06/02/determining-last-post-sent-from-each-mailman-list/
~mailman/bin/withlist -a -r mailman_tools.last_post > mailman_last_posts.csv
'''
import os
import time
print '"Name","Last","Owners"'
def last_post(mlist):
name = mlist.real_name
last = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(mlist.last_post_time))
owner = '; '.join(mlist.owner)
print '"%s","%s","%s"' % (name, last, owner)
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment