where to configure max_days_to_hold on MM3 GUI interface?
Hi Sir,
I came to know that the held messages can be restricted to be
processed after a specific no of days or can be discard after some days using the parameter *max_days_to_hold*.
But I could see that parameter value configurable on MM2 GUI
interface in General Options but I don't see the same on the MM3 GUI interface.
Could you please help me if I am missing something?
-- Thanks & Regards, Shashi Kanth.K 9052671936
On 1/28/20 8:42 PM, Shashikanth Komandoor wrote:
But I could see that parameter value configurable on MM2 GUI
interface in General Options but I don't see the same on the MM3 GUI interface.
There are many core settings not (yet) exposed in Postorius.
max_days_to_hold. is one of them. It can be set via mailman shell
or
via the REST API
<https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html#res...>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hello Mark,
Thanks for helping me for moving ahead in my project.
Troubling you again, I would like to put another request at you.
As per your suggestion, I am trying to configure my list
configuration through REST API for specially the parameter like max_days_to_hold as it is not available through interface and I am following the official links of mailman 3 i.e https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/listconf.html
But I am getting "name is not defined" sort of errors as below:
*>>> dump_json('http://localhost:9001/3.0/lists/ <http://localhost:9001/3.0/lists/>','ant@example.com/config <http://ant@example.com/config>',dict(display_name='My List'),'PATCH')Traceback (most recent call last): File "<stdin>", line 1, in <module>NameError: name 'dump_json' is not defined>>>*
Actually I am new to REST API but hope this is the only issue that
is preventing me to go ahead.
Could you please help me by saying how should I handle this so that
I should be able to configure *max_days_to_hold* of a list or multiple ?
On Wed, Jan 29, 2020 at 11:20 PM Mark Sapiro <mark@msapiro.net> wrote:
On 1/28/20 8:42 PM, Shashikanth Komandoor wrote:
But I could see that parameter value configurable on MM2 GUI
interface in General Options but I don't see the same on the MM3 GUI interface.
There are many core settings not (yet) exposed in Postorius. max_days_to_hold. is one of them. It can be set via
mailman shell
or via the REST API < https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html#res....
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- Thanks & Regards, Shashi Kanth.K 9052671936
On Sat, Feb 1, 2020, at 5:27 AM, Shashikanth Komandoor wrote:
Hello Mark,
Thanks for helping me for moving ahead in my project. Troubling you again, I would like to put another request at you. As per your suggestion, I am trying to configure my list
configuration through REST API for specially the parameter like max_days_to_hold as it is not available through interface and I am following the official links of mailman 3 i.e https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/listconf.html
But I am getting "name is not defined" sort of errors as below:
*>>> dump_json('http://localhost:9001/3.0/lists/ <http://localhost:9001/3.0/lists/>','ant@example.com/config <http://ant@example.com/config>',dict(display_name='My List'),'PATCH')Traceback (most recent call last): File "<stdin>", line 1, in <module>NameError: name 'dump_json' is not defined>>>*
Actually I am new to REST API but hope this is the only issue that
is preventing me to go ahead.
Could you please help me by saying how should I handle this so that
I should be able to configure *max_days_to_hold* of a list or multiple ?
dump_json is basically a Python function which sends the request to the URL you add as the first parameter (GET, if any data isn't specified and uses POST if data is specified or explicitly define the PATCH or method like you have above) and prints the json response.
You can easily do the same using curl with the right authorization headers, with something like:
$ curl -u restadmin:restpass -X PATCH
http://localhost:8001/3.1/lists/somelist.example.com/config -d display_name='Patched Name'
Note that "restadmin:restpass" is the username password that you have set in your mailman.cfg.
If you do want to use Python, you can just use a regular PATCH request using requests or standard library urllib3.
Finally, dump_json is documented here: https://mailman.readthedocs.io/en/latest/src/mailman/docs/documentation.html...
On Wed, Jan 29, 2020 at 11:20 PM Mark Sapiro <mark@msapiro.net> wrote:
On 1/28/20 8:42 PM, Shashikanth Komandoor wrote:
But I could see that parameter value configurable on MM2 GUI
interface in General Options but I don't see the same on the MM3 GUI interface.
There are many core settings not (yet) exposed in Postorius. max_days_to_hold. is one of them. It can be set via
mailman shell
or via the REST API < https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html#res....
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- Thanks & Regards, Shashi Kanth.K 9052671936
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
On 2/1/20 9:43 AM, Abhilash Raj wrote:
Finally, dump_json is documented here: https://mailman.readthedocs.io/en/latest/src/mailman/docs/documentation.html...
And implicit but not explicit in that is that to use Python, you want to
use mailman shell
and maybe within that do things like
from mailman.testing.documentation import dump_json
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thank you Abilash Raj for your help which made me step ahead.
With your help, I have written a for loop as below which makes all the lists on my Mailman 3 box set the configuration of max_days_to_hold as 1 and of course I am successful in setting so.
And the for loop is as below:
*for listid in curl -u restadmin:restpass -X GET http://localhost:8001/3.1/lists <http://localhost:8001/3.1/lists> | python -mjson.tool| grep "list_id" | awk -F"\"" '{print $4}'
*
*do *
- curl -u restadmin:restpass -X PATCH http://localhost:8001/3.1/lists/$listid/config <http://localhost:8001/3.1/lists/$listid/config> -d max_days_to_hold='1'* *done*
With the above script I am able to set the value of max_days_to_hold as required but how to check manually and make my held messages discarded automatically which are after the specified period configured for max_days_to_hold.
If I am able to do it manually I can be confident to take in to production so that the held messages after a specific period would not be appeared under "held messages" tab.
On Sat, Feb 1, 2020 at 11:14 PM Abhilash Raj <maxking@asynchronous.in> wrote:
On Sat, Feb 1, 2020, at 5:27 AM, Shashikanth Komandoor wrote:
Hello Mark,
Thanks for helping me for moving ahead in my project. Troubling you again, I would like to put another request at you. As per your suggestion, I am trying to configure my list
configuration through REST API for specially the parameter like max_days_to_hold as it is not available through interface and I am following the official links of mailman 3 i.e
https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/listconf.html
But I am getting "name is not defined" sort of errors as below:
*>>> dump_json('http://localhost:9001/3.0/lists/ <http://localhost:9001/3.0/lists/>','ant@example.com/config <http://ant@example.com/config>',dict(display_name='My List'),'PATCH')Traceback (most recent call last): File "<stdin>", line
in <module>NameError: name 'dump_json' is not defined>>>*
Actually I am new to REST API but hope this is the only issue
is preventing me to go ahead.
Could you please help me by saying how should I handle this so
1, that that
I should be able to configure *max_days_to_hold* of a list or multiple ?
dump_json is basically a Python function which sends the request to the URL you add as the first parameter (GET, if any data isn't specified and uses POST if data is specified or explicitly define the PATCH or method like you have above) and prints the json response.
You can easily do the same using curl with the right authorization headers, with something like:
$ curl -u restadmin:restpass -X PATCH
http://localhost:8001/3.1/lists/somelist.example.com/config -d display_name='Patched Name'Note that "restadmin:restpass" is the username password that you have set in your mailman.cfg.
If you do want to use Python, you can just use a regular PATCH request using requests or standard library urllib3.
Finally, dump_json is documented here: https://mailman.readthedocs.io/en/latest/src/mailman/docs/documentation.html...
On Wed, Jan 29, 2020 at 11:20 PM Mark Sapiro <mark@msapiro.net> wrote:
On 1/28/20 8:42 PM, Shashikanth Komandoor wrote:
But I could see that parameter value configurable on MM2 GUI
interface in General Options but I don't see the same on the MM3 GUI interface.
There are many core settings not (yet) exposed in Postorius. max_days_to_hold. is one of them. It can be set via
mailman shell
or via the REST API <https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html#res...
.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- Thanks & Regards, Shashi Kanth.K 9052671936
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- Thanks & Regards, Shashi Kanth.K 9052671936
On 2/5/20 9:55 AM, Shashikanth Komandoor wrote:
With the above script I am able to set the value of max_days_to_hold as required but how to check manually and make my held messages discarded automatically which are after the specified period configured for max_days_to_hold.
If I am able to do it manually I can be confident to take in to production so that the held messages after a specific period would not be appeared under "held messages" tab.
I'm really not sure what you are looking to do, but I can tell you that while the max_days_to_hold list attribute exists and can be set, the actual discarding of held messages older than max_days_to_hold is not implemented. Thus the setting currently does nothing.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Abhilash Raj
-
Mark Sapiro
-
Shashikanth Komandoor