# postscreen(8) - man - phpMan

[POSTSCREEN(8postfix)](https://www.chedong.com/phpMan.php/man/POSTSCREEN/8postfix/markdown)                                                            [POSTSCREEN(8postfix)](https://www.chedong.com/phpMan.php/man/POSTSCREEN/8postfix/markdown)



## NAME
       postscreen - Postfix zombie blocker

## SYNOPSIS
       **postscreen** [generic Postfix daemon options]

## DESCRIPTION
       The Postfix [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server provides additional protection against mail server overload.
       One [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) process handles  multiple  inbound  SMTP  connections,  and  decides  which
       clients  may  talk to a Postfix SMTP server process.  By keeping spambots away, [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)
       leaves more SMTP server processes available for legitimate clients, and delays the  onset  of
       server overload conditions.

       This program should not be used on SMTP ports that receive mail from end-user clients (MUAs).
       In a typical deployment, [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) handles the MX service on TCP port  25,  and  [**smtpd**(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown)
       receives  mail  from  MUAs on the **submission** service (TCP port 587) which requires client au‐
       thentication.  Alternatively, a site could set up  a  dedicated,  non-postscreen,  "port  25"
       server that provides **submission** service and client authentication, but no MX service.

       [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) maintains a temporary allowlist for clients that have passed a number of tests.
       When an SMTP client IP address is allowlisted, [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) hands off the connection immedi‐
       ately to a Postfix SMTP server process. This minimizes the overhead for legitimate mail.

       By  default,  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  logs  statistics and hands off each connection to a Postfix SMTP
       server process, while excluding clients in mynetworks from all  tests  (primarily,  to  avoid
       problems  with  non-standard  SMTP implementations in network appliances).  This default mode
       blocks no clients, and is useful for non-destructive testing.

       In a typical production setting, [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) is configured to reject mail from clients that
       fail  one  or  more  tests.  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  logs rejected mail with the client address, helo,
       sender and recipient information.

       [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) is not an SMTP proxy; this is intentional.  The purpose  is  to  keep  spambots
       away from Postfix SMTP server processes, while minimizing overhead for legitimate traffic.

## SECURITY
       The  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server is moderately security-sensitive.  It talks to untrusted clients on
       the network. The process 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 2034 (SMTP Enhanced Status Codes)
       RFC 2821 (SMTP protocol)
       Not: RFC 2920 (SMTP Pipelining)
       RFC 3030 (CHUNKING without BINARYMIME)
       RFC 3207 (STARTTLS command)
       RFC 3461 (SMTP DSN Extension)
       RFC 3463 (Enhanced Status Codes)
       RFC 5321 (SMTP protocol, including multi-line 220 banners)

## DIAGNOSTICS
       Problems and transactions are logged to [**syslogd**(8)](https://www.chedong.com/phpMan.php/man/syslogd/8/markdown) or [**postlogd**(8)](https://www.chedong.com/phpMan.php/man/postlogd/8/markdown).

## BUGS
       The [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) built-in SMTP protocol engine currently does not announce support for AUTH,
       XCLIENT  or  XFORWARD.   If you need to make these services available on port 25, then do not
       enable the optional "after 220 server greeting" tests.

       The optional "after 220 server greeting" tests may result in unexpected delivery delays  from
       senders  that  retry email delivery from a different IP address.  Reason: after passing these
       tests a new client must disconnect, and reconnect from the same IP address before it can  de‐
       liver  mail. See POSTSCREEN_README, section "Tests after the 220 SMTP server greeting", for a
       discussion.

## CONFIGURATION PARAMETERS
       Changes to main.cf are not picked up automatically, as [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) processes  may  run  for
       several hours.  Use the command "postfix reload" after a configuration change.

       The  text below provides only a parameter summary. See [**postconf**(5)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown) for more details including
       examples.

       NOTE: Some [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) parameters implement stress-dependent behavior.  This  is  supported
       only  when  the  default  parameter  value  is  stress-dependent  (that  is,  it  looks  like
       ${stress?{X}:{Y}}, or it is the $_name_ of an smtpd parameter with a stress-dependent default).
       Other parameters always evaluate as if the **stress** parameter value is the empty string.

## COMPATIBILITY CONTROLS
       **postscreen**___**command**___**filter** **($smtpd**___**command**___**filter)**
              A mechanism to transform commands from remote SMTP clients.

       **postscreen**___**discard**___**ehlo**___**keyword**___**address**___**maps** **($smtpd**___**discard**___**ehlo**___**keyword**___**address**___**maps)**
              Lookup  tables, indexed by the remote SMTP client address, with case insensitive lists
              of EHLO keywords (pipelining, starttls, auth, etc.) that the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server will
              not send in the EHLO response to a remote SMTP client.

       **postscreen**___**discard**___**ehlo**___**keywords** **($smtpd**___**discard**___**ehlo**___**keywords)**
              A  case  insensitive list of EHLO keywords (pipelining, starttls, auth, etc.) that the
              [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server will not send in the EHLO response to a remote SMTP client.

       Available in Postfix version 3.1 and later:

       **dns**___**ncache**___**ttl**___**fix**___**enable** **(no)**
              Enable a workaround for future libc incompatibility.

       Available in Postfix version 3.4 and later:

       **postscreen**___**reject**___**footer**___**maps** **($smtpd**___**reject**___**footer**___**maps)**
              Optional  lookup  table  for  information  that  is  appended  after  a  4XX  or   5XX
              [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server response.

       Available in Postfix 3.6 and later:

       **respectful**___**logging** **(see** **'postconf** **-d'** **output)**
              Avoid logging that implies white is better than black.

## TROUBLE SHOOTING CONTROLS
       **postscreen**___**expansion**___**filter** **(see** **'postconf** **-d'** **output)**
              List  of  characters  that  are permitted in postscreen_reject_footer attribute expan‐
              sions.

       **postscreen**___**reject**___**footer** **($smtpd**___**reject**___**footer)**
              Optional information that is appended after a 4XX  or  5XX  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  server  re‐
              sponse.

       **soft**___**bounce** **(no)**
              Safety net to keep mail queued that would otherwise be returned to the sender.

## BEFORE-POSTSCREEN PROXY AGENT
       Available in Postfix version 2.10 and later:

       **postscreen**___**upstream**___**proxy**___**protocol** **(empty)**
              The name of the proxy protocol used by an optional before-postscreen proxy agent.

       **postscreen**___**upstream**___**proxy**___**timeout** **(5s)**
              The   time   limit   for   the   proxy  protocol  specified  with  the  postscreen_up‐
              stream_proxy_protocol parameter.

## PERMANENT ALLOW/DENYLIST TEST
       This test is executed immediately after a remote SMTP client connects. If a client is  perma‐
       nently  allowlisted,  the  client  will  be  handed  off immediately to a Postfix SMTP server
       process.

       **postscreen**___**access**___**list** **(permit**___**mynetworks)**
              Permanent allow/denylist for remote SMTP client IP addresses.

       **postscreen**___**blacklist**___**action** **(ignore)**
              Renamed to postscreen_denylist_action in Postfix 3.6.

## MAIL EXCHANGER POLICY TESTS
       When [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) is configured to monitor all primary  and  backup  MX  addresses,  it  can
       refuse  to  allowlist clients that connect to a backup MX address only. For small sites, this
       requires configuring primary and backup MX addresses on the same MTA. Larger sites would have
       to  share  the  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  cache between primary and backup MTAs, which would introduce a
       common point of failure.

       **postscreen**___**whitelist**___**interfaces** **(static:all)**
              Renamed to postscreen_allowlist_interfaces in Postfix 3.6.

## BEFORE 220 GREETING TESTS
       These tests are executed before the remote SMTP client receives the "220  servername"  greet‐
       ing.  If  no  tests  remain after the successful completion of this phase, the client will be
       handed off immediately to a Postfix SMTP server process.

       **dnsblog**___**service**___**name** **(dnsblog)**
              The name of the [**dnsblog**(8)](https://www.chedong.com/phpMan.php/man/dnsblog/8/markdown) service entry in master.cf.

       **postscreen**___**dnsbl**___**action** **(ignore)**
              The action that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) takes when a remote SMTP client's combined  DNSBL  score
              is  equal  to  or greater than a threshold (as defined with the postscreen_dnsbl_sites
              and postscreen_dnsbl_threshold parameters).

       **postscreen**___**dnsbl**___**reply**___**map** **(empty)**
              A mapping from actual DNSBL domain name which includes a secret password, to the DNSBL
              domain name that postscreen will reply with when it rejects mail.

       **postscreen**___**dnsbl**___**sites** **(empty)**
              Optional list of DNS allow/denylist domains, filters and weight factors.

       **postscreen**___**dnsbl**___**threshold** **(1)**
              The  inclusive  lower  bound  for blocking a remote SMTP client, based on its combined
              DNSBL score as defined with the postscreen_dnsbl_sites parameter.

       **postscreen**___**greet**___**action** **(ignore)**
              The action that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) takes when a remote SMTP client speaks before  its  turn
              within the time specified with the postscreen_greet_wait parameter.

       **postscreen**___**greet**___**banner** **($smtpd**___**banner)**
              The  _text_ in the optional "220-_text_..." server response that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) sends ahead
              of the real Postfix SMTP server's "220 text..." response, in an attempt to confuse bad
              SMTP clients so that they speak before their turn (pre-greet).

       **postscreen**___**greet**___**wait** **(normal:** **6s,** **overload:** **2s)**
              The  amount  of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will wait for an SMTP client to send a command
              before its turn, and for DNS blocklist lookup results to arrive (default: up to 2 sec‐
              onds under stress, up to 6 seconds otherwise).

       **smtpd**___**service**___**name** **(smtpd)**
              The internal service that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) hands off allowed connections to.

       Available in Postfix version 2.11 and later:

       **postscreen**___**dnsbl**___**whitelist**___**threshold** **(0)**
              Renamed to postscreen_dnsbl_allowlist_threshold in Postfix 3.6.

       Available in Postfix version 3.0 and later:

       **postscreen**___**dnsbl**___**timeout** **(10s)**
              The time limit for DNSBL or DNSWL lookups.

       Available in Postfix version 3.6 and later:

       **postscreen**___**denylist**___**action** **(ignore)**
              The  action  that  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  takes  when  a  remote  SMTP  client  is permanently
              denylisted with the postscreen_access_list parameter.

       **postscreen**___**allowlist**___**interfaces** **(static:all)**
              A list of local [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server IP addresses where a non-allowlisted remote  SMTP
              client can obtain [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)'s temporary allowlist status.

       **postscreen**___**dnsbl**___**allowlist**___**threshold** **(0)**
              Allow  a  remote SMTP client to skip "before" and "after 220 greeting" protocol tests,
              based on its combined DNSBL score as defined with the  postscreen_dnsbl_sites  parame‐
              ter.

## AFTER 220 GREETING TESTS
       These tests are executed after the remote SMTP client receives the "220 servername" greeting.
       If a client passes all tests during this phase, it will receive a 4XX response to all RCPT TO
       commands.  After the client reconnects, it will be allowed to talk directly to a Postfix SMTP
       server process.

       **postscreen**___**bare**___**newline**___**action** **(ignore)**
              The action that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) takes when a remote SMTP client  sends  a  bare  newline
              character, that is, a newline not preceded by carriage return.

       **postscreen**___**bare**___**newline**___**enable** **(no)**
              Enable "bare newline" SMTP protocol tests in the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server.

       **postscreen**___**disable**___**vrfy**___**command** **($disable**___**vrfy**___**command)**
              Disable the SMTP VRFY command in the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) daemon.

       **postscreen**___**forbidden**___**commands** **($smtpd**___**forbidden**___**commands)**
              List of commands that the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server considers in violation of the SMTP pro‐
              tocol.

       **postscreen**___**helo**___**required** **($smtpd**___**helo**___**required)**
              Require that a remote SMTP client sends HELO or EHLO before commencing a MAIL transac‐
              tion.

       **postscreen**___**non**___**smtp**___**command**___**action** **(drop)**
              The  action that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) takes when a remote SMTP client sends non-SMTP commands
              as specified with the postscreen_forbidden_commands parameter.

       **postscreen**___**non**___**smtp**___**command**___**enable** **(no)**
              Enable "non-SMTP command" tests in the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server.

       **postscreen**___**pipelining**___**action** **(enforce)**
              The action that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) takes when a remote SMTP client sends multiple  commands
              instead of sending one command and waiting for the server to respond.

       **postscreen**___**pipelining**___**enable** **(no)**
              Enable "pipelining" SMTP protocol tests in the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server.

