<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>QmailWithEzmlm</title><revhistory><revision><revnumber>4</revnumber><date>2008-03-18 17:28:10</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>3</revnumber><date>2008-01-24 17:17:54</date><authorinitials>ac3bf1</authorinitials></revision><revision><revnumber>2</revnumber><date>2008-01-24 16:11:54</date><authorinitials>richmond.richmond.ac.uk</authorinitials></revision><revision><revnumber>1</revnumber><date>2008-01-24 13:04:05</date><authorinitials>ac3bf1</authorinitials></revision></revhistory></articleinfo><section><title>Copy-Paste HowTo For qmail with ezmlm for Mailing List Management</title><para>Tested on Ubuntu  </para><para>Note: This is not MY work, I am just readapting a tutorial from <ulink url="http://www.qmailrocks.org/checklist.php">qmailrocks.org</ulink> </para><para>Note2: This is a bad tutorial and use it at your own risk... It is mainly done in NOTE FORM and there is not much explenation of WHAT is being done... I suggest you refer to <ulink url="http://www.qmailrocks.org/">qmailrocks.org</ulink> for the complete version <inlinemediaobject><imageobject><imagedata depth="16" fileref="http://wiki.ninux.org//moin_static197/ninuxtheme02/img/smile.png" width="16"/></imageobject><textobject><phrase>:-)</phrase></textobject></inlinemediaobject> </para><section><title>WORK IN PROGRESS</title><para>Install packages </para><screen><![CDATA[apt-get install apache2 php5 mysql-server phpmyadmin php5-mysql php5-cgi gcc g++ libc6-dev libc-dev libmudflap0-dev sudo make openssl libssl-dev patch patchutils]]></screen><para>If you are asking why gcc AND g++, here is the answer: </para><para> g++ i figured is required for Maildrop which is one of the steps in this tutorial </para><para>Remove the following Packages </para><itemizedlist><listitem><para>Postfix - uninstall it or disable it </para></listitem><listitem><para>Any POP service - This includes Qpopper or any POP service that may be running out of xinetd. If your're server has a POP service running, you will need to disable it. </para></listitem><listitem><para>Any SMTP services </para></listitem><listitem><para>It's ok to have Sendmail installed, because we'll uninstall it during the qmail installation. </para></listitem></itemizedlist><para>Perl Modules Needed: </para><itemizedlist><listitem><para>Digest::SHA1 </para></listitem><listitem><para>Digest::HMAC </para></listitem><listitem><para>Net::DNS </para></listitem><listitem><para>Time::<ulink url="http://wiki.ninux.org/QmailWithEzmlm/HiRes#">HiRes</ulink> </para></listitem><listitem><para>HTML::Tagset </para></listitem><listitem><para>HTML::Parser </para></listitem></itemizedlist><para>Firewall ports to be opened: </para><itemizedlist><listitem><para>Outbound ports (tcp) </para><itemizedlist><listitem><para>25 - SMTP </para></listitem><listitem><para>110 - POP services </para></listitem><listitem><para>143 - IMAP </para></listitem><listitem><para>783 - Spamassassin </para></listitem><listitem><para>993 - IMAPS </para></listitem></itemizedlist></listitem><listitem><para>Inbound Ports (tcp) </para><itemizedlist><listitem><para>25 - SMTP </para></listitem><listitem><para>80 - HTTP </para></listitem><listitem><para>110 - POP services </para></listitem><listitem><para>143 - IMAP </para></listitem><listitem><para>443 - HTTPS </para></listitem><listitem><para>783 - Spamassassin </para></listitem><listitem><para>993 - IMAPS </para></listitem></itemizedlist></listitem></itemizedlist><screen><![CDATA[mkdir /downloads
cd /downloads
wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
tar zxvf qmailrocks.tar.gz]]></screen><para>see <ulink url="http://www.qmailrocks.org/download.htm">here</ulink> for more details </para><para>Next run these scripts </para><screen><![CDATA[cd /downloads/qmailrocks/scripts/install
./qmr_install_linux-s1.script
cd /downloads/qmailrocks/scripts/util
./qmail_big_patches.script]]></screen><para>If all ok proceed </para><para>Build qmail </para><screen><![CDATA[cd /usr/src/qmail/qmail-1.03
make man && make setup check
./config-fast your_fqdn_hostname (ex: ./config-fast mail.mydomain.com)]]></screen><para>Create a certificate </para><screen><![CDATA[make cert]]></screen><para>Set right ownership </para><screen><![CDATA[chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem]]></screen><para>build ucspi-tcp... </para><screen><![CDATA[cd /usr/src/qmail/ucspi-tcp-0.88/
make && make setup check]]></screen><para>If you get an error do as follows: </para><screen><![CDATA[cd /usr/src/qmail/ucspi-tcp-0.88/
patch < /downloads/qmailrocks/patches/ucspi-tcp-0.88.errno.patch
make && make setup check]]></screen><para>Should be ok now... (at least for me...) </para><para>build the daemontools.... </para><screen><![CDATA[cd /package/admin/daemontools-0.76
package/install]]></screen><para>Again if you get an error, run this (IT IS DIFFERENT FROM THE ONE ABOVE): </para><screen><![CDATA[cd /package/admin/daemontools-0.76/src
patch < /downloads/qmailrocks/patches/daemontools-0.76.errno.patch
cd /package/admin/daemontools-0.76
package/install]]></screen><para>Check if &quot;svscanboot&quot; is running: </para><screen><![CDATA[ps -aux | grep svs]]></screen><para>You should get something like this: </para><screen><![CDATA[root      6576  0.0  0.2   2640  1256 ?        Ss   12:50   0:00 /bin/sh /command/svscanboot
root      6587  0.0  0.1   2852   708 pts/1    S+   12:53   0:00 grep svscanboot]]></screen><para>Note: The second one is just the grep command... the first is what you are looking for. </para><para>Install ezmlm </para><screen><![CDATA[cd /downloads/qmailrocks/
tar zxvf ezmlm-0.53-idx-0.41.tar.gz
cd ezmlm-0.53-idx-0.41
make && make setup]]></screen><para>Install autoresponders </para><screen><![CDATA[cd /downloads/qmailrocks
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
make && make install]]></screen><para>Here I will install vpopmail WITHOUT MySQL support, </para><para> if you wish to integrate MySQL support into vpopmail (usually for handling several domains - ie. more than 50 let-s say - then please follow the instructions from <ulink url="http://www.qmailrocks.org/vpopmail.htm">this page</ulink>. Thanks. </para><para>Configure Vpopmail </para><para>see ./configure --help for all config options, otherwise... </para><screen><![CDATA[./configure --enable-logging=p
make && make install-strip]]></screen><para>Vqadmin </para><screen><![CDATA[cd /downloads/qmailrocks
tar zxvf vqadmin-2.3.6.tar.gz
cd vqadmin-2.3.6
./configure --enable-cgibindir=/path/to/your/cgi-bin --enable-htmldir=/path/to/your/html/directory
(Example: ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html )
make && make install-strip]]></screen><para>add the following to your server's Apache configuration file (usually httpd.conf) </para><screen><![CDATA[<Directory "/path/to/your/cgi-bin/vqadmin">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow
</Directory>]]></screen><para>In addition, within the Apache master config file you will want to set the &quot;<ulink url="http://wiki.ninux.org/QmailWithEzmlm/AllowOveride#">AllowOveride</ulink>&quot; option to &quot;All&quot;. Example: <ulink url="http://wiki.ninux.org/QmailWithEzmlm/AllowOverride#">AllowOverride</ulink> All </para><para><code> cd /path/to/your/cgi-bin/vqadmin </code> </para><para>Now you will want to create a .htaccess file to password protect the Vqadmin interface. There should already be a .htaccess file in the vqadmin directory, so all you need to do is configure it. We'll use the ever useful vi editor for this. </para><para><code> vi .htaccess </code> </para><screen><![CDATA[AuthType Basic
AuthUserFile /path/to/where/you/want/to/store/the/password/file/.htpasswd
AuthName vQadmin
require valid-user
satisfy any]]></screen><para><code> chown apache .htaccess </code> (you may need to change the chown to either &quot;nobody&quot;, &quot;apache&quot; or &quot;www&quot; etc., depending on what user your installation of Apache is running as) </para><para><code> chmod 644 .htaccess </code> </para><para>Now you need to create a corresponding .htpasswd file that's going to contain the username and encrypted password for the Vqadmin administrator... </para><screen><![CDATA[htpasswd -bc /path/to/where/you/want/to/store/the/password/file/.htpasswd admin admin_password
chmod 644 /path/to/where/you/want/to/store/the/password/file/.htpasswd]]></screen><para>Go to: <ulink url="http://www.yourdomain.com/cgi-bin/vqadmin/vqadmin.cgi"/> log in with user admin and the password you provided... </para><para>If you get a 500 Internal Server Error try this: Go to where you stored the .htpasswd file and <code> cp .htpasswd vqadmin.passwd </code> Assign the right ownership to it, mine looks like this: </para><screen><![CDATA[-rw-r--r-- 1 www-data www-data   20 2008-01-24 14:31 vqadmin.passwd]]></screen><para>Maildrop </para><screen><![CDATA[cd /downloads/qmailrocks
tar zxvf maildrop-1.6.3.tar.gz
cd maildrop-1.6.3
./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw --enable-maildirquota
make && make install-strip && make install-man]]></screen><para>Qmailadmin </para><screen><![CDATA[cd /downloads/qmailrocks
tar zxvf qmailadmin-1.2.9.tar.gz
cd qmailadmin-1.2.9
./configure --enable-cgibindir=/path/to/your/cgi-bin --enable-htmldir=/path/to/your/html/directory]]></screen><para>note: The paths in the above configure script will need to be custom tailored to your systems configuration </para><screen><![CDATA[make && make install-strip]]></screen></section></section></article>