[Mailman-Users] Digest options -> list configuration

Mark Sapiro mark at msapiro.net
Thu Aug 7 04:49:12 CEST 2008


Alan.Rubin at nt.gov.au wrote:
>
>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).


No.


>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.


Had it actually worked, lists/change_notification/digest.mbox would
have been removed.

I can't begin to guess what was wrong. You seem to have done everything
right. If there were some problem, there should have been something
written to your terminal/console.


>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:
>            mlist.Lock()
>            try:
>                try:
>                    mlist.send_digest_now()
>                    mlist.Save()
>                # 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' % \
>                        (listname,
>                         os.path.join(mlist.fullpath(), 'digest.mbox'),
>                         errmsg)
>            finally:
>                mlist.Unlock()
>
>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.


It needs to actually run as group mailman, and if you run it as you
did, the execute bit is not needed. Everything looks fine for running
it as you did, and if the permissions weren't adequate, you would have
gotten an error.


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


This shouldn't matter for senddigests_mod at all. It only affects
whether the normal senddigests will send a digest for this list, which
it won't with the above setting.

You could try adding a print so

        if True:
            mlist.Lock()
            try:

becomes

        if True:
            print 'Processing' + listname
            mlist.Lock()
            try:

just to be sure it's getting there. It should print

Processing change_notification

when you run it.

-- 
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