On 10/2/25 08:38, [email protected] wrote:
I've tried using the command 'mailman members --role administrator LISTSPEC'
whilst looping through each list from the output of 'mailman lists'. It almost
does the job, but in cases where an owner has a display name set the sync fails
as it cannot parse these lines.
e.g. Cannot parse as valid email address (skipping): Smith, John
<[email protected]>
The issue here is when the display name contains a comma or other
special character, it should be quoted as in
"Smith, John" <[email protected]>
to be parsed as an email address/display name.
The absence of quotes in the output of `mailman members` is not really a
bug as that output is intended only for humans, but you could apply
this patch to provide them.
```
--- a/src/mailman/commands/cli_members.py
+++ b/src/mailman/commands/cli_members.py
@@ -112,7 +112,7 @@
if email_only or not dn:
print(address.original_email, file=outfp)
else:
- print(f'{dn} <{address.original_email}>',
+ print(f'"{dn}" <{address.original_email}>',
file=outfp)
```
Otherwise, you could supply the -e/--email-only option to `mailman
members` to not include the display names in the output.
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/[email protected]/message/UTKI66XMU3ZH6WK3Y6GCI5UAKLPOSLMW/
This message sent to [email protected]