Qmail-smtpd

From Qmail-LDAP Wiki

Jump to: navigation, search

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 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.

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.

qmail-smtpd can authenticate users to allow them to relay through. See SMTP AUTHENTICATION bellow.

And it can accept or deny e-mail messages based on recipient and sender checks. See RCPT/SENDER CHECKS bellow.

qmail-smtpd can support TLS to encrypt SMTP traffic (qmail-ldap has to be compiled with -DTLS_SMTPD enabled).

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.

RCPT/SENDER CHECKS

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.


SMTP AUTHENTICATION

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.

If SMTPAUTH is set to TLSREQUIRED it is necessary to do a STARTTLS before issuing an AUTH command. If AUTHREQUIRED is set any user MUST successfully authenticate before issuing a MAIL FROM command. The string in the env var AUTHPREPEND will be prepended to the userid in the received line.


CONTROL FILES

NOTE: Since qmail-ldap release 20031001, qmail-smtpd reads locals and merges it with rcpthosts. It is no longer neccessary to list a domain in both files. Anything listed in locals is automatically accepted by qmail-smtpd. rcpthosts is only used and needed for remote domains we have to relay for.

badmailfrom, badmailfrom-unknown, badmailpatterns, badrcptto, databytes, goodmailaddr, localiphost, locals, locals.cdb, morercpthosts, rbllist, rcpthosts, rcpthosts.cdb, relaymailfrom, smtpcert, smtpgreeting, timeoutsmtpd


ENVIRONMENT VARIABLES

421GREETING, 550GREETING, AUTHPREPEND, AUTHREQUIRED, BLOCKRELAYPROBE, DEBUGLEVEL, LDAPSOFTOK, LOGLEVEL, MAXRCPTCOUNT, NOBOUNCE, NOPBS, PROTO, RBL, RBLONLYHEADER, RCPTCHECK, REJECTEXEC, RELAYCLIENT, RETURNMXCHECK, SANITYCHECK, SENDERCHECK, SMTP550DISCONNECT, SMTPAUTH, SSLCERT, TARPITCOUNT, TARPITDELAY, TCPLOCALHOST, TCPLOCALIP, TCPLOCALPORT, TCPREMOTEHOST, TCPREMOTEINFO, TCPREMOTEIP, TCPREMOTEPORT


ABOUT

This document 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/15


Personal tools