Man/Man8/qmail-smtpd

From Qmail-LDAP Wiki

Jump to: navigation, search

WARNING

This document is deprecated. See qmail-smtpd instead.


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).</br> </br> qmail-smtpd is responsible for counting hops. It rejects any message with 100 or more Received or Delivered-To header fields.</br> </br> qmail-smtpd supports ESMTP, including the 8BITMIME and PIPELINING options.</br> </br> qmail-smtpd interacts with the LDAP directory by means of auth_smtpd and qmail-verify

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.</br> </br> qmail-smtpd accepts messages that contain long lines or non-ASCII characters, even though such messages violate the SMTP protocol.</br>

LDAP DIRECTORY INTEGRATION

By receiving some environment variables qmail-smtpd can trigger auxiliary programs to check information inside the LDAP directory and, based on the check result, accept or deny the smtp transaction.</br> </br> The env variable SMTPAUTH says qmail-smtpd to trigger auth_smtp to do smtp authentication. auth_smtp will compare the received user credentials against the information inside the directory.</br> </br> The variables RCPTCHECK and SENDERCHECK tell qmail-smtpd to trigger qmail-verify to check the directory for the validity of the e-mail recipient and sender, respectively. This prevents your mailserver from accepting messages to inexistent users, bouncing MAILER-DAEMON messages later, as stock Qmail does. This also prevents your users from sending spam to outside, by forging the SENDER header. See feat-environ(5) for further info.

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.
</br>
badmailfrom-unknown
Defines sender domains obligated to have valid PTR addressess. This file contains a list of domain names that will have their PTR dns record verified. qmail-smtpd will reject any message if this check fails. This is useful to stop some spammer that use fake hotmail or yahoo addresses but mail from home-pc without a PTR RR dns record.
Its syntax is the same as badmailfrom.
Example:
@hotmail.com
Notes:
  • Multiline.

</br>

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.

</br>

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.

</br>

locals
Allowed RCPT domains. If locals is supplied, qmail-smtpd will reject any envelope recipient address with a domain not listed in locals.
Exceptions:
- If the environment variable RELAYCLIENT is set, qmail-smtpd will ignore locals, and will append the value of RELAYCLIENT to each incoming recipient address.
- If the domain is listed in rcpthosts, qmail-smtpd will accept the message.
Note: if locals.cdb exists qmail-smtpd will read that file instead of locals.

</br>

locals.cdb
Same function of locals might be used as its substitute. It's read each time qmail-smtpd is executed. See qmail-control-basic(5) to know how to create it.

</br>

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.

</br>

rbllist
Contains a list of RBL's to check for the given senders IP addressess.
This control file consists of four tab or space separated fields:
  • basedomain: base domain address to lookup (e.g. relays.ordb.org)
  • action: one of addheader or reject. "addheader" will just create a X-RBL: header whereas "reject" will reject the smtp connection instantly with a 553 error.
  • matchon: any or IP-Address, if a IP-Address is specified the action is only taken if the returned address form basedomain is equal to IP-Address. With any all returned IP-Address will match.
  • message: message to be included in X-RBL: headers and 553 errors.
Default: none
Example:
  #     baseaddress     action    matchon   Message
  #========================================================================
        sbl.spamhaus.org reject    127.0.0.2 See http://www.spamhaus.org/SBL
         relays.ordb.org addheader 127.0.0.2 See http://www.ordb.org/faq/
           list.dsbl.org addheader 127.0.0.2 See http://dsbl.org/main
          bl.spamcop.net addheader 127.0.0.2 See http://spamcop.net/
         relays.ordb.org reject    any       See http://ordb.org
   spamguard.leadmon.net addheader 127.0.0.2 Address is a dialup address.
Notes:
  • Multiline.
  • To activate RBL checks you have to set RBL in qmail-smtpd's environment (with tcpserver).
  • See this website for more information on available RBLs: http://www.declude.com/JunkMail/Support/ip4r.htm
  • The environment variable RBLONLYHEADER overrides any rejects and only adds headers. This can be set by ip-range with tcpserver.
rcpthosts
List remote hosts/domains this server will relay for. The messages destined to the listed domains will be accepted and will be queued, then qmail-remote will deliver them to their final destinations.
rcpthosts may include wildcards:
heaven.af.mil</br> .heaven.af.mil
Envelope recipient addresses without @ signs are always allowed through.
Note: if rcpthosts.cdb exists qmail-smtpd will read that file instead of rcpthosts.

</br>

rcpthosts.cdb
When present, this file will be read in place of rcpthosts and morercpthosts. See rcpthosts.cdb(5) for info on how to create this file.

</br>

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.

</br>

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

ABOUT

This manpage was adapted from the original Qmail documentation available at http://qmail.area.com/man/index.html
Adapted by: Bruno Negrao G Zica, bnegrao AT yahoo DOT com
Last Revision: 2005/07/04


SEE ALSO

auth_smtp(8), feat-environ(5), tcp-env(1), tcp-environ(5), qmail-control(5), qmail-control-basic(5), qmail-inject(8), qmail-newmrh(8), qmail-queue(8), qmail-remote(8), qmail-verify(8), rbllist(5)
Personal tools