[Mailman-Users] Posting to a moderated list
CNulk at scu.edu
Mon Sep 14 18:44:56 CEST 2009
Mark Sapiro wrote:
> C Nulk wrote:
>> Now, I know I shouldn't be asking but... Is there a way to add on a
>> list-specific basis an entry similar to mm_cfg.py entries that I can
>> then use in a locally modified Handlers/Moderate.py to add an
>> accept_these_nonmembers type check before the membership check?
>> Basically, I want to add a accept_these_special_posters config entry
>> (list specific so I can use mlist....). Then modify Moderate.py to do a
>> matches_p(sender, mlist.accept_these_special_posters) before the if
>> mlist.isMember(sender): statement.
> You can add any list attributes you want. The quick and dirty way to do
> it is to modify Moderate.py to check if
> mlist.accept_these_special_posters exists and if so, do what you want.
> Then you can maintain the accept_these_special_posters attribute for a
> list with bin/withlist or bin/config_list.
:) Well, this was my first idea. Didn't know about using
bin/config_list or bin/withlist. Can either of them add any random
attribute? I'm not thinking of adding more, just curious.
> The right way to do it is to also modify MailList.py to create the
> accept_these_special_posters attribute for new lists with either an
> empty value or a Defaults.py setting (empty would be appropriate for
> this), modify Version.py to increment DATA_FILE_VERSION, modify
> versions.py to add the default accept_these_special_posters attribute
> to old lists that don't have it (based on DATA_FILE_VERSION), and
> modify Gui/Privacy.py to add the attribute and help for it so you can
> maintain it from the GUI.
After I posted my message and thought about doing the above changes, I
started looking at the source to add in the my attribute and allow me to
maintain it via the GUI. I was looking into changes for Gui/Privacy.py
but did not know about Version.py and versions.py. I also agree that an
empty value is an appropriate default value.
I should stop thinking but another question pop into my mind. Can I add
the attribute such that the site administrator can change it but the
list administrator(s) can see but cannot change the attribute? The
ability can even be configurable.
Thanks for you kind help Mark.
More information about the Mailman-Users