## CACHE CONTROLS
       **postscreen**___**cache**___**cleanup**___**interval** **(12h)**
              The amount of time between [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) cache cleanup runs.

       **postscreen**___**cache**___**map** **(btree:$data**___**directory/postscreen**___**cache)**
              Persistent storage for the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server decisions.

       **postscreen**___**cache**___**retention**___**time** **(7d)**
              The  amount of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will cache an expired temporary allowlist entry
              before it is removed.

       **postscreen**___**bare**___**newline**___**ttl** **(30d)**
              The amount of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will use the result from a successful "bare new‐
              line" SMTP protocol test.

       **postscreen**___**dnsbl**___**max**___**ttl** **(${postscreen**___**dnsbl**___**ttl?{$postscreen**___**dnsbl**___**ttl}:{1}}h)**
              The  maximum  amount  of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will use the result from a successful
              DNS-based reputation test before a client IP address is required  to  pass  that  test
              again.

       **postscreen**___**dnsbl**___**min**___**ttl** **(60s)**
              The  minimum  amount  of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will use the result from a successful
              DNS-based reputation test before a client IP address is required  to  pass  that  test
              again.

       **postscreen**___**greet**___**ttl** **(1d)**
              The  amount  of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will use the result from a successful PREGREET
              test.

       **postscreen**___**non**___**smtp**___**command**___**ttl** **(30d)**
              The amount  of  time  that  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  will  use  the  result  from  a  successful
              "non_smtp_command" SMTP protocol test.

       **postscreen**___**pipelining**___**ttl** **(30d)**
              The  amount of time that [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) will use the result from a successful "pipelin‐
              ing" SMTP protocol test.

