![](https://secure.gravatar.com/avatar/9a30e3127414766f641a537437ba24a5.jpg?s=120&d=mm&r=g)
I have found the "defaults.py" and the "mm_cfg.py" files, and I've been able to change almost all the defaults we want to. I do have a problem with the archives. We would like it turned off, and can't get that part working. I have added/changed the following line in both files, but the lists are still being created with archives turned on.
ARCHIVE_TO_MBOX = -1
Any idea?
thanks
alan
![](https://secure.gravatar.com/avatar/0486cf9fb94e8cec8713e1aba06f587b.jpg?s=120&d=mm&r=g)
Alan Neiman wrote:
the defaults are used at list creation time to populate the new lists' configuration. The system doesn't defer back to the original defaults, so you'll need to adjust each of your current lists to turn off archiving.
Cheers, -g
-- Greg Stein, http://www.lyra.org/
![](https://secure.gravatar.com/avatar/ebb666325562d3790b5d78feae4b59c1.jpg?s=120&d=mm&r=g)
On a related subject, I need to write a script that creates a set of mail lists, and then sets them up with different configuration values. I have tried calling the 'admin.py' script in Mailman.Cgi but cannot figure out how to run it. I apologize for asking such a dumb (I know Python not...) question, but how do I invoke these and what format would the arguments be in?
Or is this the wrong way to do this? I would rather call existing code if I can.
Thanks!
JohnR
![](https://secure.gravatar.com/avatar/ab1c33fc0fd591a0ea174155233a6a51.jpg?s=120&d=mm&r=g)
"JR" == John Reekie <johnr@eecs.berkeley.edu> writes:
JR> On a related subject, I need to write a script that creates a
JR> set of mail lists, and then sets them up with different
JR> configuration values. I have tried calling the 'admin.py'
JR> script in Mailman.Cgi but cannot figure out how to run it. I
JR> apologize for asking such a dumb (I know Python not...)
JR> question, but how do I invoke these and what format would the
JR> arguments be in?
JR> Or is this the wrong way to do this? I would rather call
JR> existing code if I can.
I wouldn't call the scripts in Mailman/Cgi since they're primarily designed to be called from the wrapper script. Instead, study the code in the command line scripts in bin -- you'll have to know a bit of Python to do this, but it shouldn't be hard to figure out.
-Barry
![](https://secure.gravatar.com/avatar/ab1c33fc0fd591a0ea174155233a6a51.jpg?s=120&d=mm&r=g)
"AN" == Alan Neiman <alann@ihs.com> writes:
AN> I have found the "defaults.py" and the "mm_cfg.py" files, and
AN> I've been able to change almost all the defaults we want to.
AN> I do have a problem with the archives. We would like it
AN> turned off, and can't get that part working. I have
AN> added/changed the following line in both files, but the lists
AN> are still being created with archives turned on.
AN> ARCHIVE_TO_MBOX = -1
What's probably happening is that it /seems/ as if archiving is turned on because that's what's displayed on the Web pages. However, setting ARCHIVE_TO_MBOX in mm_cfg should effectively disable archiving. If I'm reading the code correctly, the attribute `archive' on the MailList object is what's displayed in the "Archive Messages?" value.
If this is false, then when a message reaches MailList.Post(), Archiver.ArchiveMail() is never called. Once in .ArchiveMail(), ARCHIVE_TO_MBOX further short circuits archiving.
Here's some pseudo code to explain what you could write to change this:
for listname in mymailinglists: mlist = MailList(listname) mlist.archive = 0 mlist.Save()
Hope that helps. -Barry
![](https://secure.gravatar.com/avatar/0486cf9fb94e8cec8713e1aba06f587b.jpg?s=120&d=mm&r=g)
Alan Neiman wrote:
the defaults are used at list creation time to populate the new lists' configuration. The system doesn't defer back to the original defaults, so you'll need to adjust each of your current lists to turn off archiving.
Cheers, -g
-- Greg Stein, http://www.lyra.org/
![](https://secure.gravatar.com/avatar/ebb666325562d3790b5d78feae4b59c1.jpg?s=120&d=mm&r=g)
On a related subject, I need to write a script that creates a set of mail lists, and then sets them up with different configuration values. I have tried calling the 'admin.py' script in Mailman.Cgi but cannot figure out how to run it. I apologize for asking such a dumb (I know Python not...) question, but how do I invoke these and what format would the arguments be in?
Or is this the wrong way to do this? I would rather call existing code if I can.
Thanks!
JohnR
![](https://secure.gravatar.com/avatar/ab1c33fc0fd591a0ea174155233a6a51.jpg?s=120&d=mm&r=g)
"JR" == John Reekie <johnr@eecs.berkeley.edu> writes:
JR> On a related subject, I need to write a script that creates a
JR> set of mail lists, and then sets them up with different
JR> configuration values. I have tried calling the 'admin.py'
JR> script in Mailman.Cgi but cannot figure out how to run it. I
JR> apologize for asking such a dumb (I know Python not...)
JR> question, but how do I invoke these and what format would the
JR> arguments be in?
JR> Or is this the wrong way to do this? I would rather call
JR> existing code if I can.
I wouldn't call the scripts in Mailman/Cgi since they're primarily designed to be called from the wrapper script. Instead, study the code in the command line scripts in bin -- you'll have to know a bit of Python to do this, but it shouldn't be hard to figure out.
-Barry
![](https://secure.gravatar.com/avatar/ab1c33fc0fd591a0ea174155233a6a51.jpg?s=120&d=mm&r=g)
"AN" == Alan Neiman <alann@ihs.com> writes:
AN> I have found the "defaults.py" and the "mm_cfg.py" files, and
AN> I've been able to change almost all the defaults we want to.
AN> I do have a problem with the archives. We would like it
AN> turned off, and can't get that part working. I have
AN> added/changed the following line in both files, but the lists
AN> are still being created with archives turned on.
AN> ARCHIVE_TO_MBOX = -1
What's probably happening is that it /seems/ as if archiving is turned on because that's what's displayed on the Web pages. However, setting ARCHIVE_TO_MBOX in mm_cfg should effectively disable archiving. If I'm reading the code correctly, the attribute `archive' on the MailList object is what's displayed in the "Archive Messages?" value.
If this is false, then when a message reaches MailList.Post(), Archiver.ArchiveMail() is never called. Once in .ArchiveMail(), ARCHIVE_TO_MBOX further short circuits archiving.
Here's some pseudo code to explain what you could write to change this:
for listname in mymailinglists: mlist = MailList(listname) mlist.archive = 0 mlist.Save()
Hope that helps. -Barry
participants (4)
-
Alan Neiman
-
Barry A. Warsaw
-
Greg Stein
-
John Reekie