Home General Topics Qmail .. A brief introduction ..

Qmail .. A brief introduction ..

by SupportPRO Admin


Qmail is an MTA similar to Exim


Installation involves the following steps:

1.Installing Qmail itself

2.Installing EZmlm and EZmlm-idx

3.Installing Autoresponder

4.Installing Vpopmail

5.Installing maildrop

6.Uninstalling Sendmail

7.Starting up qmail

You may download these from http://www.qmailrocks.org/downloads/

mkdir /usr/local/src/qmail

Download all the zip folders to the folder qmail

cd /usr/src/qmail/qmail-1.03

make man && make setup check

./config-fast your_fqdn_hostname

(eg: ./config-fast mail.mydomain.com)


EZmlm is a nice mailing list add-on to Qmail

cd /usr/src/qmail/

tar zxvf ezmlm-0.53-idx-0.41.tar.gz

tar zxvf ezmlm-0.53-idx-0.41.tar.gz

make && make setup


cd /usr/src/qmail/

tar zxvf autorespond-2.0.5.tar.gz

cd autorespond-2.0.5

make && make install


Vpopmail is a set of programs for creating and managing multiple virtual domains on a qmail server, with full support for many POP/IMAP servers. A web interface to vpopmail is called Vqadmin

Create a vpopmail user and a vchkpw group

Set up the vpopmail mysql connection config file under the vpopmail users home directory.

echo localhost|0|vpopmailuser|password|vpopmail > ~vpopmail/etc/vpopmail.mysql

chown vpopmail:vchkpw ~vpopmail/etc/vpopmail.mysql

chmod 640 ~vpopmail/etc/vpopmail.mysql

Creating the Database User

Log into your MySQL server as root and type the following commands to create the database for vpopmail.

mysql> CREATE DATBASE vpopmail;

mysql> GRANT ALL ON vpopmail.* TO vpopmail@localhost IDENTIFIED BY yourpassword;

mysql> flush privileges;

cd /usr/src/qmail/

tar zxvf vpopmail-5.4.13.tar.gz

cd vpopmail-5.4.13

./configure enable-logging=p enable-auth-module=mysql disable-passwd enable-clear-passwd disable-many-domains enable-auth-logging enable-sql-logging enable-valias disable-mysql-limits

make && make install-strip


Maildrop is a mail filtering agent which can be used to filter messages as they arrive on the server.

cd /usr/src/qmail/

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

Removing Sendmail

rpm -qa | grep sendmail

If Sendmail is installed as an RPM, you will see an output similar to this:





If its installed as an RPM, you can uninstall Sendmail quite easily by running the following commands:

/etc/rc.d/init.d/sendmail stop (to stop Sendmail)

rpm -e nodeps sendmail-x.x.x.x

rpm -e nodeps sendmail-doc-x.x.x.x

rpm -e nodeps sendmail-devel-x.x.x.x

rpm -e nodeps sendmail-cf-x.x.x.x

If the RPM query produces no output, you most likely have a source install of Sendmail.

/etc/rc.d/init.d/sendmail stop (to stop Sendmail)

mv /usr/lib/sendmail /usr/lib/sendmail.old

mv /usr/sbin/sendmail /usr/sbin/sendmail.old

chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old

Establishing an artificial Sendmail path

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

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

Starting qmail

qmailctl stop

qmailctl start

You can find out how things are running by: qmailctl stat

You should see an output like this:

/service/qmail-send: up (pid 29956) 2 seconds

/service/qmail-send/log: up (pid 29960) 2 seconds

/service/qmail-smtpd: up (pid 29963) 2 seconds

/service/qmail-smtpd/log: up (pid 29968) 2 seconds

/service/qmail-pop3d: up (pid 29971) 2 seconds

/service/qmail-pop3d/log: up (pid 29972) 2 seconds

messages in queue: 0

messages in queue but not yet preprocessed: 0

Location of qmail logs




How can I decipher qmail logs?

1. Search the logs for info msg N: bytes M from SENDER entries.

2. Note the message ID, N.

3. Search forward for starting delivery K: msg N to remote/local RECIPIENT entries.

4. For each one you find before the first end msg N entry, youve discovered a recipient.

Article Authored by Junitha Mayana

Author, Junitha Mayana, is a Systems Engineer with SupportPRO. Junitha specializes in Level 2 and Level 3 Linux / Windows Administration. SupportPRO offers 24X7 technical support services to Web hosting companies and service providers.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment


Sales and Support

Phone: 1-(847) 607-6123
Fax: 1-(847)-620-0626
Sales: sales@supportpro.com
Support: clients@supportpro.com
Skype ID: sales_supportpro

Postal Address

1020 Milwaukee Ave, #245,
Deerfield, IL-60015

©2022  SupportPRO.com. All Rights Reserved