Publish ezmlm list archives

From The Network People, Inc. - Wiki
Jump to navigation Jump to search

Q. I created a mailing list using qmailadmin and selected "web archive". How do I publish that archive on my web site?


Method #1: ezmlm-cgi

The Ezmlm package comes with ezmlm-cgi, a program for doing just that. Since all your email lists on a Mail Toaster are managed by qmailadmin, they are owned by the vpopmail user. Your web server will need access to the files so you need to install ezmlm-cgi suid vpopmail. A very basic example of this might be:

chdir /usr/local/www/cgi-bin
cp /usr/local/bin/ezmlm-cgi ezmlm.cgi
chown vpopmail:vchkpw ezmlm.cgi
chmod 4755 ezmlm.cgi

Then you must edit /usr/local/etc/ezcgirc and set up the list parameters.

more /usr/local/etc/ezmlm/ezcgirc
0;89;/to/vpopmail/domains/simerson.net/mail-toaster;-mail-toaster@simerson.net;[Toaster Home]=http://mail-toaster.org/

Read the man page (man ezmlm-cgi) for additional instructions on how to set up and use it.

The pages are quite spartan in appearance and there are no search facilities. I have used external applications such as mnogosearch to index the web pages generated by ezmlm-cgi but that is no longer necessary. See ezmlm-www below. :-)


Method #2: ezmlm-www

ezmlm-www

Ezmlm-www is a nifty little program that generates very attractive web pages with your email list posts displayed. But even better, it can use a couple different indexing engines (KinoSearch or Plucene) to make your lists searchable.

I have the Mail Toaster email list set up using this software.

Getting it set up to run as documented with the setuid c wrapper running as vpopmail didn't work. So I set up an rsync process to copy the real list directory into a duplicate that is owned by www. I installed a simple shell script to update the search index each night.


#!/bin/sh
#
#  by Matt Simerson <matt at tnpi.net>
#  last update: Feb 9, 2007
#
# Usage:
#  edit VPOP_DOMS, EZMLM_WWW_DIR, and 
#  install in etc/periodic/daily with 0755 permissions
#
HOST_NAME=`uname -n`
LIST_NAME=mail-toaster
LIST_DOMAIN=simerson.net
PREFIX=/usr/local
VPOP_DOMS=/usr/local/vpopmail/domains
EZMLM_WWW_DIR=/usr/local/www/toaster-list
# this should be left alone
echo 
echo "making backup of list with www permissions"
sleep 2 
RUN_CMD="$PREFIX/bin/rsync -av --no-owner $VPOP_DOMS/$LIST_DOMAIN/$LIST_NAME/   $EZMLM_WWW_DIR/list/"
echo $RUN_CMD
$RUN_CMD
echo ""
echo "updating search index"
sleep 2
RUN_CMD="$EZMLM_WWW_DIR/search/ez_indexer.pl -u"
echo $RUN_CMD
$RUN_CMD