Mailman
A few commonly used mailman commands to make my life more enjoyable. Find binaries in
/usr/lib/mailman/bin
Mailman Operator Binaries
-
Remove an email address from all lists on the server
remove_members --fromall --nouserack username@domain.edu
-
Add a single user to a list
echo 'username@domain.edu' | add_members -r - listname
-
List Membership
list_members listname
-
Export Member List for Migration
list_members --fullnames -o membership.txt listname
-
List All Mailing Lists
list_lists
-
Find a Member in All Lists
find_member username@domain.edu
Migration Tasks
Mailman provides a few scripts to assist with migration tasks. Check out those scripts to see if something is already available for a specific task before using the one-liners below.
- Move List Archives to Another Server
scp -r /path/to/list_archive user@mailman.example.org:/var/lib/mailman/archives/private/list_archive
- Fix the Hostname in
*.html
Archive Files
find . -type f -name "*.html" -print0 | xargs -0 sed -e 's/list.ohionet.org/lists.ohionet.org/g'