SMTPD(8) SMTPD(8)
NAME
smtpd - Postfix SMTP server
SYNOPSIS
smtpd [generic Postfix daemon options]
DESCRIPTION
The SMTP server accepts network connection requests and performs zero
or more SMTP transactions per connection. Each received message is
piped through the cleanup(8) daemon, and is placed into the incoming
queue as one single queue file. For this mode of operation, the pro-
gram expects to be run from the master(8) process manager.
Alternatively, the SMTP server takes an established connection on stan-
dard input and deposits messages directly into the maildrop queue. In
this so-called stand-alone mode, the SMTP server can accept mail even
while the mail system is not running.
The SMTP server implements a variety of policies for connection
requests, and for parameters given to HELO,, ETRN,, MAIL FROM,, VRFY and
RCPT TO commands. They are detailed below and in the main.cf configura-
tion file.
SECURITY
The SMTP server is moderately security-sensitive. It talks to SMTP
clients and to DNS servers on the network. The SMTP server can be run
chrooted at fixed low privilege.
STANDARDS
RFC 821 (SMTP protocol)
RFC 1123 (Host requirements)
RFC 1652 (8bit-MIME transport)
RFC 1869 (SMTP service extensions)
RFC 1870 (Message Size Declaration)
RFC 1985 (ETRN command)
RFC 2554 (AUTH command)
RFC 2821 (SMTP protocol)
RFC 2920 (SMTP Pipelining)
DIAGNOSTICS
Problems and transactions are logged to syslogd(8).
Depending on the setting of the notifyclasses parameter, the postmas-
ter is notified of bounces, protocol problems, policy violations, and
of other trouble.
CONFIGURATION PARAMETERS
Changes to main.cf are picked up automatically, as smtpd(8) processes
run for only a limited amount of time. Use the command "postfix reload"
to speed up a change.
The text below provides only a parameter summary. See postconf(5) for
more details including examples.
COMPATIBILITY CONTROLS
The following parameters work around implementation errors in other
software, and/or allow you to override standards in order to prevent
undesirable use.
brokensaslauthclients (no)
Enable inter-operability with SMTP clients that implement an
obsolete version of the AUTH command (RFC 2554).
disablevrfycommand (no)
Disable the SMTP VRFY command.
smtpdnoopcommands (empty)
List of commands that the Postfix SMTP server replies to with
"250 Ok", without doing any syntax checks and without changing
state.
strictrfc821envelopes (no)
Require that addresses received in SMTP MAIL FROM and RCPT TO
commands are enclosed with <>, and that those addresses do not
contain RFC 822 style comments or phrases.
Available in Postfix version 2.1 and later:
resolvenulldomain (no)
Resolve an address that ends in the "@" null domain as if the
local hostname were specified, instead of rejecting the address
as invalid.
smtpdrejectunlistedsender (no)
Request that the Postfix SMTP server rejects mail from unknown
sender addresses, even when no explicit rejectunlistedsender
access restriction is specified.
smtpdsaslexceptionsnetworks (empty)
What SMTP clients Postfix will not offer AUTH support to.
AFTER QUEUE EXTERNAL CONTENT INSPECTION CONTROLS
As of version 1.0, Postfix can be configured to send new mail to an
external content filter AFTER the mail is queued. This content filter
is expected to inject mail back into a (Postfix or other) MTA for fur-
ther delivery. See the FILTEREADME document for details.
contentfilter (empty)
The name of a mail delivery transport that filters mail after it
is queued.
BEFORE QUEUE EXTERNAL CONTENT INSPECTION CONTROLS
As of version 2.1, the Postfix SMTP server can be configured to send
incoming mail to a real-time SMTP-based content filter BEFORE mail is
queued. This content filter is expected to inject mail back into Post-
fix. See the SMTPDPROXYREADME document for details on how to config-
ure and operate this feature.
smtpdproxyfilter (empty)
The hostname and TCP port of the mail filtering proxy server.
smtpdproxyehlo ($$myhostname)
How the Postfix SMTP server announces itself to the proxy fil-
ter.
smtpdproxytimeout (10000s)
The time limit for connecting to a proxy filter and for sending
or receiving information.
GENERAL CONTENT INSPECTION CONTROLS
The following parameters are applicable for both built-in and external
content filters.
Available in Postfix version 2.1 and later:
receiveoverrideoptions (empty)
Enable or disable recipient validation, built-in content filter-
ing, or address rewriting.
EXTERNAL CONTENT INSPECTION CONTROLS
The following parameters are applicable for both before-queue and
after-queue content filtering.
Available in Postfix version 2.1 and later:
smtpdauthorizedxforwardhosts (empty)
What SMTP clients are allowed to use the XFORWARD feature.
SASL AUTHENTICATION CONTROLS
Postfix SASL support (RFC 2554) can be used to authenticate remote SMTP
clients to the Postfix SMTP server, and to authenticate the Postfix
SMTP client to a remote SMTP server. See the SASLREADME document for
details.
brokensaslauthclients (no)
Enable inter-operability with SMTP clients that implement an
obsolete version of the AUTH command (RFC 2554).
smtpdsaslauthenable (no)
Enable SASL authentication in the Postfix SMTP server.
smtpdsaslapplicationname (smtpd)
The application name used for SASL server initialization.
smtpdsasllocaldomain (empty)
The name of the local SASL authentication realm.
smtpdsaslsecurityoptions (noanonymous)
Restrict what authentication mechanisms the Postfix SMTP server
will offer to the client.
smtpdsenderloginmaps (empty)
Optional lookup table with the SASL login names that own sender
(MAIL FROM) addresses.
Available in Postfix version 2.1 and later:
smtpdsaslexceptionsnetworks (empty)
What SMTP clients Postfix will not offer AUTH support to.
VERP SUPORT CONTROLS
With VERP style delivery, each recipient of a message receives a cus-
tomized copy of the message with his/her own recipient address encoded
in the envelope sender address. The VERPREADME file describes config-
uration and operation details of Postfix support for variable envelope
return path addresses. VERP style delivery is requested with the SMTP
XVERP command or with the "sendmail -V" command-line option and is
available in Postfix version 1.1 and later.
defaultverpdelimiters (]==)
The two default VERP delimiter characters.
verpdelimiterfilter (-==])
The characters Postfix accepts as VERP delimiter characters on
the Postfix sendmail(1) command line and in SMTP commands.
Available in Postfix version 1.1 and 2.0:
authorizedverpclients ($$mynetworks)
What SMTP clients are allowed to specify the XVERP command.
Available in Postfix version 2.1 and later:
smtpdauthorizedverpclients ($$authorizedverpclients)
What SMTP clients are allowed to specify the XVERP command.
TROUBLE SHOTING CONTROLS
The DEBUGREADME document describes how to debug parts of the Postfix
mail system. The methods vary from making the software log a lot of
detail, to running some daemon processes under control of a call tracer
or debugger.
debugpeerlevel (2)
The increment in verbose logging level when a remote client or
server matches a pattern in the debugpeerlist parameter.
debugpeerlist (empty)
Optional list of remote client or server hostname or network
address patterns that cause the verbose logging level to
increase by the amount specified in $debugpeerlevel.
errornoticerecipient (postmaster)
The recipient of postmaster notifications about mail delivery
problems that are caused by policy, resource, software or proto-
col errors.
notifyclasses (resource,, software)
The list of error classes that are reported to the postmaster.
softbounce (no)
Safety net to keep mail queued that would otherwise be returned
to the sender.
Available in Postfix version 2.1 and later:
smtpdauthorizedxclienthosts (empty)
What SMTP clients are allowed to use the XCLIENT feature.
KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS
As of Postfix version 2.0, the SMTP server rejects mail for unknown
recipients. This prevents the mail queue from clogging up with undeliv-
erable MAILER-DAEMON messages. Additional information on this topic is
in the LOCALRECIPIENTREADME and ADRESCLASREADME documents.
showuserunknowntablename (yes)
Display the name of the recipient table in the "User unknown"
responses.
canonicalmaps (empty)
Optional address mapping lookup tables for message headers and
envelopes.
recipientcanonicalmaps (empty)
Optional address mapping lookup tables for envelope and header
recipient addresses.
Parameters concerning known/unknown local recipients:
mydestination ($$myhostname,, localhost.$$mydomain,, localhost)
The list of domains that are delivered via the $localtransport
mail delivery transport.
inetinterfaces (all)
The network interface addresses that this mail system receives
mail on.
proxyinterfaces (empty)
The network interface addresses that this mail system receives
mail on by way of a proxy or network address translation unit.
localrecipientmaps (proxy::unix::passwd.byname $$aliasmaps)
Lookup tables with all names or addresses of local recipients: a
recipient address is local when its domain matches $mydestina-
tion, $inetinterfaces or $proxyinterfaces.
unknownlocalrecipientrejectcode (5500)
The numerical Postfix SMTP server response code when a recipient
address is local, and $localrecipientmaps specifies a list of
lookup tables that does not match the recipient.
Parameters concerning known/unknown recipients of relay destinations:
relaydomains ($$mydestination)
What destination domains (and subdomains thereof) this system
will relay mail to.
relayrecipientmaps (empty)
Optional lookup tables with all valid addresses in the domains
that match $relaydomains.
unknownrelayrecipientrejectcode (5500)
The numerical Postfix SMTP server reply code when a recipient
address matches $relaydomains, and relayrecipientmaps speci-
fies a list of lookup tables that does not match the recipient
address.
Parameters concerning known/unknown recipients in virtual alias
domains:
virtualaliasdomains ($$virtualaliasmaps)
Optional list of names of virtual alias domains, that is,
domains for which all addresses are aliased to addresses in
other local or remote domains.
virtualaliasmaps ($$virtualmaps)
Optional lookup tables that alias specific mail addresses or
domains to other local or remote address.
unknownvirtualaliasrejectcode (5500)
The SMTP server reply code when a recipient address matches
$virtualaliasdomains, and $virtualaliasmaps specifies a list
of lookup tables that does not match the recipient address.
Parameters concerning known/unknown recipients in virtual mailbox
domains:
virtualmailboxdomains ($$virtualmailboxmaps)
The list of domains that are delivered via the $virtualtrans-
port mail delivery transport.
virtualmailboxmaps (empty)
Optional lookup tables with all valid addresses in the domains
that match $virtualmailboxdomains.
unknownvirtualmailboxrejectcode (5500)
The SMTP server reply code when a recipient address matches
$virtualmailboxdomains, and $virtualmailboxmaps specifies a
list of lookup tables that does not match the recipient address.
RESOURCE AND RATE CONTROLS
The following parameters limit resource usage by the SMTP server and/or
control client request rates.
linelengthlimit (20048)
Upon input, long lines are chopped up into pieces of at most
this length; upon delivery, long lines are reconstructed.
queueminfree (00)
The minimal amount of free space in bytes in the queue file sys-
tem that is needed to receive mail.
messagesizelimit (1002400000000)
The maximal size in bytes of a message, including envelope
information.
smtpdrecipientlimit (1000000)
The maximal number of recipients that the Postfix SMTP server
accepts per message delivery request.
smtpdtimeout (30000s)
The time limit for sending a Postfix SMTP server response and
for receiving a remote SMTP client request.
smtpdhistoryflushthreshold (10000)
The maximal number of lines in the Postfix SMTP server command
history before it is flushed upon receipt of EHLO, RSET, or end
of DATA.
Not available in Postfix version 2.1:
smtpdclientconnectioncountlimit (500)
How many simultaneous connections any SMTP client is allowed to
make to the SMTP service.
smtpdclientconnectionratelimit (00)
The maximal number of connection attempts any client is allowed
to make to this service per time unit.
smtpdclientconnectionlimitexceptions ($$mynetworks)
Clients that are excluded from connection count or connection
rate restrictions.
TARPIT CONTROLS
When a remote SMTP client makes errors, the Postfix SMTP server can
insert delays before responding. This can help to slow down run-away
software. The behavior is controlled by an error counter that counts
the number of errors within an SMTP session that a client makes without
delivering mail.
smtpderrorsleeptime (1s)
With Postfix 2.1 and later: the SMTP server response delay after
a client has made more than $smtpdsofterrorlimit errors, and
fewer than $smtpdharderrorlimit errors, without delivering
mail.
smtpdsofterrorlimit (100)
The number of errors a remote SMTP client is allowed to make
without delivering mail before the Postfix SMTP server slows
down all its responses.
smtpdharderrorlimit (200)
The maximal number of errors a remote SMTP client is allowed to
make without delivering mail.
smtpdjunkcommandlimit (10000)
The number of junk commands (NOP, VRFY, ETRN or RSET) that a
remote SMTP client can send before the Postfix SMTP server
starts to increment the error counter with each junk command.
Available in Postfix version 2.1 and later:
smtpdrecipientovershootlimit (1000000)
The number of recipients that a remote SMTP client can send in
excess of the limit specified with $smtpdrecipientlimit,
before the Postfix SMTP server increments the per-session error
count for each excess recipient.
ACES POLICY DELEGATION CONTROLS
As of version 2.1, Postfix can be configured to delegate access policy
decisions to an external server that runs outside Postfix. See the
file SMTPDPOLICYREADME for more information.
smtpdpolicyservicemaxidle (30000s)
The time after which an idle SMTPD policy service connection is
closed.
smtpdpolicyservicemaxttl (1000000s)
The time after which an active SMTPD policy service connection
is closed.
smtpdpolicyservicetimeout (10000s)
The time limit for connecting to, writing to or receiving from a
delegated SMTPD policy server.
ACES CONTROLS
The SMTPDACESREADME document gives an introduction to all the SMTP
server access control features.
smtpddelayreject (yes)
Wait until the RCPT TO command before evaluating
$smtpdclientrestrictions, $smtpdhelorestrictions and
$smtpdsenderrestrictions, or wait until the ETRN command
before evaluating $smtpdclientrestrictions and
$smtpdhelorestrictions.
parentdomainmatchessubdomains (see ''postconf -d'' output)
What Postfix features match subdomains of "domain.tld" automati-
cally, instead of requiring an explicit ".domain.tld" pattern.
smtpdclientrestrictions (empty)
Optional SMTP server access restrictions in the context of a
client SMTP connection request.
smtpdhelorequired (no)
Require that a remote SMTP client introduces itself at the
beginning of an SMTP session with the HELO or EHLO command.
smtpdhelorestrictions (empty)
Optional restrictions that the Postfix SMTP server applies in
the context of the SMTP HELO command.
smtpdsenderrestrictions (empty)
Optional restrictions that the Postfix SMTP server applies in
the context of the MAIL FROM command.
smtpdrecipientrestrictions (permitmynetworks,, rejectunauthdestina-
tion)
The access restrictions that the Postfix SMTP server applies in
the context of the RCPT TO command.
smtpdetrnrestrictions (empty)
Optional SMTP server access restrictions in the context of a
client ETRN request.
allowuntrustedrouting (no)
Forward mail with sender-specified routing
(user[@%!]remote[@%!]site) from untrusted clients to destina-
tions matching $relaydomains.
smtpdrestrictionclasses (empty)
User-defined aliases for groups of access restrictions.
smtpdnullaccesslookupkey (<<>>)
The lookup key to be used in SMTP access(5) tables instead of
the null sender address.
permitmxbackupnetworks (empty)
Restrict the use of the permitmxbackup SMTP access feature to
only domains whose primary MX hosts match the listed networks.
Available in Postfix version 2.0 and later:
smtpddatarestrictions (empty)
Optional access restrictions that the Postfix SMTP server
applies in the context of the SMTP DATA command.
smtpdexpansionfilter (see ''postconf -d'' output)
What characters are allowed in $name expansions of RBL reply
templates.
Available in Postfix version 2.1 and later:
smtpdrejectunlistedsender (no)
Request that the Postfix SMTP server rejects mail from unknown
sender addresses, even when no explicit rejectunlistedsender
access restriction is specified.
smtpdrejectunlistedrecipient (yes)
Request that the Postfix SMTP server rejects mail for unknown
recipient addresses, even when no explicit
rejectunlistedrecipient access restriction is specified.
SENDER AND RECIPIENT ADRES VERIFICATION CONTROLS
Postfix version 2.1 introduces sender and recipient address verifica-
tion. This feature is implemented by sending probe email messages that
are not actually delivered. This feature is requested via the
rejectunverifiedsender and rejectunverifiedrecipient access
restrictions. The status of verification probes is maintained by the
verify(8) server. See the file ADRESVERIFICATIONREADME for infor-
mation about how to configure and operate the Postfix sender/recipient
address verification service.
addressverifypollcount (3)
How many times to query the verify(8) service for the completion
of an address verification request in progress.
addressverifypolldelay (3s)
The delay between queries for the completion of an address veri-
fication request in progress.
addressverifysender (postmaster)
The sender address to use in address verification probes.
unverifiedsenderrejectcode (4500)
The numerical Postfix SMTP server response code when a recipient
address is rejected by the rejectunverifiedsender restriction.
unverifiedrecipientrejectcode (4500)
The numerical Postfix SMTP server response when a recipient
address is rejected by the rejectunverifiedrecipient restric-
tion.
ACES CONTROL RESPONSES
The following parameters control numerical SMTP reply codes and/or text
responses.
accessmaprejectcode (554)
The numerical Postfix SMTP server response code when a client is
rejected by an access(5) map restriction.
defercode (4500)
The numerical Postfix SMTP server response code when a remote
SMTP client request is rejected by the "defer" restriction.
invalidhostnamerejectcode (5001)
The numerical Postfix SMTP server response code when the client
HELO or EHLO command parameter is rejected by the
rejectinvalidhostname restriction.
mapsrblrejectcode (554)
The numerical Postfix SMTP server response code when a remote
SMTP client request is blocked by the rejectrblclient,
rejectrhsblclient, rejectrhsblsender or rejectrhsblrecipi-
ent restriction.
nonfqdnrejectcode (5004)
The numerical Postfix SMTP server reply code when a client
request is rejected by the rejectnonfqdnhostname,
rejectnonfqdnsender or rejectnonfqdnrecipient restriction.
rejectcode (554)
The numerical Postfix SMTP server response code when a remote
SMTP client request is rejected by the "reject" restriction.
relaydomainsrejectcode (554)
The numerical Postfix SMTP server response code when a client
request is rejected by the rejectunauthdestination recipient
restriction.
unknownaddressrejectcode (4500)
The numerical Postfix SMTP server response code when a sender or
recipient address is rejected by the
rejectunknownsenderdomain or rejectunknownrecipientdomain
restriction.
unknownclientrejectcode (4500)
The numerical Postfix SMTP server response code when a client
without valid address <=> name mapping is rejected by the
rejectunknownclient restriction.
unknownhostnamerejectcode (4500)
The numerical Postfix SMTP server response code when the host-
name specified with the HELO or EHLO command is rejected by the
rejectunknownhostname restriction.
Available in Postfix version 2.0 and later:
defaultrblreply (see ''postconf -d'' output)
The default SMTP server response template for a request that is
rejected by an RBL-based restriction.
multirecipientbouncerejectcode (5500)
The numerical Postfix SMTP server response code when a remote
SMTP client request is blocked by the rejectmultirecipi-
entbounce restriction.
rblreplymaps (empty)
Optional lookup tables with RBL response templates.
MISCELANEOUS CONTROLS
configdirectory (see ''postconf -d'' output)
The default location of the Postfix main.cf and master.cf con-
figuration files.
daemontimeout (18000000s)
How much time a Postfix daemon process may take to handle a
request before it is terminated by a built-in watchdog timer.
commanddirectory (see ''postconf -d'' output)
The location of all postfix administrative commands.
doublebouncesender (double-bounce)
The sender address of postmaster notifications that are gener-
ated by the mail system.
ipctimeout (360000s)
The time limit for sending or receiving information over an
internal communication channel.
mailname (Postfix)
The mail system name that is displayed in Received: headers, in
the SMTP greeting banner, and in bounced mail.
mailowner (postfix)
The UNIX system account that owns the Postfix queue and most
Postfix daemon processes.
maxidle (10000s)
The maximum amount of time that an idle Postfix daemon process
waits for the next service request before exiting.
maxuse (10000)
The maximal number of connection requests before a Postfix dae-
mon process terminates.
myhostname (see ''postconf -d'' output)
The internet hostname of this mail system.
mynetworks (see ''postconf -d'' output)
The list of "trusted" SMTP clients that have more privileges
than "strangers".
myorigin ($$myhostname)
The domain name that locally-posted mail appears to come from,
and that locally posted mail is delivered to.
processid (read-only)
The process ID of a Postfix command or daemon process.
processname (read-only)
The process name of a Postfix command or daemon process.
queuedirectory (see ''postconf -d'' output)
The location of the Postfix top-level queue directory.
recipientdelimiter (empty)
The separator between user names and address extensions
(user]foo).
smtpdbanner ($$myhostname ESMTP $$mailname)
The text that follows the 220 status code in the SMTP greeting
banner.
syslogfacility (mail)
The syslog facility of Postfix logging.
syslogname (postfix)
The mail system name that is prepended to the process name in
syslog records, so that "smtpd" becomes, for example, "post-
fix/smtpd".
SEE ALSO
cleanup(8), message canonicalization
trivial-rewrite(8), address resolver
verify(8), address verification service
postconf(5), configuration parameters
master(8), process manager
syslogd(8), system logging
README FILES
Use "postconf readmedirectory" or "postconf htmldirectory" to locate
this information.
ADRESCLASREADME, blocking unknown hosted or relay recipients
FILTEREADME, external after-queue content filter
LOCALRECIPIENTREADME, blocking unknown local recipients
SMTPDACESREADME, built-in access policies
SMTPDPOLICYREADME, external policy server
SMTPDPROXYREADME, external before-queue content filter
SASLREADME, Postfix SASL howto
VERPREADME, Postfix XVERP extension
XCLIENTREADME, Postfix XCLIENT extension
XFORWARDREADME, Postfix XFORWARD extension
LICENSE
The Secure Mailer license must be distributed with this software.
AUTHOR(S)
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
SMTPD(8)
|