.TH qmail-smtpd 8 .SH NAME qmail-smtpd \- receive mail via SMTP .SH SYNOPSIS .B qmail-smtpd .SH DESCRIPTION .B qmail-smtpd receives mail messages via the Simple Mail Transfer Protocol (SMTP) and invokes .B qmail-queue to deposit them into the outgoing queue. .B qmail-smtpd must be supplied several environment variables; see .BR tcp-environ(5) . .B qmail-smtpd is responsible for counting hops. It rejects any message with 100 or more .B Received or .B Delivered-To header fields. .B qmail-smtpd supports ESMTP, including the 8BITMIME and PIPELINING options. .SH TRANSPARENCY .B 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 .BR http://pobox.com/~djb/docs/smtplf.html . .B qmail-smtpd accepts messages that contain long lines or non-ASCII characters, even though such messages violate the SMTP protocol. .SH "CONTROL FILES" .TP 5 .I badmailfrom Unacceptable envelope sender addresses. .B qmail-smtpd will reject every recipient address for a message if the envelope sender address is listed in .IR badmailfrom . A line in .I badmailfrom may be of the form .BR @\fIhost , meaning every address at .IR host . .TP 5 .I databytes Maximum number of bytes allowed in a message, or 0 for no limit. Default: 0. If a message exceeds this limit, .B qmail-smtpd returns a permanent error code to the client; in contrast, if the disk is full or .B qmail-smtpd hits a resource limit, .B qmail-smtpd returns a temporary error code. .I databytes counts bytes as stored on disk, not as transmitted through the network. It does not count the .B qmail-smtpd Received line, the .B qmail-queue Received line, or the envelope. If the environment variable .B DATABYTES is set, it overrides .IR databytes . .TP 5 .I localiphost Replacement host name for local IP addresses. Default: .IR me , if that is supplied. .B qmail-smtpd is responsible for recognizing dotted-decimal addresses for the current host. When it sees a recipient address of the form .IR box@[d.d.d.d] , where .I d.d.d.d is a local IP address, it replaces .IR [d.d.d.d] with .IR localiphost . This is done before .IR rcpthosts . .TP 5 .I morercpthosts Extra allowed RCPT domains. If .I rcpthosts and .I morercpthosts both exist, .I morercpthosts is effectively appended to .IR rcpthosts . You must run .B qmail-newmrh whenever .I morercpthosts changes. Rule of thumb for large sites: Put your 50 most commonly used domains into .IR rcpthosts , and the rest into .IR morercpthosts . .TP 5 .I rcpthosts Allowed RCPT domains. If .I rcpthosts is supplied, .B qmail-smtpd will reject any envelope recipient address with a domain not listed in .IR rcpthosts . Exception: If the environment variable .B RELAYCLIENT is set, .B qmail-smtpd will ignore .IR rcpthosts , and will append the value of .B RELAYCLIENT to each incoming recipient address. .I rcpthosts may include wildcards: .EX heaven.af.mil .heaven.af.mil .EE Envelope recipient addresses without @ signs are always allowed through. .TP 5 .I smtpgreeting SMTP greeting message. Default: .IR me , if that is supplied; otherwise .B qmail-smtpd will refuse to run. The first word of .I smtpgreeting should be the current host's name. .TP 5 .I timeoutsmtpd Number of seconds .B qmail-smtpd will wait for each new buffer of data from the remote SMTP client. Default: 1200. .SH "RECIPIENT VERIFICATION" Recipient verification is enabled with the .B 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, .B qmail-smtpd uses a separate .B qmail-verify UDP server. By default this will be on the loopback address 127.0.0.1, port 11113. Enable verification like this, .EX VERIFY=":" VERIFY="DEFER" .EE (for immediate, deferred verification respectively). A different IP address and/or port can be specified for .B qmail-verify as in these examples, .EX VERIFY="192.168.1.1" VERIFY=":10101" VERIFY="DEFER,:10101" VERIFY="DEFER,192.168.1.1:10101" .EE Recipient verification may be explicitly disabled by setting .B VERIFY to an empty string, .EX VERIFY="" .EE Addresses with domains appearing in .B control/rcpthosts but not in .B control/locals or .B control/virtualdomains will be considered valid, reflecting qmail's standard behaviour. .P Note that if the environment variable .B RELAYCLIENT is set, no checking is carried out. .P .B qmail-verify needs to be running to respond to recipient verification queries. If no .B qmail-verify response is received a temporary 451 error response is given to the remote system and the session terminated. .SH "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)