
Oct. 2, 2025
7:44 p.m.
On 10/2/25 11:41, Philip Bondi via Mailman-users wrote:
Hello to all:
I've studied the following:
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/commands/do...
mailman shell -l mmlist.domain.ca << EOF | tr , '\012' > nonmember.txt list(m.nonmembers.members) EOF
I was able to produce a clean list of 50 non-member email addresses that are spammers.
How would I take this list of non-members and delete them? I was unable to use mailman delmembers
Assuming you want to delete all the nonmembers, just do it all in mailman shell. Using the above
mailman shell -l mmlist.domain.ca << EOF
for member in m.nonmembers.members:
member.unsubscribe()
EOF
If your 50 addresses are not all the nonmembers and you only want to delete those 50, the bash script could be
mailman shell -l mmlist.domain.ca << EOF
for addr in open('nonmember.txt').readlines()
member = m.nonmembers.get_member(addr.strip())
member.unsubscribe()
EOF
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan