On 1/27/22 00:06, IOhannes m zmoelnig wrote:
On 1/26/22 17:19, Mark Sapiro wrote:
On 1/26/22 00:16, IOhannes m zmoelnig wrote:
is there a scriptable way to get all users that have registered in my mailman3 (3.2.1) instance and which lists they are subscribed to (if any)?
It's in Postorius >= 1.3.6
i'm not entirely sure how this relates to the above (working) snippet.
is it, that with postorious>=1.3.6 i would be able to perform that task from the webinterface, rather than having to resort to 'mailman shell'?
Not really. In Postorius 1.3.6 there is a Users
view that will display
users and their create date and it is ordered by create date. Then each
user's entry has a Manage
button which goes to a page which among
other things, lists their subsubscriptions.
So, you could find the users of interest via this interface, but unless you developed a screen scraping script, it would be a multi-step manual process.
in any case, this might be related: before i received your email with the 'mailman shell' snippet, i scraped some bits of my django knowledge and visited <https://lists.example.com/admin> (the django admin interface), and noticed the list of users there. so i scraped that page for users (assuming that this was the list of registered users). then i get myself a list of all subscribers in my instance, using a crude
mailman lists | grep "@" | while read l; do mailman members "${l}"; done | sort -u
. finally i calculated the difference between the two sets.interestingly the results are quite different from the ones i got from your script: both sets contain users that are not in the other set. how come?
My script deals with Mailman users who may or may not be Django users. They won't be if they never signed up on the web UI. On the other hand, anyone can go to the web UI and sign up and become a Django user even if they never join any list and become a Mailman user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan