qmail-smtpd

Section: Maintenance Commands (8)
 

NAME

qmail-smtpd - receive mail via SMTP  

SYNOPSIS

qmail-smtpd  

DESCRIPTION

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.  

TRANSPARENCY

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.  

CONTROL FILES

badmailfrom
Unacceptable envelope sender addresses. qmail-smtpd will reject every recipient address for a message if the envelope sender address is listed in badmailfrom. A line in badmailfrom may be of the form @host, meaning every address at host.
databytes
Maximum number of bytes allowed in a message, or 0 for no limit. Default: 0. If a message exceeds this limit, qmail-smtpd returns a permanent error code to the client; in contrast, if the disk is full or qmail-smtpd hits a resource limit, qmail-smtpd returns a temporary error code.

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.

localiphost
Replacement host name for local IP addresses. Default: me, if that is supplied. qmail-smtpd is responsible for recognizing dotted-decimal addresses for the current host. When it sees a recipient address of the form box@[d.d.d.d], where d.d.d.d is a local IP address, it replaces [d.d.d.d] with localiphost. This is done before rcpthosts.
morercpthosts
Extra allowed RCPT domains. If rcpthosts and morercpthosts both exist, morercpthosts is effectively appended to rcpthosts.

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.

rcpthosts
Allowed RCPT domains. If rcpthosts is supplied, qmail-smtpd will reject any envelope recipient address with a domain not listed in rcpthosts.

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.

smtpgreeting
SMTP greeting message. Default: me, if that is supplied; otherwise qmail-smtpd will refuse to run. The first word of smtpgreeting should be the current host's name.
timeoutsmtpd
Number of seconds qmail-smtpd will wait for each new buffer of data from the remote SMTP client. Default: 1200.
 

RECIPIENT VERIFICATION

Optionally, qmail-smtpd can verify local recipient addresses during the SMTP session. This is enabled if RELAYCLIENT is not set and the environment variables VERIFY or VERIFYDEFER are set to anything, including "" - the actual values are ignored. Recipient verification causes qmail-smtpd to query a UDP server ( qmail-verify ) to determine if the address is valid.

The behaviour of VERIFY and VERIFYDEFER is slightly different: VERIFY causes an immediate response - invalid addresses will generate a permanent 550 error to the SMTP RCPT command. VERIFYDEFER causes a delayed response: If any of the addresses given in SMTP RCPT commands are invalid, the subsequent SMTP DATA command(s) will result in a permanent 554 error - although the individual RCPTs will appear to succeed. If both are set, VERIFYDEFER is assumed.

The UDP recipient verification server is assumed to be running on localhost (127.0.0.1) port 11113. Both of these default values can be altered by specifying the IP address and/or port in the environment variable VERIFYSVR - set this to the address of the address verification server, optionally followed by a colon and the port, thus for example VERIFYSVR="192.168.1.1:10101". If the verification server is not running, cannot be reached, or no reply is received from it, a 451 temporary error is returned in the SMTP session.

Addresses with domains appearing in control/rcpthosts but not in control/locals or control/virtualdomains will be considered valid.

 

SEE ALSO

tcp-env(1), tcp-environ(5), qmail-control(5), qmail-inject(8), qmail-newmrh(8), qmail-queue(8), qmail-remote(8), qmail-verify(8).


 

Index

NAME
SYNOPSIS
DESCRIPTION
TRANSPARENCY
CONTROL FILES
RECIPIENT VERIFICATION
SEE ALSO

Time: 19:46:41 GMT, July 05, 2007