[Mailman-Users] External Archivers and listinfo page archive url

Todd Pfaff pfaff at edge.cis.mcmaster.ca
Thu Feb 24 22:25:50 CET 2000


On Thu, 24 Feb 2000, Rick Niess wrote:

>      You can change this in your web server's configuration.  I'll assume
> your using Apache.  When you setup Mailman, you had to add some Alias
> directives to your http.conf or srm.conf.  Ex:
> 
> Alias /pipermail/ /home/mailman/archives/public/
> Alias /mailman/archives/ /home/mailman/archives/public/
> 
> (The second is of my own doing for added URL continuity.) 

can you do this if you've already defined a ScriptAlias /mailman for the
cgi-bin programs as it recommends in the INSTALL doc?

this is why i sent a message a few days ago to this list and the
developers list, suggesting that the private cgi-bin program be modified
slightly to allow it to access public archives without authentication.
check the list archives, my message is in there.

the modifications to private.py are trivial and it has several advantages:

- makes the interfaces to archives, whether private or public, more
uniform
- eliminate the need for both an Alias and ScriptAlias in the web server
config
- eliminates the need for the archives/public directory of links

i'm using this method myself now on my mailman server with a
mhonarc/glimpse/wilma external archiver and the pipermail archiver
disabled.

i've attached the diff to mailman-1.1/Mailman/Cgi/private.py.

--
Todd Pfaff                         \  Email: pfaff at mcmaster.ca
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132                              \  FAX: (905) 528-3773
McMaster University                   \
Hamilton, Ontario, Canada  L8S 4M1     \
-------------- next part --------------
--- Mailman/Cgi/private.py.orig	Sun Jun 13 04:10:10 1999
+++ Mailman/Cgi/private.py	Sun Feb 20 23:31:04 2000
@@ -90,7 +90,7 @@
     try:
         path = os.environ['PATH_INFO']
     except KeyError:
-        doc.SetTitle("Private Archive Error")
+        doc.SetTitle("Archive Error")
         doc.AddItem(Header(3, "You must specify a list."))
         print doc.Format(bgcolor="#FFFFFF")
         sys.exit(0)
@@ -102,7 +102,7 @@
     list_info = Utils.GetPathPieces(path)
 
     if len(list_info) < 1:
-        doc.SetTitle("Private Archive Error")
+        doc.SetTitle("Archive Error")
         doc.AddItem(Header(3, "You must specify a list."))
         print doc.Format(bgcolor="#FFFFFF")
         sys.exit(0)
@@ -124,7 +124,7 @@
         listobj = None
     if not (listobj and listobj._ready):
         msg = "%s: No such list." % list_name
-        doc.SetTitle("Private Archive Error - %s" % msg)
+        doc.SetTitle("Archive Error - %s" % msg)
         doc.AddItem(Header(2, msg))
         print doc.Format(bgcolor="#FFFFFF")
         sys.exit(0)
@@ -140,24 +140,27 @@
 	if type(password) == type([]): password = password[0]
 	password = password.value
 
-    is_auth = 0
-    message = ("Please enter your %s subscription email address "
-               "and password." % listobj.real_name)
-    try:
-        is_auth = listobj.WebAuthenticate(user=user,
-                                          password=password,
-                                          cookie='archive')
-    except (Errors.MMBadUserError, Errors.MMBadPasswordError,
-            Errors.MMNotAMemberError): 
-        message = ('Your email address or password were incorrect. '
-                   'Please try again.')
-    except Errors.MMExpiredCookieError:
-        message = 'Your cookie has gone stale, ' \
-                  'enter password to get a new one.',
-    except Errors.MMInvalidCookieError:
-        message = 'Error decoding authorization cookie.'
-    except Errors.MMAuthenticationError:
-        message = 'Authentication error.'
+    if listobj.archive_private:
+        is_auth = 0
+        message = ("Please enter your %s subscription email address "
+                   "and password." % listobj.real_name)
+        try:
+            is_auth = listobj.WebAuthenticate(user=user,
+                                              password=password,
+                                              cookie='archive')
+        except (Errors.MMBadUserError, Errors.MMBadPasswordError,
+                Errors.MMNotAMemberError): 
+            message = ('Your email address or password were incorrect. '
+                       'Please try again.')
+        except Errors.MMExpiredCookieError:
+            message = 'Your cookie has gone stale, ' \
+                      'enter password to get a new one.',
+        except Errors.MMInvalidCookieError:
+            message = 'Error decoding authorization cookie.'
+        except Errors.MMAuthenticationError:
+            message = 'Authentication error.'
+    else:
+        is_auth = 1
     
     if not is_auth:
         # Output the password form


More information about the Mailman-Users mailing list