## RESOURCE CONTROLS
       **line**___**length**___**limit** **(2048)**
              Upon input, long lines are chopped up into pieces of at most this length; upon  deliv‐
              ery, long lines are reconstructed.

       **postscreen**___**client**___**connection**___**count**___**limit** **($smtpd**___**client**___**connection**___**count**___**limit)**
              How  many  simultaneous connections any remote SMTP client is allowed to have with the
              [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) daemon.

       **postscreen**___**command**___**count**___**limit** **(20)**
              The limit on the total  number  of  commands  per  SMTP  session  for  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)'s
              built-in SMTP protocol engine.

       **postscreen**___**command**___**time**___**limit** **(normal:** **300s,** **overload:** **10s)**
              The  time limit to read an entire command line with [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)'s built-in SMTP pro‐
              tocol engine.

       **postscreen**___**post**___**queue**___**limit** **($default**___**process**___**limit)**
              The number of clients that can be waiting for service from a real Postfix SMTP  server
              process.

       **postscreen**___**pre**___**queue**___**limit** **($default**___**process**___**limit)**
              The  number of non-allowlisted clients that can be waiting for a decision whether they
              will receive service from a real Postfix SMTP server process.

       **postscreen**___**watchdog**___**timeout** **(10s)**
              How much time a [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) process may take to respond to a remote SMTP client com‐
              mand  or  to  perform a cache operation before it is terminated by a built-in watchdog
              timer.

