procmail
[Top] [All Lists]

www discussion page via procmail?

1997-01-25 09:49:35
"mailbox" == mailbox  <dnhunt(_at_)rain(_dot_)org> writes:

    mailbox> $HOME/somedirectory/somefile

hmmmm...  this is intriguing.  could this be used to set up a poor
person's www discussion page?  it might be an alternative for those who
aren't allowed to run cgi scripts, no?

say i put up a page about a topic i want to let people discuss.  for
arguments sake, "society for the advocacy of filming of a sequel to
'ishtar'".  on this page, i make a mailto: link that sends mail to
"safsi <jeff(_dot_)covey(_at_)pobox(_dot_)com>".  then i set up a recipe that 
matches

:0:
* !^X-Loop: jeff(_dot_)covey(_at_)pobox(_dot_)com
* ^TOsafsi <jeff(_dot_)covey(_at_)pobox(_dot_)com>

and then:

1. strips unnecessary headers from the message.

2. prepends the message with html head and body tags (perhaps
   extracting the message subject and inserting it in <TITLE>?) and a
   <PRE> tag.

3. places the closing </PRE> tag at the end of the message, some info
   on the group (eg., another mailto: link to "safsi
   <jeff(_dot_)covey(_at_)pobox(_dot_)com>"), and the closing </BODY> and 
</HTML> tags.

4. moves the resulting file into a publicly accessible html directory
   with a distinct filename with an .html extension.

5. does a "chmod 644" on the file if necessary.

then a link could be made on the main page directly to the directory
in which messages are kept.  #4 seems to me the hardest part; it would
be nice to use at least part of the subject of the message (say the
first 10 characters or so, converting blank spaces to underscores?) as
the filename, so it would be easy to see what each file is about.

the only thing i see really missing from this as opposed to cgi
discussion pages is that it wouldn't be possible to automatically
include the text of the original post in a followup.  other than that,
it could be quite sophisticated.  the "From:" header could wrap the
sender's name in a mailto: tag, so a reply could be made directly to
the author.  the pages could be as stylish as you liked, just by
inserting more html, and messages would automatically be grouped by
subject, due to their filenames.

does anyone have any thought on this, and suggestions on how it might
be done?

-- 

   _     ___ ___
  |_|___   _|  _| __ ___ _ _ ___ _ _ http://pobox.com/~jeff.covey/
  | | -_|  _|  _   _| . | | | -_| | |classical guitar
 _| |___|_|  _|   __|___|\_/ ___|_  |midi sequencing
|___|  jeff(_dot_)covey(_at_)pobox(_dot_)com      ___|music copying
 
for a list of files available from me, send me mail
with             send index          as the subject

southern dos: y'all reckon? (yep/nope)

<Prev in Thread] Current Thread [Next in Thread>