On 09/02/2016 08:59 AM, Matt Morgan wrote:
> I think I understand this but I'm hoping someone can help confirm I got it
> right.
>
...
>
> Do I have that all correct?
Yes.
Also, note that the --listname option to senddigests may be repeated to
do multiple named lists.
You could implement a --exceptlistname option in cron/senddigests. It
wouldn't be hard. A patch is attached. I like it so much it will be in
2.1.24 <https://bugs.launchpad.net/mailman/+bug/1619770>.
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
=== modified file 'cron/senddigests'
--- cron/senddigests 2008-06-29 20:31:47 +0000
+++ cron/senddigests 2016-09-02 18:22:49 +0000
@@ -28,7 +28,12 @@
-l listname
--listname=listname
Send the digest for the given list only, otherwise the digests for all
- lists are sent out.
+ lists are sent out. May be repeated to do multiple lists.
+
+ -e listname
+ --exceptlist listname
+ Don't send the digest for the given list. May be repeated to skip
+ multiple lists.
"""
import os
@@ -63,22 +68,31 @@
def main():
try:
- opts, args = getopt.getopt(sys.argv[1:], 'hl:', ['help', 'listname='])
+ opts, args = getopt.getopt(sys.argv[1:], 'hl:e:',
+ ['help', 'listname=', 'exceptlist='])
except getopt.error, msg:
usage(1, msg)
if args:
usage(1)
+ exceptlists = []
listnames = []
for opt, arg in opts:
if opt in ('-h', '--help'):
usage(0)
elif opt in ('-l', '--listname'):
listnames.append(arg)
+ elif opt in ('-e', '--exceptlist'):
+ exceptlists.append(arg)
if not listnames:
listnames = Utils.list_names()
+ for listname in exceptlists:
+ try:
+ listnames.remove(listname)
+ except ValueError:
+ pass
for listname in listnames:
mlist = MailList.MailList(listname, lock=0)
------------------------------------------------------
Mailman-Users mailing list [email protected]
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org