Qmail Installation

Home » Computer Articles » Linux » Qmail Installation
May 23, 2008 Linux No Comments


NOTE: the following needs to be done as root user and only if not installed.

Download qmail-1.03.tar.gz or higher from

Installing Qmail

NOTE: the following needs to be done as root user.

Create the qmail home directory: Type mkdir /var/qmail You must set up the qmail group and the qmail users before compiling the programs.

groupadd -g 2108 nofiles
useradd -g nofiles -d /var/qmail/alias alias
useradd -g nofiles -d /var/qmail qmaild
useradd -g nofiles -d /var/qmail qmaill
useradd -g nofiles -d /var/qmail qmailp
groupadd -g 2107 qmail
useradd -g qmail -d /var/qmail qmailq
useradd -g qmail -d /var/qmail qmailr
useradd -g qmail -d /var/qmail qmails

Compile the programs and create the qmail directory tree: make setup check
Extract the downloaded file, tar -zxvf qmail-1.03.tar.gz
Change into the qmail directory, cd qmail-1.03
Run these commands for the install:
Make sure the new Mail server is in your DNS. ./config

Run these commands for some basic aliases:

(cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root)
chmod 644 ~alias/.qmail*

cp /var/qmail/boot/home /var/qmail/rc.

To test qmail deliveries (won't interfere with sendmail):

Enable deliveries of messages injected into qmail:

csh -cf '/var/qmail/rc &'

Add qmail to services in Webmin

csh -cf '/var/qmail/rc &'

Make qmail's ``sendmail'' wrapper available to MUAs:

ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

Reboot. (Or kill -HUP your inetd and make sure the qmail daemons are running.)

To remove Sendmail,

rpm -e sendmail
Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.