Paul H Byerly wrote: > I'd like to be able to set a list so the default setting for > "Conceal yourself from subscriber list?" is "Yes" rather than no. > Don't see an option for this in Defaults.py.
AFAIK, you need to set DEFAULT_NEW_MEMBER_OPTIONS. To change the default for concealing new members, you would subtract 16 from the current setting (256 by default). So, set DEFAULT_NEW_MEMBER_OPTIONS = 240 in mm_cfg.py and then all new lists will inherit this setting. To apply this to an existing list, I think you need a withlist script, but I could be wrong (I don't know mailman that well and I've had more than a few choice beverages so far tonight). If you do find that a withlist script is required, as I did when testing this, you might find the quickie I whipped up to be useful (which I ripped off completely from fix_url.py). I'll attach it, just in case you want it. The path to python might need adjusted, my local mailman install is on a Red Hat 7.3 box, where python 2 is installed as /usr/bin/python2. This will change the setting to DEFAULT_NEW_MEMBER_OPTIONS. If you want to change a list to something else, pass the --options argument to the script. Note that there's absolutely no checking done on the value you pass to this argument. HTH (and more importantly, I hope it works), -- Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp ====================================================================== Cogito cogito ergo cogito sum -- I think that I think, therefore I think that I am. -- Ambrose Bierce, "The Devil's Dictionary"
#! /usr/bin/python2 # # Copyright (C) 2001,2002 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Reset a list's new_member_options attribute to the default setting. This script is intended to be run as a bin/withlist script, i.e. % bin/withlist -l -r update_mem_opts listname [options] Options: -o / --options Set new_member_options to the value given. See the section on "Bitfield for user options" in Defaults.py for details. Without this option, the default web_page_url and host_name values are used. -v / --verbose Print what the script is doing. If run standalone, it prints this help text and exits. """ import sys import getopt import paths from Mailman import mm_cfg from Mailman.i18n import _ def usage(code, msg=''): print _(__doc__.replace('%', '%%')) if msg: print msg sys.exit(code) def update_mem_opts(mlist, *args): try: opts, args = getopt.getopt(args, 'o:v', ['options', 'verbose']) except getopt.error, msg: usage(1, msg) options = None verbose = 0 for opt, arg in opts: if opt in ('-o', '--options'): options = arg elif opt in ('-v', '--verbose'): verbose = 1 if options: new_member_options = options else: new_member_options = mm_cfg.DEFAULT_NEW_MEMBER_OPTIONS if verbose: print 'Setting new_member_options to %s' % new_member_options mlist.new_member_options = new_member_options if verbose: print _('Saving list') mlist.Save() mlist.Unlock() if __name__ == '__main__': usage(0)
pgp00000.pgp
Description: PGP signature
------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ This message was sent to: [EMAIL PROTECTED] Unsubscribe or change your options at http://mail.python.org/mailman/options/mailman-users/archive%40jab.org