Subject: I would like to have avaliable a couple Hypermail variables.

From: "Randall S. Winchester" <[email-masked]>
Date: Wed, 7 Oct 2000 02:41:24 -0400 (EDT)

I am considering using Hypermail for a large number of automatically
generated lists. To ease installation woes, it would be helpful to have
some more generic capabilities for many of hypermails options.

I would like something like:

HM_LISTNAME listname

hm_listname = [ listname | NONE ]

-L <listname>
     This options specifies the name of the list being archived. This is a 
     convienent variable to have defined as it can be used as a cookie or
     environemntal variable in documentation references.

-H <hostname>
     Set this to the hostname you want  added  to  a  mail  
     address  appearing  in  the  RFC822  field which lack a
     hostname. It is usefull on the command line when servicing
     virtual hosts. 

%L - name of current list

%H - name of current host. Convienient for archiving with virtual hosting.

For example for a default .hmrc file:

hm_label = Hypermail discussion list for %L@%H
hm_archives = http://%H
hm_about = http://%H/%L
hm_dir = /var/hypermail/%H/%L/%y/%M
hm_ihtmlheaderfile = /var/hypermail/%H/%L/owner/idxheader.hyp
hm_ihtmlfooterfile = /var/hypermail/%H/%L/owner/idxfooter.hyp
hm_mhtmlheaderfile = /var/hypermail/%H/%L/owner/msgheader.hyp
hm_mhtmlfooterfile = /var/hypermail/%H/%L/owner/msgfooter.hyp
hm_hmail = %L@%H

And for those default header and footer .hyp files:

Welcome to the %L archive at %H.

To subscibe to this list send email to <A HREF="mailto:%L-request@%H"> with
the word "subscribe" on its on line in the message body.

Once subscribed, you can send mail to the list at <A HREF="mailto:%L@%H">.

If you have a content issue with something on the list, please mail to 
<A HREF="mailto:%L-owner@%H">

Does this seem reasonable enough? Mostly a more frequently used variable
substitution routine.

A more difficult endevor which could also be helpful would be to leverage
off of the case where %L is used in the hm_dir variable along with other
date formats (%y, %M, etc) being used. In this case, it would be nice to
have Hypermail generate the "homepage(s)" for the directory traversals on
the fly. The page would need to be created initially (-d option) and then
updated anytime a new directory was automaticaly created.

If this were done, then two addition .hyp files would be good:
hm_lhtmlheaderfile = /var/hypermail/%H/%L/owner/lstheader.hyp
hm_lhtmlfooterfile = /var/hypermail/%H/%L/owner/lstfooter.hyp

Probably put a link to my search engine in "hm_lhtmlfooterfile"....

Not sure how much of this has been discussed before, or how active
development is, having recently joined your list. Seems like a nice tool
though... I have alot of users who would appreciate Hypermail.

Randall

---

From: Kent Landfield <kent>
Date: Wed, 7 Oct 2000 10:32:06 -0500 (CDT)

# I am considering using Hypermail for a large number of automatically
# generated lists. To ease installation woes, it would be helpful to have
# some more generic capabilities for many of hypermails options.
# 
# I would like something like:
# 
# HM_LISTNAME listname
# 
# hm_listname = [ listname | NONE ]
# 
# -L <listname>
#      This options specifies the name of the list being archived. This is a 
#      convienent variable to have defined as it can be used as a cookie or
#      environemntal variable in documentation references.
# 
# -H <hostname>
#      Set this to the hostname you want  added  to  a  mail  
#      address  appearing  in  the  RFC822  field which lack a
#      hostname. It is usefull on the command line when servicing
#      virtual hosts. 

These are easy enough and needed for other reasons as well. The first (-L)
will need to be added completely while the (-H) is already there as DOMAINADDR,
hm_domainaddr. This was done since usually it is not a hostname that you want
there but instead is a domain name. It can be used either way.

# %L - name of current list
# %H - name of current host. Convienient for archiving with virtual hosting.

These would be very useful in the list's header and footer .hyp files.

I can see how this would be useful for virtual hosts. I could use it here
as well ;)  I do have some questions about the .hmrc file usage though.

# For example for a default .hmrc file:
# 
# hm_label = Hypermail discussion list for %L@%H
# hm_archives = http://%H
# hm_about = http://%H/%L
# hm_dir = /var/hypermail/%H/%L/%y/%M
# hm_ihtmlheaderfile = /var/hypermail/%H/%L/owner/idxheader.hyp
# hm_ihtmlfooterfile = /var/hypermail/%H/%L/owner/idxfooter.hyp
# hm_mhtmlheaderfile = /var/hypermail/%H/%L/owner/msgheader.hyp
# hm_mhtmlfooterfile = /var/hypermail/%H/%L/owner/msgfooter.hyp
# hm_hmail = %L@%H

What is done if there are no values for %H and %L when first encountered ?
It is possible to '#define LISTNAME "NONE"' in options.h, not set the
HM_LISTNAME environment variable and then find no hm_listname or hm_hostname
in the .hmrc file for the list. Then the above config file input would be
 
