Retrieve users from a list
A moderator has deleted all the users from a list, is there a way to recover them?
Yow! Do you happen to have a recent database backup? (See https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/4...)
Every time I look at the UI and see "Remove ALL members" next to "Remove Selected", a chill runs down my spine. I should probably go hide that button with some custom CSS right now. You have my sympathy.
--Jered
----- On Feb 6, 2024, at 9:40 AM, pau baiges pau.baiges@csuc.cat wrote:
A moderator has deleted all the users from a list, is there a way to recover them?
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to jered@convivian.com
pau.baiges@csuc.cat writes:
A moderator has deleted all the users from a list, is there a way to recover them?
I'm not sure exactly what is logged in such a case, but I think you may see the individual delete commands in mailman.log. But that depends on you having a sufficiently detailed level of logging.
If you have archives, you could seed the reconstituted list with the posters, but of course in most lists posters are a minority.
Otherwise, not in Mailman itself. You might have a database backup which could be restored, but those typically don't have list-level granularity.
For the future, you can run "mailman list-members" to relatively conveniently create human-readable backups (nobody should be asked to read httpd access logs!), but this isn't something that Mailman itself provides.
Steve
On Tue, Feb 6, 2024 at 5:40 PM <pau.baiges@csuc.cat> wrote:
A moderator has deleted all the users from a list, is there a way to recover them?
Adding my 0.1 cents.
If all options fail, you can fall back to your MTA logs.
- Look for a recent post to that list.
- Head over to the MTA logs.
- grep for the subject of that recent post from the mainlog or whatever you call it. In Exim we generally call it mainlog (or main.log). If you were logging subjects, then you can tie the subject to the recipients of the mail. Everyone logs the recipient details, right? And we keep logs for at least a month, no? I do. Once you get the file resulting from the grep, you can use some regexp or text manipulation tools to extract all the addresses that the post was sent to. It looks not too difficult from Exim mainlog. Not sure about Postfix and other MTAs. I am very sure this will give you the list of subscribers.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Odhiambo Washington writes:
Adding my 0.1 cents.
If all options fail, you can fall back to your MTA logs.
- Look for a recent post to that list.
- Head over to the MTA logs.
Ah! Excellent call!
- grep for the subject of that recent post from the mainlog or whatever you call it. In Exim we generally call it mainlog (or main.log). If you were logging subjects, then you can tie the subject to the recipients of the mail. Everyone logs the recipient details, right?
I think subjects are generally not logged by default, but message-ids usually are.
I am very sure this will give you the list of subscribers.
I'm not so sure. If you're VERPing or personalizing it will. But if you're not, then I think many MTAs log only the first of the list of recipients at one MX.
Still it should be a very useful resource for recovering a mass deletion.
Steve
this would mean you should include something like the following in your backup script when you use docker for your convenience (else rely on database backups):
for list in $(docker compose exec --user mailman mailman-core mailman lists -q) ; do docker compose exec --user mailman mailman-core mailman members $list > $list.members ; done
On Wed, Feb 7, 2024 at 8:37 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
Adding my 0.1 cents.
If all options fail, you can fall back to your MTA logs.
- Look for a recent post to that list.
- Head over to the MTA logs.
Ah! Excellent call!
- grep for the subject of that recent post from the mainlog or whatever you call it. In Exim we generally call it mainlog (or main.log). If you were logging subjects, then you can tie the subject to the recipients of the mail. Everyone logs the recipient details, right?
I think subjects are generally not logged by default, but message-ids usually are.
I am very sure this will give you the list of subscribers.
I'm not so sure. If you're VERPing or personalizing it will. But if you're not, then I think many MTAs log only the first of the list of recipients at one MX.
Still it should be a very useful resource for recovering a mass deletion.
Steve
I was imagining a situation like mine. I log message subjects and a lot of other things with my Exim MTA. When Exim gets a post to be distributed list members it also logs all the recipients as it sends out. Not sure about Postfix though.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
participants (5)
-
Jered Floyd
-
Jörg Schulz
-
Odhiambo Washington
-
pau.baiges@csuc.cat
-
Stephen J. Turnbull