Mail server network protocol front-ends
Bruce Guenter <>
Version 2.01

This is mailfront, a package containing customizeable network front-ends
for mail servers.  It contains complete SMTP, QMQP, QMTP, and POP3
front-ends as well as an authentication module for IMAP.  The mail
delivery front-ends also contain internal address filtering features.

Two SMTP back-ends are provided.  One delivers mail to qmail-queue,
mimicking most of the behavior of qmail-smtpd, with the addition of
support for SMTP AUTH.  The other rejects all SMTP commands if
$SMTPREJECT is set, and execs its command line otherwise (in order to
run the above program).

A mailing list has been set up to discuss this and other packages.
To subscribe, send an email to:
A mailing list archive is available at:

Development versions of mailfront are available at:


- bglibs version 1.101
- cvm version 0.82
- Lua version 5 or later (optional)


- Build the sources by running "make".
- To build the Lua plugin, run "make lua".
- After the package has been compiled, run "make install" as root.


- To take advantage of the SMTP AUTH features, make sure you have a CVM
  authentication program (some are included with the cvm package itself).
- Run a CVM authentication module to provide the AUTH feature.
  Example:  To run cvm-vmailmgr as a daemon:
    exec /usr/local/bin/softlimit -m 9000000 \
     /usr/local/bin/cvm-vmailmgr /tmp/.cvm-vmailmgr 2>&1
- Configure your mail system to use the SMTP back-end with the
  appropriate environment variables.

  Example using tcpserver (highly recommended):
    QMAILDUID=`id -u qmaild`
    NOFILESGID=`id -g qmaild`
    MAXSMTPD=`head -1 /var/qmail/control/concurrencyincoming`
    if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" ]; then
        echo $0: QMAILDUID, NOFILESGID, or MAXSMTPD is unset
        exit 1
    exec \
    /usr/local/bin/envdir /etc/smtpfront \
    /usr/local/bin/softlimit -m 2000000 \
    /usr/local/bin/tcpserver -v -R -H \
      -l "`head -1 /var/qmail/control/me`" -x /etc/tcp.smtp.cdb \
      -c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 25 \
    /usr/local/bin/smtpfront-qmail 2>&1


  Example using xinetd with TCP Wrappers:

    # default: on
    # description: smtp
    service smtp
    	disable	= no
    	flags		= REUSE NAMEINARGS
    	socket_type	= stream        
    	protocol	= tcp
    	wait		= no
    	user		= qmaild
    	server		= /usr/sbin/tcpd
    	server_args 	= /var/qmail/bin/tcp-env -R /usr/local/sbin/smtpfront-wrapper
    	log_on_success          += USERID
    	log_on_failure          += USERID

    export CVM_SASL_PLAIN
    export CVM_SASL_LOGIN
    exec /usr/local/bin/smtpfront-qmail 2>> /tmp/smtpfront-errs.txt

This project was initiated at FutureQuest, Inc.  We are releasing it
as an open-source project because we felt it would be useful to others,
as well as to repay our debt of gratitude to the larger open-source
community for the excellent packages we have enjoyed.

For more details, you may contact FutureQuest, Inc. at:
FutureQuest, Inc.
PO BOX 623127
Oviedo FL 32762-3127 USA

This package is Copyright(C) 2013 Bruce Guenter or FutureQuest, Inc.,
and may be copied according to the GNU GENERAL PUBLIC LICENSE (GPL)
Version 2 or a later version.  A copy of this license is included with
this package.  This package comes with no warranty of any kind.

Index of mailfront

NameModification TimeSize

Parent Directory2013-06-19 15:25 -
ANNOUNCEMENT2013-07-15 20:36 4k
ChangeLog2013-07-15 20:36 172k
NEWS2013-07-15 20:36 23k
TODO2013-07-15 20:36 1k
archive2013-07-15 20:36 -
backend-echo.html2013-07-15 20:36 373
backend-qmail.html2013-07-15 20:36 801
imapfront.html2013-07-15 20:36 2k
mailfront-2.01.tar.gz2013-07-15 20:36 116k
mailfront-2.01.tar.gz.sig2013-07-15 20:36 836
mailfront.html2013-07-15 20:36 5k
mailrules.html2013-07-15 20:36 7k
mailrulesx.html2013-07-15 20:36 10k
msa.html2013-07-15 20:36 5k
plugin-accept-recipient.html2013-07-15 20:36 494
plugin-accept-sender.html2013-07-15 20:36 482
plugin-accept.html2013-07-15 20:36 567
plugin-add-received.html2013-07-15 20:36 2k
plugin-api.html2013-07-15 20:36 11k
plugin-check-fqdn.html2013-07-15 20:36 1k
plugin-clamav.html2013-07-15 20:36 2k
plugin-counters.html2013-07-15 20:36 1k
plugin-cvm-authenticate.html2013-07-15 20:36 1k
plugin-cvm-validate.html2013-07-15 20:36 887
plugin-force-file.html2013-07-15 20:36 511
plugin-lua.html2013-07-15 20:36 3k
plugin-mailrules.html2013-07-15 20:36 736
plugin-patterns.html2013-07-15 20:36 2k
plugin-qmail-validate.html2013-07-15 20:36 955
plugin-reject.html2013-07-15 20:36 891
plugin-relayclient.html2013-07-15 20:36 754
plugin-require-auth.html2013-07-15 20:36 550
plugin-spamassassin.html2013-07-15 20:36 3k
plugin-starttls-ucspi.html2013-07-15 20:36 958
plugin-template.c2013-07-15 20:36 3k
plugin-template.html2013-07-15 20:36 413
pop3front.html2013-07-15 20:36 2k
protocol-qmqp.html2013-07-15 20:36 521
protocol-qmtp.html2013-07-15 20:36 428
protocol-smtp.html2013-07-15 20:36 2k
std-handle.html2013-07-15 20:36 2k

Valid XHTML 1.0!