[Mailman-Users] Digest options -> list configuration

Alan.Rubin at nt.gov.au Alan.Rubin at nt.gov.au
Thu Aug 7 06:22:05 CEST 2008


Mark,

I put in the print line and there was no output when I ran the script.  And no
success either.

Regards,

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>                                                 
             Sent by:                                                        To 
             mailman-users-bounc         Alan.Rubin at nt.gov.au,                  
             es+alan.rubin=nt.go         mailman-users at python.org               
             v.au at python.org                                                 cc 
                                                                                
                                                                        Subject 
             07/08/2008 12:19 PM         Re: [Mailman-Users] Digest options ->  
                                         list configuration                     
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                




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

------------------------------------------------------
Mailman-Users mailing list
Mailman-Users at python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/alan.rubin%40nt.gov.au

Security Policy: http://wiki.list.org/x/QIA9




More information about the Mailman-Users mailing list