[Mailman-Users] suspending lists from the command line

turgut kalfaoğlu turgut at kalfaoglu.com
Tue Apr 3 06:44:17 CEST 2012

Thank you very much for your feedback. I just wanted to pause mail 
processing on most lists during the primetime.
Right now I achieve the same thing by stopping mailman for a few hours 
during the prime time. However, some low-traffic,
and important lists also get suspended that way, and I would rather find 
a more elegant solution if possible.
I just would like to queue the mails coming to those lists during the 
day, release them when the server load gets low again.

I tried the maximum recipients patch that is suppose to pause mailman 
after X deliveries, but it hasn't seem to have worked.

Regards, -turgut

On 04/02/2012 11:38 PM, Mark Sapiro wrote:
> turgut kalfaoglu wrote:
>> Hi there. During busy times I would like to suspend almost all
>> lists,except some emergency ones.. Is there a way to achieve this from
>> the command line via some script?
> What do you mean by suspend? What you need to do depends on the answer
> to this. If you mean you want it to appear as if the list doesn't
> exist, i.e. mail to the list is undeliverable, the list is not visible
> on the web, you could create a shell script to move Mailman's various
> lists/LISTNAME/ directories aside and, depending on how mail is
> delivered to Mailman, update the necessary things in the MTA. Note
> that in some configurations mail is routed programmatically based on
> the existance of the lists/LISTNAME/ directory, so simple moving it
> aside would be sufficient in those cases.
> If on the other hand you mean just set "emergency" moderation for the
> lists, consider the following bash script.
> #!/bin/bash
> cd /to/mailmans/bin/directory
> f=mktemp
> echo "emergency = True">  $f
> for list in `./list_lists --bare`; do
>      if [[ "$list" != "emergency_list1" \
>           &&  "$list" != "emergency_list2" \
>           &&  "$list" != "etc" ]]; then
>          ./config_list -i $f $list
>      fi
> done
> rm $f
> To reverse this, change "emergency = True" to "emergency = False" and
> run the script again.

More information about the Mailman-Users mailing list