Add an extra option for "Delivery status" for users?
Hello!
We have a unique case where we have a user we want to disable for mail receiving, etc. for the reason "Disabled by IT Security Team" but I don't even know if it's possible to add a delivery status that is that custom.
I know we have "Disabled" and "Disabled by Owner" but would we be able to add/modify the list to add that option (so that list owners can mark it)? (I say List owners because the ITSec team at a client has 'owner' status by default, without an extra group, but we want to have a dedicated dropdown selection for the ITSec team, even if we just have to duplicate "Disabled by Owner")
Thomas
On 11/19/25 12:50 PM, Thomas Ward via Mailman-users wrote:
We have a unique case where we have a user we want to disable for mail receiving, etc. for the reason "Disabled by IT Security Team" but I don't even know if it's possible to add a delivery status that is that custom.
At a minimum, you would need to add that choice to the DeliveryStatus(Enum) in mailman/interfaces/member.py and the choice and its description to the DELIVERY_STATUS_CHOICES tuples in postorius/forms/fields.py. I don't know offhand if that would be sufficient, or if more would be required.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro writes:
On 11/19/25 12:50 PM, Thomas Ward via Mailman-users wrote:
We have a unique case where we have a user we want to disable for mail receiving, etc. for the reason "Disabled by IT Security Team" but I don't even know if it's possible to add a delivery status that is that custom.
At a minimum, you would need to add that choice to the DeliveryStatus(Enum) in mailman/interfaces/member.py and the choice and its description to the DELIVERY_STATUS_CHOICES tuples in postorius/forms/fields.py. I don't know offhand if that would be sufficient, or if more would be required.
In postorius/views/user.py, you also need to add it to
UserPreferencesView,delivery_status_disabled_fields. Otherwise users
will be able to reenable from a security disable.
In Mailman core, it's not absolutely necessary, but I think you should
handle it the same as by_moderator in mailman/commands/cli_members.py,
mailman/commands/cli_addmembers.py, and mailman/commands/cli_syncmembers.py.
The mention of by_moderator in mailman/utilities/importer.py is irrelevant
since the new by_security (or whatever you call it) doesn't exist in
Mailman 2.
In mailmanclient, you *may* want to update docstrings in mailmanclient/asynclient.py and mailmanclient/restobjects/mailinglist.py.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (3)
-
Mark Sapiro -
Stephen J. Turnbull -
Thomas Ward