qmail-smtpd(8) | System Manager's Manual | qmail-smtpd(8) |
qmail-smtpd - receive mail via SMTP
qmail-smtpd
qmail-smtpd receives mail messages via the Simple Mail Transfer Protocol (SMTP) and invokes qmail-queue to deposit them into the outgoing queue. qmail-smtpd must be supplied several environment variables; see tcp-environ(5).
qmail-smtpd is responsible for counting hops. It rejects any message with 100 or more Received or Delivered-To header fields.
qmail-smtpd supports ESMTP, including the 8BITMIME and PIPELINING options.
qmail-smtpd converts the SMTP newline convention into the UNIX newline convention by converting CR LF into LF. It returns a temporary error and drops the connection on bare LFs; see http://pobox.com/~djb/docs/smtplf.html.
qmail-smtpd accepts messages that contain long lines or non-ASCII characters, even though such messages violate the SMTP protocol.
databytes counts bytes as stored on disk, not as transmitted through the network. It does not count the qmail-smtpd Received line, the qmail-queue Received line, or the envelope.
If the environment variable DATABYTES is set, it overrides databytes.
You must run qmail-newmrh whenever morercpthosts changes.
Rule of thumb for large sites: Put your 50 most commonly used domains into rcpthosts, and the rest into morercpthosts.
Exception: If the environment variable RELAYCLIENT is set, qmail-smtpd will ignore rcpthosts, and will append the value of RELAYCLIENT to each incoming recipient address.
rcpthosts may include wildcards:
heaven.af.mil
.heaven.af.mil
Envelope recipient addresses without @ signs are always allowed through.
Recipient verification is enabled with the VERIFY environment variable. This can be used to specify per-recipient rejection of invalid recipient addresses (immediate verification causing a permanent 550 error response to the RCPT command), or deferred rejection at DATA time (554 response) of the whole session if any recipient addresses don't exist.
To verify an address, qmail-smtpd uses a separate qmail-verify UDP server. By default this will be on the loopback address 127.0.0.1, port 11113. Enable verification like this,
VERIFY=":"
VERIFY="DEFER"
(for immediate, deferred verification respectively). A different IP address and/or port can be specified for qmail-verify as in these examples,
VERIFY="192.168.1.1"
VERIFY=":10101"
VERIFY="DEFER,:10101"
VERIFY="DEFER,192.168.1.1:10101"
Recipient verification may be explicitly disabled by setting VERIFY to an empty string,
VERIFY=""
Addresses with domains appearing in control/rcpthosts but not in control/locals or control/virtualdomains will be considered valid, reflecting qmail's standard behaviour.
Note that if the environment variable RELAYCLIENT is set, no checking is carried out.
qmail-verify needs to be running to respond to recipient verification queries. If no qmail-verify response is received a temporary 451 error response is given to the remote system and the session terminated.
tcp-env(1), tcp-environ(5), qmail-control(5), qmail-inject(8), qmail-newmrh(8), qmail-queue(8), qmail-remote(8), qmail-verify(8)