ezmlm-browse

24 July 2012 Roberto Puzzanghera0 comments

ezmlm-browse is a web interface for browsing ezmlm-idx archives.

For newbies: this topic is not essential and is advanced. You may skip this step and come back later.

Download the package in a folder not visible by apache

cd /path/apache/htdocs
wget http://untroubled.org/ezmlm-browse/ezmlm-browse-0.20.tar.gz
tar xzf ezmlm-browse-0.20.tar.gz
ln -s ezmlm-browse-0.20 ezmlm-browse
cd ezmlm-browse
chown -R root.root .

Check the files ezmlm-browse/conf-* files and adjust them to your system. Now run make:

make

Create a directory visible from the web:

mkdir wwwroot
cd wwwroot
ln -s ../ezmlm-browse.ini 

Symlink "browse.cgi" into that directory as "index.cgi" if your site is using Apache suexec or equivalent.  Otherwise symlink "wrapper" in as "index.cgi" and make it setuid to a user that has access to the lists archive (vpopmail in our case):

chmod u+s ../wrapper
chown vpopmail.vchkpw ../wrapper
ln -s ../wrapper index.cgi

Now setup apache:

        DocumentRoot /usr/local/www/htdocs/ezmlm-browse/wwwroot
        ServerName lists.yourdomain.net
        <Directory "/usr/local/www/htdocs/ezmlm-browse/wwwroot">
            AllowOverride AuthConfig 
            Options +ExecCGI
            AddHandler cgi-script .cgi
            DirectoryIndex index.cgi
            Order allow,deny
            Allow from all
        

Point the browser to: http://lists.yourdomain.net and this is the look of ezmlm-browse:

ezmlm-browse

If you don't like the serif default font and the null padding inside the tables' cells, you can easily adjust the css located in ezmlm-browse/files/browse.css. I modified the body tag and very first lines as follows:

# nano /usr/local/www/htdocs/ezmlm-browse/files/browse.css

BODY { background: #efeff7; color: #000000; font-family: Arial, Helvetica, sans-serif;}

a:link, a:visited {text-decoration: none;}
a:hover {text-decoration: underline;}

h1, div, td, th {padding: 7px;}

and this is the result:

ezmlm-browse

Showing your lists to the public

Once you have created your lists with qmailadmin or ezmlm-web, you can define the lists that will be visible to the public modifying as follow the ezmlm-browse.ini file:

[archive:test]
listdesc = Test list
listdir = /home/vpopmail/domains/yourdomain.net/test
listemail = test@yourdomain.net
listsub = test-subscribe@yourdomain.net

Be aware that the subscription address must be like listname-subscribe@yourdomain.net.

Be carefull: non ASCII characters in listdesc throws Python in error. Use html syntax instead.

Installing Python

In case your version of Python is earlier than 2.6 you have to update/install it:

cd /usr/local/src
wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tar.bz2
tar xjvf Python-2.7.1.tar.bz2
cd Python-2.7.1
chown -R root.root .

./configure
make
make install
ldconfig

# python --version
Python 2.7.1

Add a comment