!!!WARNING!!!
This HOWTO (which should be named "misleading install guide that is too old to be taken seriously) no longer matches Oli's at pofo.de. Please direct your attention to lifewithqmail.org for better help and more details. (I'm only leaving this up until I can figure out how to gracefully remove it.)
SF - 2005-11-30
Chapter 1. Installation of the Necessary Programs
Copyright 2000, 2001, 2002, 2003 by Oliver Lehman
Translation 2002 by Steven N. Fettig
Modified: 6 August 2002 - Steven N. Fettig
Modified: 25 November 2002 - Steven N. Fettig
Modified: 21 January 2003 - Steven N. Fettig
Modified: 27 March 2003 - Steven N. Fettig
Modified: 18 February 2004 - Steven N. Fettig
The following HOWTO is provided for the installation of an email server. POP3, POP3 over ssl, IMAP4, and IMAP4 over ssl are the different service configurations in this document. Mail transport is done using SMTP. The authentication for the roaming use of SMTP is taken care of through a preauthorization check done when one authenticates via IMAP4 or POP3. It is assumed that for the purposes of the installation, one is using a current version of FreeBSD.
(Translators note: The translation of this document is more of a "recreation" of the original, not a true translation. It would have taken me much more time to use the exact language structure that Oliver Lehman has used, and I decided that the better purpose of this document would be to give non-German speaking peoples the opportunity to take a look at this wonderful HOWTO in English. So, this is a Steve-ization of Oliver's original writings and I offer my apologies where I have butchered his original document. I only hope to make this thorough and as close as possible to his original, but offer no promises ;) . I will also offer some personal notes, as I have found some issues with the setup of some services. Those notes will be in itallics and enclosed by [ ] brackets.)
This HOWTO was written with great care, however, there may be errors in the following document. I cannot be responsible for erroneous directions and their results and will not be held to any judicial proceedings. I am thankful for any suggestions or corrections.
1.1 Qmail
1.2 ucspi-tcp
1.3 daemontools
1.4 vpopmail
1.5 courier-imap
1.6 courier-imap Hack
1.7 ezmlm-idx
1.8 autorespond
1.9 qmail-conf
We will now discuss the compiling and installation of the necessary programs. Most of these programs will be available through the Ports system and make this part of the document fairly short. In later sections of this document, we will make the use of shell variables discussed here.
SRC_PATH
This variable contains the path in which software that is not a port will be temporarily stored and compiled. Please pay attention to which partition this path is located and make sure that you have enough space and write privileges to that path.
If you are using the Bourne Shell, you can set this variable using:
If you are using the C-Shell, you can set this variable using:
qmail is the Main Program. It takes care of the transmission of emails (both outgoing and incoming) along with the distribution of the email on your server.
make all install -DWITH_BIG_TODO_PATCH
make certificate
cp work/servercert.pem /var/qmail/control/servercert.pem
chmod 640 /var/qmail/control/servercert.pem
chown qmaild:qmail /var/qmail/control/servercert.pem
make clean
cp /etc/rc.conf /etc/rc.conf.bak
grep -v sendmail_enable /etc/rc.conf > /etc/rc.conf2
echo 'sendmail_enable="NONE"' >> /etc/rc.conf2
mv /etc/rc.conf2 /etc/rc.conf
rm /usr/sbin/sendmail
cp /var/qmail/bin/sendmail /usr/sbin/sendmail
With the help of ucspi-tcp, we can forego the use of the Internet Superserver (inetd).
make extract
cd work/
fetch http://www.qmail.org/ucspi-rss.diff
patch <ucspi-rss.diff
rm ucspi-rss.diff
cd ../
make install clean
In order to make the administration of the individual mail programs easier (POP3, SMTP, etc), daemontools will be used. In the case that a daemon/service is brought down or ended, daemontools will make sure that it is restarted within 5 seconds. (Thusly, killing your mail services would be senseless [- giving hackers no real victory if the services were brought down temporarily.])
make all install clean
Vpopmail administers all of the domains and the subsequent user accounts.
make all install clean
courier-imap handles the daemons related to IMAP, IMAP over SSL and POP3 over SSL.
make all install -DWITH_VPOPMAIL
cd work/courier-imap*/ && \
gmake install-configure && \
cd ../../
make clean
Because the SMTP after IMAP4(s)/POP3(s) of courier-imap does not work, here is a small wrapper. This "hack" tracks the IP of the authenticating user and allows for SMTP sending (i.e. a form of authenticated SMTP relay).
fetch http://www.pofo.de/HOWTO/qmail/files/open_relay.c
env VPOPMAILDIR=`pw usershow vpopmail | cut -f9 -d':'`/etc \
/bin/sh -c 'gcc -o open_relay open_relay.c \
`cat $VPOPMAILDIR/inc_deps $VPOPMAILDIR/lib_deps` -lcrypt'
install -o root -g wheel -m 755 open_relay /usr/local/bin/
The installation and use of mailing lists is made possible through ezmlm-idx.
make all install clean
cp /usr/local/etc/ezmlm/ezmlmrc.sample /usr/local/etc/ezmlm/ezmlmrc
Autorespond is, as the name implies, an autoresponder which allows an automatic return email to be sent to the original sender. [People often call this an "out of office" or "vacation message." If you plan on using a webmail interface, you should probably install an autoresponder, since I have found that many webmail interfaces require it's presence.]
make all install clean
qmail-conf makes the configuration of the POP3d, SMTPd and other qmail delivery daemon startup scripts much easier. [This is another area that I highly recommend. I have tried creating my own, only to find that these configuration scripts are better and use the daemon startup methodology that DJ Bernstein recommends.]
fetch http://www.din.or.jp/~ushijima/qmail-conf/qmail-conf-0.60.tar.gz
fetch http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
tar -xzf qmail-conf-0.60.tar.gz
cd qmail-conf-0.60
tar -xzf ../djbdns-1.05.tar.gz
make -f Makefile.ini
make
make setup check
For Chapter 2, click here
Comments (2)
what ports qmail uses to receive the e-mails?
Posted by özgür | December 26, 2003 3:31 AM
Posted on December 26, 2003 03:31
SMTP default 25, POP default 110, but you can setup PORT number in /service/pop3d/env/PORT, /service/smtpd/env/PORT
Posted by Dating | August 24, 2007 10:18 PM
Posted on August 24, 2007 22:18