Log Owner/Moderator actions ban address matching.

Dear All,
In Mailman 3, is there any way we can log the Owner/Moderator actions like moderator "x" approved the posting on list@example.com?
Also, I have configured some local ban lists and some global ban lists as per my organization's policy. In my setup, I observed that when someone from the ban list posts to the list, that posting goes into a blackhole without leaving any trace. I may have made some configuration mistakes, but can we log the ban list matching or generate a notification if some postings match the ban list?
Regards, Hitachi.

Hitashi mancho via Mailman-users writes:
In Mailman 3, is there any way we can log the Owner/Moderator actions like moderator "x" approved the posting on list@example.com?
These are logged to the "vette" logging channel, with level "info". By default, the "vette" channel is directed to the mailman.log, for loglevel above info. If they are not found in mailman.log, check your mailman.cfg file for settings to [logging.template] or [logging.vette] that either restrict logging to levels strictly higher than "info" or send the "vette" channel somewhere else.
For more information about the default settings for logging, see site-packages/mailman/config/schema.cfg, search for "logging".
Also, I have configured some local ban lists and some global ban lists as per my organization's policy.
These are discarded (no response to sender), and logged to the "vette" channel with level "info".
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Thank you so much Stephen,
As per your suggestion, I configured the mailman.cfg after checking site-packages/mailman/config/schema.cfg. Now I am getting all the logs. The only thing with the Vette channel is as follows, I got the below log (anonymized)
*May 01 13:11:43 2025 (673989) list1@example.com <list1@example.com>: Discarded posting: From: user1@example.com <user1@example.com> Subject: subject 2025 - Reg.*
In this log, it is unclear which moderator discarded this message. Is there any way we can add that to the log?
Regards, Hitachi
On Mon, Apr 28, 2025 at 8:45 PM Stephen J. Turnbull <steve@turnbull.jp> wrote:
Hitashi mancho via Mailman-users writes:
In Mailman 3, is there any way we can log the Owner/Moderator actions like moderator "x" approved the posting on list@example.com?
These are logged to the "vette" logging channel, with level "info". By default, the "vette" channel is directed to the mailman.log, for loglevel above info. If they are not found in mailman.log, check your mailman.cfg file for settings to [logging.template] or [logging.vette] that either restrict logging to levels strictly higher than "info" or send the "vette" channel somewhere else.
For more information about the default settings for logging, see site-packages/mailman/config/schema.cfg, search for "logging".
Also, I have configured some local ban lists and some global ban lists as per my organization's policy.
These are discarded (no response to sender), and logged to the "vette" channel with level "info".
-- GNU Mailman consultant (installation, migration, customization) Sirus Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Hitashi mancho writes:
*May 01 13:11:43 2025 (673989) list1@example.com <list1@example.com>: Discarded posting: From: user1@example.com <user1@example.com> Subject: subject 2025 - Reg.*
In this log, it is unclear which moderator discarded this message. Is there any way we can add that to the log?
Not easily. That log comes from Mailman core (the list database/post distribution component). The authority core sees to act on that is "you know the REST access user and password", but that's known by Postorius, not by moderators. Weirdly, Postorius doesn't seem to keep a log of user logins at all.
If you *need* to know, you can trace back through the logs like this:
mailman/vette: <DATE> (<PID>) <LIST>: Discarded posting: From: <EMAIL ADDRESS> Subject: <TEXT> mailman/mailman: [DATE] "POST /3.1/lists/<LIST>/held/8 HTTP/1.1" 204 0 "-" "GNU Mailman REST client v3.3.5" postorius/access: 127.0.0.1 - - [<DATE>] "POST /mailman3/lists/<LIST>/held_messages HTTP/1.0" 200 15228 "<REFERRER>" "<USER AGENT>" nginx/access: <MODERATOR IP> - - [<DATE>] "POST /mailman3/lists/LIST/held_messages HTTP/1.1" 200 3080 "<REFERRER>" "<USER AGENT>"
where the DATE should match within a few seconds across the logs and you can probably ID the moderator from the IP address.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

On Thu, May 1, 2025 at 1:13 PM Stephen J. Turnbull <steve@turnbull.jp> wrote:
Hitashi mancho writes:
*May 01 13:11:43 2025 (673989) list1@example.com <list1@example.com>: Discarded posting: From: user1@example.com <user1@example.com> Subject: subject 2025 - Reg.*
In this log, it is unclear which moderator discarded this message. Is there any way we can add that to the log?
Not easily. That log comes from Mailman core (the list database/post distribution component). The authority core sees to act on that is "you know the REST access user and password", but that's known by Postorius, not by moderators. Weirdly, Postorius doesn't seem to keep a log of user logins at all.
If you *need* to know, you can trace back through the logs like this:
mailman/vette: <DATE> (<PID>) <LIST>: Discarded posting: From: <EMAIL ADDRESS> Subject: <TEXT> mailman/mailman: [DATE] "POST /3.1/lists/<LIST>/held/8 HTTP/1.1" 204 0 "-" "GNU Mailman REST client v3.3.5" postorius/access: 127.0.0.1 - - [<DATE>] "POST /mailman3/lists/<LIST>/held_messages HTTP/1.0" 200 15228 "<REFERRER>" "<USER AGENT>" nginx/access: <MODERATOR IP> - - [<DATE>] "POST /mailman3/lists/LIST/held_messages HTTP/1.1" 200 3080 "<REFERRER>" "<USER AGENT>"
where the DATE should match within a few seconds across the logs and you can probably ID the moderator from the IP address.
So this issue can be addressed by making Postorius to log user logins, right? However, I don't have the patch :)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]

Odhiambo Washington via Mailman-users writes:
So this issue can be addressed by making Postorius to log user logins, right? However, I don't have the patch :)
I would guess it's probably possible to get Django to do this, quite possibly using standard configuration to do so. I just don't know where to look offhand.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

On 5/1/25 04:02, Stephen J. Turnbull wrote:
Odhiambo Washington via Mailman-users writes:
So this issue can be addressed by making Postorius to log user logins, right? However, I don't have the patch :)
I would guess it's probably possible to get Django to do this, quite possibly using standard configuration to do so. I just don't know where to look offhand.
Postorius can't log logins because it's not Postorius (or HyperKitty) that does the logging in. It is django-allauth.
You can see the Last Login
info for a user in the Django admin web UI
under Authentication and Authorization -> Users
django-mailman3 does have some involvement with logging in and it might be possible to add logging there, but I don't offhand know where.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 5/1/25 11:41, Mark Sapiro wrote:
Postorius can't log logins because it's not Postorius (or HyperKitty) that does the logging in. It is django-allauth.
Thinking further on this, it's not really logins that you want logged, as I could have logged in days ago and still be logged in. I think a better thing to log is when the user is found to be logged in as a user with appropriate priviledge and Postorius can do that.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Hitashi mancho
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull