[Mailman-Users] using a "per-list" subscribeack.txt file, w/ patch

George Hartzell hartzell at kestrel.alerce.com
Thu Apr 18 23:48:54 CEST 2002


There was some discussion recently about using a different
subscribeack file for each list.  The last word that I saw was a
proposed patch, and a comment that the patch didn't seem to actually
work.

Turned out that I needed this functionality, and managed to get it to
work.  Understand that I'm a perl programmer (hey, stop throwing
stuff!), and this is the first piece of Python code that I've *ever*
read, let alone touched.  Still, this seems to work.
~mailman/bin/version says: "Using Mailman version 2.0.9", but I didn't
do the install (it's in a verio VPS).

Anyway, here's the patch.  The one that I got from the list almost
worked, this differs in getting the name of the list from
self._internal_name and in passing self as a first argument.

If you try this and it blows up, I found the stuff in
~mailman/logs/errors to be useful.

Hope this help,

g.


===================================================================
RCS file: Deliverer.py,v
retrieving revision 1.1
diff -r1.1 Deliverer.py
49c49
<             'subscribeack.txt',
---
>             self.specwelcome(self._internal_name),
113a114,122
> 
>     def specwelcome(self, listname):
>         """Return special welcome file for `listname' if it exists."""
>         # If a special subscibeack.txt file exists in the lists home directory
>         # use that instead of the normal one specified in the templates dir
>         welcfile = os.path.join(mm_cfg.LIST_DATA_DIR, listname, 'subscribeack.txt')
>         if not os.path.exists(welcfile):
>            welcfile = "subscribeack.txt"
>         return welcfile
sjphoto% 





More information about the Mailman-Users mailing list