On 4/21/22 13:46, lists--- via Mailman-Users wrote:
Thanks for the reply Mark, where do I get the discard script from?

We are using Mailman3 but the only "discard" I can find belongs to postfix:
/usr/lib/postfix/sbin/discard

There is a bin/discard on our Mailman 2.1 server but not on our Mailman 3.1 
server


Yes, my answer was for MM 2.1 because this is a MM 2.1 list. The MM 3 list is https://lists.mailman3.org/mailman3/lists/mailman-us...@mailman3.org/

There is no equivalent to MM 2.1's discard script in MM 3 and held messages are in the database, not files in the data/ directory.

I suggest something like
```
$ bin/mailman shell -l list.example.com
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the list.example.com mailing list
>>> from mailman.app.moderator import handle_message
>>> requestdb = IListRequests(m)
>>> for id, type in requestdb.held_requests:
...     if type == RequestType.held_message:
...         handle_message(m, id, Action.discard)
...
>>> commit()
```

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to