hm_label = Hypermail discussion list for @
hm_archives = http://
hm_about = http:///
hm_dir = /var/hypermail///%y/%M
hm_ihtmlheaderfile = /var/hypermail///owner/idxheader.hyp
hm_ihtmlfooterfile = /var/hypermail///owner/idxfooter.hyp
hm_mhtmlheaderfile = /var/hypermail///owner/msgheader.hyp
hm_mhtmlfooterfile = /var/hypermail///owner/msgfooter.hyp
hm_hmail = @

Should it bail if hypermail is called without a value in a substitution 
cookie ? Today it doesn't.

# Does this seem reasonable enough? Mostly a more frequently used variable
# substitution routine.

Yes it is quite reasonable.

# A more difficult endevor which could also be helpful would be to leverage
# off of the case where %L is used in the hm_dir variable along with other
# date formats (%y, %M, etc) being used. In this case, it would be nice to
# have Hypermail generate the "homepage(s)" for the directory traversals on
# the fly. The page would need to be created initially (-d option) and then
# updated anytime a new directory was automaticaly created.
# 
# If this were done, then two addition .hyp files would be good:
# hm_lhtmlheaderfile = /var/hypermail/%H/%L/owner/lstheader.hyp
# hm_lhtmlfooterfile = /var/hypermail/%H/%L/owner/lstfooter.hyp
# 
# Probably put a link to my search engine in "hm_lhtmlfooterfile"....

So... In essence be able to create a top level index for all the 
year/month directories ? For example, in the hypermail list archives
here I have two types of directories at the Top level, 

	1. hypermail generated archives separated by month/year,

        2. a mailbox directory that keeps a copy of the inbond messages 
           in unix mailboxes separated by month

Here is what I mean.

hypermail/mail-archive:
drwxr-xr-x   9 lists    daemon       512 Oct  6 11:48 2000
lrwxrwxrwx   1 kent     kent          13 Apr 23 23:45 index.html 
drwxr-xr-x   2 lists    daemon       512 Oct  2 20:27 mailbox

hypermail/mail-archive/2000:
drwxr-xr-x   2 lists    daemon      1536 Oct  6 11:31 Apr
drwxr-xr-x   2 lists    daemon      1024 Oct  6 11:33 Aug
drwxr-xr-x   2 lists    daemon       512 Oct  6 11:33 Jul
drwxr-xr-x   2 lists    daemon      1536 Oct  6 11:33 Jun
drwxr-xr-x   2 lists    daemon      1024 Oct  6 11:32 May
drwxrwxr-x   2 lists    daemon       512 Oct  7 10:12 Oct
drwxr-xr-x   2 lists    daemon      1536 Oct  6 11:34 Sep

hypermail/mail-archive/2000/Apr:
-rw-r--r--   1 lists    daemon      4678 Oct  6 11:31 0000.html
...
-rw-r--r--   1 lists    daemon      8813 Oct  6 11:31 author.html
-rw-r--r--   1 lists    daemon      7469 Oct  6 11:31 date.html
-rw-r--r--   1 lists    daemon      7753 Oct  6 11:31 index.html

/ftp/hypermail/mail-archive/2000/May:
/ftp/hypermail/mail-archive/2000/Jun:
/ftp/hypermail/mail-archive/2000/Jul:
/ftp/hypermail/mail-archive/2000/Aug:
/ftp/hypermail/mail-archive/2000/Sep:
/ftp/hypermail/mail-archive/2000/Oct:

/ftp/hypermail/mail-archive/mailbox:
-rw-r--r--   1 lists    daemon    159819 May 25 23:09 hypermail.9804
...
-rw-r--r--   1 lists    daemon     33048 Oct  7 10:12 hypermail.9810

So in this case I would need to create a Top level index in the 
hypermail/mail-archive directory that links in the entire archive.
I would then need to have a year index file in hypermail/mail-archive/2000
that linked in the separate months. The individual months are already 
handled. ;)  Then when I incorporate the ability for hypermail to
save a copy of the inbound message in mailbox format prior to generating
a html page for it, I'll need to have an index generated for that.
Is this the type of thing that we are talking about ?

Don't get me wrong... I'm trying to understand what we looking at
so that I can see how to make it generic enough to implement and administer.

# Not sure how much of this has been discussed before, or how active
# development is, having recently joined your list. 

The indexing has not been discussed as to how to do it right...
As of this morning, the TODO list has the following items on it about 
indexing.:

-----------
- Make it optional as to what, if any, indexes are generated.

- Make the formating of index pages use magic cookies for all parts of the
  page.

- Make it optional that a site generate index files with the listings
  sorted by date in one file and reverse sorted in the other index. 
  This pertains to all index types as well. For example:
     one thread-index with the newest mails topmost
     one thread-index with the oldest mails topmost
     one author-index in alphabetical order
     one author-index in reversed alphabetical or
     etc.

- Generate an index listing of all stored attachments. Also have links to 
  the mail that contained them. 
-----------

We need to discuss how it might be used so we can see what can be done
about improving it...

-- 
Kent Landfield                        Phone: 1-817-545-2502             
Email: [email-masked]             http://www.landfield.com/
Email: [email-masked]                   http://www.nfr.net/
Please send comp.sources.misc related mail to [email-masked]
Search the Usenet FAQ Archive at http://www.faqs.org/faqs/