Skip to content

List admin deletion through command line

Created by: dverdin

This is the follow-up to PR #551.

See issue #524 for discussion about the feature.

I implemented the deletion of a list admin (owner or editor) through the command line. The code is based on a Request::Handler called delete_list_admin.

You can delete a list admin using the following command:

sympa.pl --delete_list_admin \
    --email <email@example.com> \
    --role [owner|editor]
    --list <listname@lists.domain.tld> \
    --robot <lists.domain.tld> \

Details about the command:

  • --email is mandatory.
  • If you don't specify --role, both editor and owner roles will be removed.
  • You also need to specify either --list or --robot.
    • --list is a full list id (<local.part>@<domain.part>) ; if you specify it, the selected role will be deleted for the user in this list only ;
    • --robot is the name of a Sympa robot ; if you specify it, the selected role will be deleted for the user in all this robot's lists.

For now, the command refuses to complete for owners only if the user to be deleted if the last list owner. This behaviour should probably be refined. Here are my thoughts:

  • We could switch the last user with listmaster.
  • We could also add a "force" option that would ignore this protection.
  • It could also be a mitigation of both solutions:
    • for example, force the deletion but replace the email with the sender's email.

To be discussed, I guess.

Todo after it: implement list admin update (for which you could also specify the whole virtual host).

Merge request reports