[Mailman-Users] Digest options -> list configuration

Alan.Rubin at nt.gov.au Alan.Rubin at nt.gov.au
Thu Aug 7 03:40:01 CEST 2008


I chose option two, but it didn't seem to work.  I am not a python programmer.
Is there a general switch to turn on simple debugging (a la -x in sh scripting).

I ran this:

su mailman -c "/opt/csw/bin/python -S /export/home/mailman/cron/senddigests_mod
-l change_notification"

and I got no errors or log messages that I can find, but the digest.mbox is
still full and I never received a digest in my mailbox.

Here is the edit to the copy, senddigests_mod:

    for listname in listnames:
        mlist = MailList.MailList(listname, lock=0)
        #if mlist.digest_send_periodic:
        if True:
                # We are unable to predict what exception may occur in digest
                # processing and we don't want to lose the other digests, so
                # we catch everything.
                except Exception, errmsg:
                    print >> sys.stderr, \
                      'List: %s: problem processing %s:\n%s' % \
                         os.path.join(mlist.fullpath(), 'digest.mbox'),

The executable bit is set and the permission is the same as the original.  It is
owned by root with the executable bit set for all and in the group mailman.
Perhaps it needs to be owned by root as well?  The original cronjob was set in
mailman's crontab.

The list is also set correctly:
~mailman/bin/config_list -o - change_notification
# Should a digest be dispatched daily when the size threshold isn't
# reached?
# legal values are:
#    0 = "No"
#    1 = "Yes"
digest_send_periodic = 0


Alan Rubin
Technician Unix
DCS Midrange Services
Phone: +61 (08) 8999 6814
Fax:      +61 (08) 8999 7493
e-Mail: alan.rubin at nt.gov.au

             Mark Sapiro                                                        
             <mark at msapiro.net>                                                 
             07/08/2008 09:13 AM         Alan.Rubin at nt.gov.au,                  
                                         mailman-users at python.org               
                                         Re: [Mailman-Users] Digest options ->  
                                         list configuration                     

Alan.Rubin at nt.gov.au wrote:
>So, if digest_send_periodic is No (so that digests are not sent every day as
>indicated by the default senddigests cron entry), senddigests will not force
>list to send a new digest even with the -l option?


>If you host many lists and
>one list/customer wants messages sent only on a specific schedule, and you
>want to degrade the ability for the entire list server, then the only real
>option is to cook up some recipe which keeps mail intended for the list in a
>separate queue and only gets added to the list at the time that you want a
>digest created and sent?

There are other ways to address this. See below.

>To be more specific about my scenario, we are attempting to migrate from
>Majordomo to Mailman.  We have a list that sends out change control
>notifications on a twice weekly basis.  In the majordomo configuration,
>individual messages are collected in a work folder and when a Perl script
>'digests', written for majordomo, is run from cron, the messages in the work
>folder are gathered into a single digest message and sent to the list
>Perhaps I am taking the wrong approach with Mailman?  Is there another way to
>deliver a similar service without cooking up my own scheme, or has someone
>already contributed such a tool/scheme?

Here are a couple of possible approaches.

First the kludgy approach.

Set the crontab to run a script instead of cron/senddigests.

The script would be something like (warning! may have syntax errors)

for list in `$prefix/bin/list_lists --bare`; do
  if [[ $list != $special ]] ; then
    $prefix/cron/senddigests -l $list

Then have a separate crontab entry to run
   cron/senddigests -l the_special_listname

The more elegant IMO approach.

Set the list in question digest_send_periodic = No

Copy cron/senddigests to cron/senddigests2 or whatever name you like
and make sure the copy is chmod +x

Change line 85 in the copy from

        if mlist.digest_send_periodic:


        if True:

Then add a separate crontab entry to run
   cron/senddigests2 -l the_special_listname

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list