Installing from RPMs

 < Free Open Study > 



If you're serious about qmail, you should install it from the source tar file for maximum control, flexibility, and knowledge. It's not trivial, but it's not really hard if you take your time and work carefully.

Casual Linux qmail installers might prefer to trade the in-depth understanding and fine-grained control of the tarball installation for the convenience of installing from an RPM package. qmail's licensing makes it difficult to distribute binary RPMs, so most qmail RPMs are source RPMs: bundles of scripts along with the original qmail source-code tarball. Installing a package from a source RPM is a two-stage process. First, a binary RPM is built from the source RPM, and, second, the binary RPM is installed.

As with the tarball installation, most qmail RPMs require the installation of additional support packages such as tcpserver and daemontools.

Choosing an RPM

Source RPMs build the included package directly from the source code. To do this, they—or the creator—must make the same decisions required of a person building manually. These decisions include compile-time configuration options, the locations of installed files, and optional source-code "patches" that alter qmail's behavior. As a result, each source RPM package has a kind of personality that reflects the packager's philosophy. Some packagers take a minimalist approach, taking the defaults whenever possible and doing everything in the most "standard" way they can. (Whether they follow the qmail standards or the Red Hat standards is another matter.) Others take the opportunity to express their personal preferences in their packaging: doing things the way they like them done and including patches they like.

Finding an RPM compatible with your preferences can be a daunting and frustrating task, especially if you have strong feelings about how qmail should be installed. If you care much about these things, you're probably better off doing a tarball installation.

For this example, we're going to use the qmail+patches RPM packaged by Bruce Guenter because it's fairly consistent with the tarball installation documented in this chapter. It uses the daemontools and ucspi-tcp support packages for reliable, high-performance mail service suitable for a wide range of applications.

Assumptions

For these instructions we assume you're installing qmail under Red Hat Linux 7.1 on a computer with an Intel or Intel-compatible processor. We also assume that the system is fully installed and configured, including the complete development environment and network with access to a domain name service (DNS) resolver. You'll also need a few megabytes of free disk space, mostly under the /usr directory.

If the installation fails for any reason, it's likely that your system doesn't meet one of these assumptions. Troubleshooting the deficiency is beyond the scope of this book, but numerous online Linux support forums are available for assistance such as the comp.os.linux.admin Usenet newsgroup.

Downloading the RPMs

The qmail+patches Web page (http://untroubled.org/qmail+patches/FEATURES.html) details the features and prerequisites of the qmail+patches RPM and contains links to the files you'll need to download, currently:

 http://www.untroubled.org/supervise-scripts/supervise-scripts-3.3-1.noarch.rpm http://www.untroubled.org/rpms/daemontools/rh7.1/daemontools-0.70-3.i386.rpm http://www.untroubled.org/rpms/ucspi-tcp/ucspi-tcp-0.88-1.i386.rpm http://www.untroubled.org/ucspi-unix/ucspi-unix-0.34-1.i386.rpm http://www.untroubled.org/qmail+patches/current/qmail-1.03+patches-18.src.rpm 

Using your Web browser, download these packages to your system into the /root directory.

Installing the RPMs

First, install the RPMs for the support packages. As user root

 # cd # rpm -i ucspi-tcp-0.88-1.i386.rpm # rpm -i daemontools-0.70-3.i386.rpm # rpm -i ucspi-unix-0.34-1.i386.rpm # rpm -i supervise-scripts-3.3-1.noarch.rpm # 

Now build the binary qmail+patches RPM:

 # rpm --rebuild qmail-1.03+patches-18.src.rpm Installing qmail-1.03+patches-18.src.rpm Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.92316 + umask 022 + cd /usr/src/redhat/BUILD et cetera 

This will generate a great deal of output and will take a couple of minutes on a modern computer. If everything goes according to plan, the last few lines of output should look something like this:

 Executing (--clean): /bin/sh -e /var/tmp/rpm-tmp.90540 + umask 022 + cd /usr/src/redhat/BUILD + rm -rf qmail-1.03 + exit 0 # 

Install the newly built binary RPM:

 # rpm -i /usr/src/redhat/RPMS/i386/qmail-1.03+patches-18.i386.rpm Read /usr/share/doc/README.service for instructions on starting and stopping qmail services. # 

At this point, if you're running another MTA and it's listening to the SMTP port (25), you'll need to disable it. For example, to stop Sendmail:

 # /etc/rc.d/init.d/sendmail stop # 

If you're running some MTA other than Sendmail, consult your documentation for details on stopping it cleanly.

If you don't need the old MTA, it's a good idea to remove it completely:

 # rpm -e --nodeps sendmail # 

Now that port 25 is free, add an SMTP service:

 # svc-add /var/qmail/service/smtpd # 

qmail is now fully installed and running. See the "Testing the Installation" section of the tarball installation instructions for details on verifying the correct operation of your installation.

Caveats

If you install from RPMs, there are a few things you should be aware of:

  • qmail+patches includes a patch to implement message logging, so each message is copied to msglog.

  • By default, logging is done using Syslog, not multilog, so the location of the logs will be determined by /etc/syslog.conf.

  • The default delivery instructions are configured in control/aliasemtpy, which is functionally equivalent to the control/defaultdelivery control file introduced in the "Installing qmail Step by Step" section of this chapter.

Table 2-6 shows where the files are installed using the qmail+patches RPM and the tarball instructions earlier in this chapter.

Table 2-6: Installation Directory Comparison for qmail+patches vs. Tarball

qmail+PATCHES

TARBALL

DESCRIPTION

/bin/checkpassword

None

POP password checker

/etc/cron.hourly/qmail

None

Cron job to rebuild qmail-users database

/etc/profile.d

None

Login scripts

/etc/qmail/alias

/var/qmail/alias

System aliases

/etc/qmail/control

/var/qmail/control

Control files

/etc/qmail/owners

None

Files containing qmail UIDs and GIDs

/etc/qmail/users

/var/qmail/users

qmail-users' files

/etc/tcpcontrol

/etc

TCP access control

/usr/bin

/var/qmail/bin

qmail programs

/usr/share/doc/qmail-1.03 +patches

/var/qmail/doc

Documentation files

/usr/share/man

/var/qmail/man

man pages

/var/qmail/queue

/var/qmail/queue

Queue

/var/qmail/service

/var/qmail/supervise

Run scripts



 < Free Open Study > 



The Qmail Handbook
The qmail Handbook
ISBN: 1893115402
EAN: 2147483647
Year: 2001
Pages: 186
Authors: Dave Sill

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net