qmail error: 421 unable to read controls (#4.3.0)
tonyn | January 5, 2010While upgrading to the John Simpson’s new combined patch for qmail or doing a fresh install you may see the following error after replacing the old smtpd-run file with the Simpson’s new run file.
root@test# telnet localhost 25
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
421 unable to read controls (#4.3.0)
Connection closed by foreign host.
This is due to some default settings in the smtpd run file which you have downloaded from the jms’s site. If you look at the file at /services/qmail-smtpd/run file using any editor you will find the following defult settings as shown below. Give special attention to the red marked area below and make sure the smtp.cdb file,validrcptto & qmailscnner settings are in place. Adjust your smtp.cdb settings first. Chances are you are not using validrcptto options, in that case comment out that part by putting # sign in front. And remove hash sign for your appropriate qmailscnner setup. Its always a good idea to read the options in detalis and have a good understanding of each one.
http://qmail.jms1.net/scripts/service-qmail-smtpd-run.shtml
###############################################################################
#
# options for tcpserver/sslserverIP=unset
PORT=25
SSL=0
SSL_CERT=”$VQ/control/servercert.pem”
SMTP_CDB=”/etc/tcp/smtp.cdb”
MAX=30# these require the “tcpserver limits” patch for ucspi-tcp, available here:
# http://linux.voyager.hr/ucspi-tcp/#MAXLOAD=750
#MAXCONNIP=2
#MAXCONNC=5
#DIEMSG=”421 $LOCAL Service temporarily unavailable”# my newer version of the tcpserver limits patch allows you to specify
# individual DIEMSG values for each policy.
# http://qmail.jms1.net/ucspi-tcp/#DIEMSG_MAXLOAD=”421 $LOCAL Server busy, try again later.”
#DIEMSG_MAXCONNIP=”421 $LOCAL Too many connections from your IP.”
#DIEMSG_MAXCONNC=”421 $LOCAL Too many connections from your network.”###############################################################################
#
# options for programs which run before qmail-smtpd#RBLSMTPD_PROG=”rblsmtpd”
#RBL_GOOD=””
#RBL_BAD=”zen.spamhaus.org dnsbl.njabl.org dnsbl.sorbs.net bl.spamcop.net”#GREYLIST=”jgreylist”
#JGREYLIST_DIR=”$VQ/jgreylist”
#JGREYLIST_NOREV=1
#JGREYLIST_BY_IP=0
#JGREYLIST_HOLDTIME=120
#JGREYLIST_LOG=1
#JGREYLIST_LOG_PID=1
#JGREYLIST_LOG_SMTP=0
#JGREYLIST_TIMEOUT=60
#JGREYLIST_LIMIT=0#RECORDIO=”recordio”
###############################################################################
#
# options for qmail-smtpd itselfSMTPD=”qmail-smtpd”
#SMTPGREETING=”$LOCAL NO UCE”
#GREETDELAY=30
#DROP_PRE_GREET=1
FORCE_TLS=0
DENY_TLS=0
MFCHECK=3
#MAXRCPT=100
#RELAYREJ=1
QMAILSMTPD_LOG_MAIL=1
QMAILSMTPD_LOG_RCPT=1
#QMAILSMTPD_HELP_VERSION=1###############################################################################
#
# options pertaining to the AUTH command.AUTH=0
REQUIRE_AUTH=0
ALLOW_INSECURE_AUTH=0# if using the AUTH_CDB method
#AUTH_CDB=”$VQ/control/auth.cdb”# if using the CHECKPW method
CHECKPW=~vpopmail/bin/vchkpw
TRUE=`which true`# to change the environment whenever somebody authenticates
#AUTH_SET_MFCHECK=0
#AUTH_SET_MAXRCPT=0
#AUTH_SET_DATABYTES=0
#AUTH_SET_SPFBEHAVIOR=1
#AUTH_SET_VALIDRCPTTO_LIMIT=10
#AUTH_SET_VALIDRCPTTO_LOG=1
#AUTH_SET_SPF_LOG=1
#AUTH_SET_RELAYREJ=0
#AUTH_SET_VALIDRCPTTO_CDB=””
#AUTH_SET_QMAILSMTPD_LOG_MAIL=1
#AUTH_SET_QMAILSMTPD_LOG_RCPT=1
#AUTH_SET_QMAILSMTPD_HELP_VERSION=1###############################################################################
#
# options pertaining to the “validrcptto.cdb” mechanism.
# see http://qmail.jms1.net/patches/validrcptto.cdb.shtml for details.VALIDRCPTTO_CDB=”$VQ/control/validrcptto.cdb”
VALIDRCPTTO_LIMIT=10
VALIDRCPTTO_LOG=2###############################################################################
#
# options pertaining to the SPF mechanism.SPFBEHAVIOR=3
SPF_LOG=1
SPF_BLOCK_PLUS_ALL=1###############################################################################
#
# options pertaining to the Domainkeys mechanism.
# this requires an add-on patch.#DOMAINKEYS=0
#DKVERIFY=DEfGhIJK
#AUTH_SET_DKSIGN=/etc/domainkeys/%/default###############################################################################
#
# options for programs which run after qmail-smtpd# if you are using simscan…
#QMAILQUEUE=”$VQ/bin/simscan”
NOP0FCHECK=1
#SIMSCAN_DEBUG=0
#SIMSCAN_DEBUG_FILES=0# if you are using qmail-scanner, un-comment ONE of these lines.
#QMAILQUEUE=”$VQ/bin/qmail-scanner-queue”
#QMAILQUEUE=”$VQ/bin/qmail-scanner-queue.pl”