qmail-smtpd(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. qmail-smtpd employs an additional DNS look-up for the "Mail from:" sender address.

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.

badmailpatterns
    Gives qmail-smtpd the ability to filter E-Mails by comparing the sender address with a REGEX pattern in badmailpatterns. Example:
          *@earthlink.net
          !fred@earthlink.net
          [0-9][0-9][0-9][0-9][0-9]@[0-9][0-9][0-9].com
          answerme@save*
          *%*
    A badmailpatterns file with this contents stops all mail from Earthlink except from fred@earthlink.net. It also stops all mail with addresses like: 12345@123.com and answerme@savetrees.com. Further, any E-Mail with a sender address containing a percent sign (%) is rejected.

badrcptto
    Unacceptable envelope recipient addresses. qmail-smtpd will reject every incoming message if the envelope recipient address is listed in badrcptto. This control file is complementary to badmailfrom. A line in badrecipient may be of the form @host, meaning every address at host.

badrcptpatterns
    employes the same filtering logic for the envelope recipient as badmailpatterns. It allows qmail-smtpd to reject SPAM E-Mail including the signature
          *\[dd.dd.dd.dd\]*
    in the badrcptpatterns file, where dd.dd.dd is the IP address in brackets.

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.

nodnscheck
    DNS checks are prohibited for sender addresses (Mail from:) included here. Addresses can be expressed individually and/or for a domain:
           god@heaven.af.mil
           @heaven.af.mil
    If the environment variable NODNSCHECK is set, qmail-smtpd will ignore nodnscheck and the DNS check will be disabled in general.

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.

relayclients
    IP addresses of clients allowed to relay mail through this host. Each address should be followed by a colon and an (optional) string that should be appended to each incoming recipient address, just as with the RELAYCLIENT environment variable. Nearly always, the optional string should be null. Addresses in relayclients may be wildcarded:
           192.168.0.1:
           192.168.1.:

relaydomains
    Host and domain names allowed to relay mail through this host. Each address should be followed by a colon and an (optional) string that should be appended to each incoming recipient address, just as with the RELAYCLIENT environment variable. Nearly always, the optional string should be null. Addresses in relaydomains may be wildcarded:
           heaven.af.mil:
           .heaven.af.mil:

relaymailfrom
    envelope senders (MAIL FROM:) listed in this file will be allowed to relay independently of the $RELAYCLIENT environment variable. Entries in relaymailfrom can be E-Mail addresses, or just the domain (with the @ sign). Unlike relaydomains native addresses should be entered. Examples:
           joeblow@domain1.com
           @domain2.com

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.

tarpitcount
    tarpitcount ist the number of RPCT TO: qmail-smtpd accepts before it starts tarpitting. Default: 0 which means no tarpitting. The environment variable TARPITCOUNT can be used instead.

tarpitdelay
    tarpitdelay is the time in seconds of delay to be introduced after each subsequent RCPT TO:. Default: 5. The environment variable TARPITDELAY can be used instead.

timeoutsmtpd
    Number of seconds qmail-smtpd will wait for each new buffer of data from the remote SMTP client. Default: 1200.

SEE ALSO
tcp-env(1), tcp-environ(5), qmail-control(5), qmail-inject(8), qmail-newmrh(8), qmail-queue(8), qmail-remote(8), qmail-send(8)