## STARTTLS CONTROLS
       **postscreen**___**tls**___**security**___**level** **($smtpd**___**tls**___**security**___**level)**
              The SMTP TLS security level for the [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown) server; when a  non-empty  value  is
              specified,   this   overrides   the   obsolete   parameters   postscreen_use_tls   and
              postscreen_enforce_tls.

       **tlsproxy**___**service**___**name** **(tlsproxy)**
              The name of the [**tlsproxy**(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown) service entry in master.cf.

## OBSOLETE STARTTLS SUPPORT CONTROLS
       These parameters are supported for compatibility with [**smtpd**(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown) legacy parameters.

       **postscreen**___**use**___**tls** **($smtpd**___**use**___**tls)**
              Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but  do  not  re‐
              quire that clients use TLS encryption.

       **postscreen**___**enforce**___**tls** **($smtpd**___**enforce**___**tls)**
              Mandatory  TLS:  announce  STARTTLS  support  to remote SMTP clients, and require that
              clients use TLS encryption.

## MISCELLANEOUS CONTROLS
       **config**___**directory** **(see** **'postconf** **-d'** **output)**
              The default location of the Postfix main.cf and master.cf configuration files.

       **delay**___**logging**___**resolution**___**limit** **(2)**
              The maximal number of digits after the decimal point  when  logging  sub-second  delay
              values.

       **command**___**directory** **(see** **'postconf** **-d'** **output)**
              The location of all postfix administrative commands.

       **max**___**idle** **(100s)**
              The  maximum  amount of time that an idle Postfix daemon process waits for an incoming
              connection before terminating voluntarily.

       **process**___**id** **(read-only)**
              The process ID of a Postfix command or daemon process.

       **process**___**name** **(read-only)**
              The process name of a Postfix command or daemon process.

       **syslog**___**facility** **(mail)**
              The syslog facility of Postfix logging.

       **syslog**___**name** **(see** **'postconf** **-d'** **output)**
              A prefix that is prepended to the process name in syslog records, so that,  for  exam‐
              ple, "smtpd" becomes "prefix/smtpd".

       Available in Postfix 3.3 and later:

       **service**___**name** **(read-only)**
              The master.cf service name of a Postfix daemon process.

       Available in Postfix 3.5 and later:

       **info**___**log**___**address**___**format** **(external)**
              The email address form that will be used in non-debug logging (info, warning, etc.).

## SEE ALSO
       [smtpd(8)](https://www.chedong.com/phpMan.php/man/smtpd/8/markdown), Postfix SMTP server
       [tlsproxy(8)](https://www.chedong.com/phpMan.php/man/tlsproxy/8/markdown), Postfix TLS proxy server
       [dnsblog(8)](https://www.chedong.com/phpMan.php/man/dnsblog/8/markdown), DNS allow/denylist logger
       [postlogd(8)](https://www.chedong.com/phpMan.php/man/postlogd/8/markdown), Postfix logging
       [syslogd(8)](https://www.chedong.com/phpMan.php/man/syslogd/8/markdown), system logging

## README FILES
       Use "**postconf** **readme**___**directory**" or "**postconf** **html**___**directory**" to locate this information.
       POSTSCREEN_README, Postfix Postscreen Howto

## LICENSE
       The Secure Mailer license must be distributed with this software.

## HISTORY
       This service was introduced with Postfix version 2.8.

       Many  ideas  in  [**postscreen**(8)](https://www.chedong.com/phpMan.php/man/postscreen/8/markdown)  were  explored in earlier work by Michael Tokarev, in OpenBSD
       spamd, and in MailChannels Traffic Control.

**AUTHOR(S)**
       Wietse Venema
       IBM T.J. Watson Research
       P.O. Box 704
       Yorktown Heights, NY 10598, USA

       Wietse Venema
       Google, Inc.
       111 8th Avenue
       New York, NY 10011, USA



                                                                                [POSTSCREEN(8postfix)](https://www.chedong.com/phpMan.php/man/POSTSCREEN/8postfix/markdown)
