qmail is an Internet Mail Transfer Agent (MTA) for UNIX-like
operating systems. It's a drop-in replacement for the Sendmail
system provided with UNIX operating systems. qmail uses the
Simple Mail Transfer Protocol (SMTP) to exchange messages with
MTA's on other systems.
qmail will install and run on most UNIX and UNIX-like systems,
but there are few requirements:
About 10 megabytes of free space in the build area during the
build. After the build, you can free all but 4 megabytes by
removing the object files.
A complete, functioning C development system including a
compiler, system header files, and libraries. The build
directions will show you how to tell if you've got the necessary
A few megabytes for the binaries, documentation, and
A safe filesystem for the queue. qmail's reliability guarantee
requires that the queue reside on a filesystem with traditional
BSD FFS semantics. Most modern local filesystems meet these
requirements with one important exception: the link() system
call is often asynchronous--meaning that the results of the
link() operation might not have been written to disk when the
link() call returns. Bruce Guenter's syncdir library can be used
to work around this problem. See syncdir in the Related Packages
appendix for more information.
Sufficient disk space for the queue. Small single-user systems
only need a couple megabytes. Large servers may need a couple
A compatible operating system. Most flavors of UNIX are
Access to a domain name server (DNS) is highly recommended.
Without one, qmail can only send to remote systems configured in
its smtproutes config file.
Adequate network connectivity. qmail was designed for
well-connected systems, so you probably don't want to try to use
it for a mailing list server on a 28.8k dial-up. The serialmail
package was designed to make qmail more compatible with
The above Debian Package contains the following patches
SMTP-AUTH for Debian Sarge 3.1 (Fixed)
qmail-dnsbl patch (added logging)
qmail-queue-custom-error.patch (for simscan)
The qmail-dnsbl patch lets the client authenticate (using any
method implemented), and then decides to perform the DNSBL check
looking at the authentication status before the DATA SMTP
command is performed.
If the check fails, the server closes the SMTP conversation
before receiving the mail. This avoids wasting resources.
The original qmail-smtpd program accepts by all messages,
checking later for the existence of the recipients. So, if the
message is delivered to a non-existant recipient a lot of
additional system work and network traffic is generated, with
several expensive bouncing if the sender is a fake.
chkuser has been developed with the goal to improve the
acceptance SMTP phase of qmail-smtpd.
qmail-smtpd patched with chkuser may check the existence of
e-mail recipients immediately in the SMTP acceptance phase of a
message and rejects instantly all the messages sent to
unexisting users, thus avoiding additional traffic, backscatter,
workload and messages bounced more times.
These goals are achieved by enquiring the existing vpopmail
archives (each format is supported: cdb, MySQL, LDAP, etc.) by
using standard vpopmail calls, or using customized chkuser
chkuser 2.0 has detailed logging of accepted and refused
recipients and senders, thus allowing a deeper analysis of
"who's sending to whom". This can facilitate any further
enhancements of anti-SPAM features.
Now we can create a database and a user which is allowed to
# mysqladmin -u root -p create vpopmail
# mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10 to server version:
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT ALL PRIVILEGES ON `vpopmail` . * TO 'vpopmail'@'localhost'
IDENTIFIED BY 'some_pass' WITH GRANT OPTION ;
Query OK, 0 rows affected (0.01 sec)
Now we need to install qmail, vpopmail,