TL;DR: Listening to the advice, I will create and manage user/address pairs.
I am in the process of porting a web site that is used to manage a small organization. The web site maintains a directory of users of that organization, and also allows them to subscribe/unsubscribe to a small set of interest-group mailing lists for that organization. The users are not tech savvy, and are not expecting or expected to manage their subscriptions through Postorius, nor do they have access (normally) to the archives. Indeed, the URL to Postorious will normally be turned off at the reverse proxy server that sits in front of both Postorious and the organization's website.
The one-source-of-truth is the website's database. The website code has callouts for "subscribe <address> to <list>" and "unsubscribe <address> from <list>".
I am trying to minimize the amount of code I write to implement the web site's callouts, to initialize the mailing lists when I port the organization to this new implementation, and make it relatively easy to keep the website's database and mailman3's database in sync.
The impression I had from the docs was that unlinked addresses were a first class object. Since my website callouts only deal with addresses, this seemed a good mapping. However, I understand from this email thread that unlinked addresses are not the way to go, so I'll map <address> in the website database to <user>/<address> in mailman3.
Thanks for the advice and feedback!
-- Stephen Daniel
On Sat, Jan 15, 2022 at 2:27 PM Mark Sapiro <mark@msapiro.net> wrote:
On 1/15/22 10:03 AM, Stephen Daniel wrote:
The only way I've found to create a standalone address (not linked to any user) is to create a user with that address, unlink the address, then delete the user.
Is there a more straightforward way to just create an address with no
user?
The more straightforward way is via the IUserManager create_address method. This method is not exposed directly in REST, so you can't do it via REST.
My question is why do you want to?
Granted when an unknown nonmember address posts to a list we create a standalone address record, but maybe we should be creating a user too. We don't because it's tricky. Suppose User A with address A posts to a list from nonmember address B. We create the standalone address B record as a nonmember, but now user A can add address B as another address. If we also created User B, this would not be possible.
But again, what is your use case for creating standalone addresses?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/