Mark,
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:
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.
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
<snip>
Regards,
Alan Rubin
Technician Unix
DCS Midrange Services
Phone: +61 (08) 8999 6814
Fax: +61 (08) 8999 7493
e-Mail: [EMAIL PROTECTED]
Mark Sapiro
<[EMAIL PROTECTED]>
To
07/08/2008 09:13 AM [EMAIL PROTECTED],
[email protected]
cc
Subject
Re: [Mailman-Users] Digest options ->
list configuration
[EMAIL PROTECTED] 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
the
>list to send a new digest even with the -l option?
Correct.
>If you host many lists and
>one list/customer wants messages sent only on a specific schedule, and you
don't
>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
called
>'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
>subscribers.
>
>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)
#!/bin/sh
prefix=/path/to/mailman
special=the_special_listname
for list in `$prefix/bin/list_lists --bare`; do
if [[ $list != $special ]] ; then
$prefix/cron/senddigests -l $list
fi
done
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:
to
if True:
Then add a separate crontab entry to run
cron/senddigests2 -l the_special_listname
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
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/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9