Allan Hansen writes:
When I subscribe 'A' <a@foo.com>, Mailman3 changes it to 'B' <a@foo.com>.
If I recall correctly, this issue occurs because Subscription objects have no display name attribute, but User and Address objects do.
First, the advice part:
What can I do to help this member?
Unfortunately the mailman command line utility doesn't seem to allow changing the display name. The REST interface does, though. I think just starting Python 3 on the Mailman host as the Mailman user (we recommend "mailman" but Debian prefers "list", YMMV) and typing
from mailman.testing.documentation import dump_json dump_json('http://localhost:8001/3.1/addresses/a@foo.com', ... method='PATCH', data={'display_name': 'A'})
should do what you want. Note the numbers "8001" (Mailman core's REST port) and "3.1" (the API version) may be different on your system, I'm assuming the default install of a recent Mailman release.
See https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/r... for information about accessing the REST API and https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/a... for a few more details on the update process.
On to the rants, if you care.
I went into Django and added the name 'B' to the subscriber's account (the name was empty).
I then unsubscribed <a@foo.com> from the lists and resubscribed 'A' <a@foo.com>.
The subscription again lists as 'B' <a@foo.com>.
Does the user need to have different display names for different addresses? (I don't think it's possible to have different display names for the same address on different lists because there's no display name at all for Subscription objects.)
If the answer is "no", the correct thing to do is to set the desired display name on the user's account.
If the answer is "yes", there doesn't seem to be any way to do this with current Postorius/HyperKitty. Postorius doesn't expose the display name anywhere that I can see, and HyperKitty only manages the account's "real name".
This brings up a previous discussion of display names on this list, but I have not been able to find any solution to the need to change Mailman3's display names for a subscriber. It is beyond weird that unsubscribing, setting the account display name and resubscribing the member fishes back up the old and wrong display name.
Unless you explained what you did incorrectly this is not weird, it's the expected result. You set "B" in the account, that's what's going to show up as the display name.
It is not obvious that a new subscription should change an existing display name for a user or an address, given that there is no way to set a list-specific display name. It could go either way, and for the user I would definitely not change it, for the address I tend to agree that a new subscription should not change the address's display name. I agree that it's weird that neither Postorius nor HyperKitty seems to expose a way to set Address display names, though.
If you want a new subscription to set the display name for an address, the workaround would be to delete the address, then reconfirm the address, and resubscribe the address to all the relevant lists.