Add Mailing lists to Administration

A mailing list is an address that passes mail on to everyone on it. To
Stalwart it is its own object, x:MailingList, behind sysMailingList*, so
it gets its own section under Directory after Groups: search, fifty to a
page with each list's recipient count, and a panel to create, edit and
delete one.

Recipients are a property of the list, so unlike a group's members they
save with the rest of the panel. What Save sends for them is only what was
added and removed, one recipients/<address> pointer each -- the patch the
live server accepted -- so a recipient added elsewhere while the panel was
open is not taken out. They can be pasted several at a time, from a
spreadsheet column, a comma-separated line or Name <address>; anything with
an @ that is not an address stays in the box with a note. Past a dozen, a
filter narrows them.

That is all a list is in Stalwart -- no owners, moderation or posting
rules -- so that is all the panel offers.

The mock answers x:MailingList with two lists, the recipient set's live
shape, and the refusals a wrong address, a clash with an account and a
missing permission get.

Twenty-five new strings and one plural, in all nine catalogues.
This commit is contained in:
2026-09-15 08:47:04 -07:00
parent 79afc334ab
commit 627422d794
25 changed files with 1113 additions and 13 deletions
+7 -3
View File
@@ -229,7 +229,7 @@ const VALIDATOR_MESSAGES: Record<string, () => string> = {
};
/** What kind of thing a refusal was about, where the wording has to differ. */
export type DirectoryObject = "account" | "domain" | "group";
export type DirectoryObject = "account" | "domain" | "group" | "list";
/**
* Say what went wrong in terms of the person's own action, in their language.
@@ -276,7 +276,9 @@ export function describeDirectoryError(err: unknown, object: DirectoryObject = "
? t("Your organisation has reached the number of domains it is allowed.")
: object === "group"
? t("Your organisation has reached the number of groups it is allowed.")
: t("Your organisation has reached the number of accounts it is allowed.");
: object === "list"
? t("Your organisation has reached the number of mailing lists it is allowed.")
: t("Your organisation has reached the number of accounts it is allowed.");
case "objectIsLinked":
return t("Something still depends on this, so the server kept it.");
case "notFound":
@@ -284,7 +286,9 @@ export function describeDirectoryError(err: unknown, object: DirectoryObject = "
? t("This domain no longer exists. Someone may have removed it.")
: object === "group"
? t("This group no longer exists. Someone may have deleted it.")
: t("This account no longer exists. Someone may have deleted it.");
: object === "list"
? t("This mailing list no longer exists. Someone may have deleted it.")
: t("This account no longer exists. Someone may have deleted it.");
case "rateLimit":
return t("Too many attempts. Please wait a few minutes and try again.");
case "tooLarge":