pipe

title: pipe(8)

text:
# pipe(8)

## NAME
pipe - Postfix delivery to external command

## SYNOPSIS

```
pipe [generic Postfix daemon options] command_attributes...
```

## DESCRIPTION

The pipe(8) daemon processes requests from the Postfix queue manager to deliver messages to external commands. This program expects to be run from the master(8) process manager.

Message attributes such as sender address, recipient address and next-hop host name can be specified as command-line macros that are expanded before the external command is executed.

The pipe(8) daemon updates queue files and marks recipients as finished, or it informs the queue manager that delivery should be tried again at a later time. Delivery status reports are sent to the bounce(8), defer(8) or trace(8) daemon as appropriate.

## SINGLE-RECIPIENT DELIVERY

```

```

Some destinations cannot handle more than one recipient per delivery request. Examples are pagers or fax machines. In addition, multi-recipient delivery is undesirable when prepending a Delivered-to: or X-Original-To: message header.

To prevent Postfix from sending multiple recipients per delivery request, specify

```
    transport_destination_recipient_limit = 1
```

in the Postfix main.cf file, where transport is the name in the first column of the Postfix master.cf entry for the pipe-based delivery transport.

## COMMAND ATTRIBUTE SYNTAX

```

```

The external command attributes are given in the master.cf file at the end of a service definition. The syntax is as follows:

chroot=pathname (optional)

Change the process root directory and working directory to the named directory. This happens before switching to the privileges specified with the user attribute, and before executing the optional directory=pathname directive. Delivery is deferred in case of failure. This feature is available as of Postfix 2.3.

directory=pathname (optional)

Change to the named directory before executing the external command. The directory must be accessible for the user specified with the user attribute (see below). The default working directory is $queue_directory. Delivery is deferred in case of failure. This feature is available as of Postfix 2.2.

eol=string (optional, default: \n)

The output record delimiter. Typically one would use either \r\n or \n. The usual C-style backslash escape sequences are recognized: \a \b \f \n \r \t \v \ddd (up to three octal digits) and \\.

flags=BDFORXhqu.> (optional)

Optional message processing flags. By default, a message is copied unchanged.

B

Append a blank line at the end of each message. This is required by some mail user agents that recognize "From " lines only when preceded by a blank line.

D

Prepend a "Delivered-To: recipient" message header with the envelope recipient address. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details). The D flag also enforces loop detection (Postfix 2.5 and later): if a message already contains a Delivered-To: header with the same recipient address, then the message is returned as undeliverable. The address comparison is case insensitive.

This feature is available as of Postfix 2.0.

F

Prepend a "From sender time_stamp" envelope header to the message content. This is expected by, for example, UUCP software.

O

Prepend an "X-Original-To: recipient" message header with the recipient address as given to Postfix. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details). This feature is available as of Postfix 2.0.

R

Prepend a Return-Path: message header with the envelope sender address.

X

Indicate that the external command performs final delivery. This flag affects the status reported in "success" DSN (delivery status notification) messages, and changes it from "relayed" into "delivered". This feature is available as of Postfix 2.5.

h

Fold the command-line $original_recipient and $recipient address domain part (text to the right of the right-most @ character) to lower case; fold the entire command-line $domain and $nexthop host or domain information to lower case. This is recommended for delivery via UUCP.

q

Quote white space and other special characters in the command-line $sender, $original_recipient and $recipient address localparts (text to the left of the right-most @ character), according to an 8-bit transparent version of RFC 822. This is recommended for delivery via UUCP or BSMTP. The result is compatible with the address parsing of command-line recipients by the Postfix sendmail(1) mail submission command.

The q flag affects only entire addresses, not the partial address information from the $user, $extension or $mailbox command-line macros.

u

Fold the command-line $original_recipient and $recipient address localpart (text to the left of the right-most @ character) to lower case. This is recommended for delivery via UUCP.

.

Prepend "." to lines starting with ".". This is needed by, for example, BSMTP software.

>

Prepend ">" to lines starting with "From ". This is expected by, for example, UUCP software.

null_sender=replacement (default: MAILER-DAEMON)

Replace the null sender address (typically used for delivery status notifications) with the specified text when expanding the $sender command-line macro, and when generating a From_ or Return-Path: message header. If the null sender replacement text is a non-empty string then it is affected by the q flag for address quoting in command-line arguments.

The null sender replacement text may be empty; this form is recommended for content filters that feed mail back into Postfix. The empty sender address is not affected by the q flag for address quoting in command-line arguments.

Caution: a null sender address is easily mis-parsed by naive software. For example, when the pipe(8) daemon executes a command such as:

```
    Wrong: command -f$sender -- $recipient
```

the command will mis-parse the -f option value when the sender address is a null string. For correct parsing, specify $sender as an argument by itself:

```
    Right: command -f $sender -- $recipient
```

NOTE: DO NOT put quotes around the command, $sender, or $recipient.

This feature is available as of Postfix 2.3.

size=size_limit (optional)

Don't deliver messages that exceed this size limit (in bytes); return them to the sender instead.

user=username (required)

user=username:groupname

Execute the external command with the user ID and group ID of the specified username. The software refuses to execute commands with root privileges, or with the privileges of the mail system owner. If groupname is specified, the corresponding group ID is used instead of the group ID of username.

argv=command... (required)

The command to be executed. This must be specified as the last command attribute. The command is executed directly, i.e. without interpretation of shell meta characters by a shell command interpreter. Specify "{" and "}" around command arguments that contain whitespace (Postfix 3.0 and later). Whitespace after the opening "{" and before the closing "}" is ignored.

In the command argument vector, the following macros are recognized and replaced with corresponding information from the Postfix queue manager delivery request.

In addition to the form ${name}, the forms $name and the deprecated form $(name) are also recognized. Specify $$ where a single $ is wanted.

${client_address}

This macro expands to the remote client network address. This feature is available as of Postfix 2.2.

${client_helo}

This macro expands to the remote client HELO command parameter. This feature is available as of Postfix 2.2.

${client_hostname}

This macro expands to the remote client hostname. This feature is available as of Postfix 2.2.

${client_port}

This macro expands to the remote client TCP port number. This feature is available as of Postfix 2.5.

${client_protocol}

This macro expands to the remote client protocol. This feature is available as of Postfix 2.2.

${domain}

This macro expands to the domain portion of the recipient address. For example, with an address user+foo@domain the domain is domain. This information is modified by the h flag for case folding.

This feature is available as of Postfix 2.5.

${extension}

This macro expands to the extension part of a recipient address. For example, with an address user+foo@domain the extension is foo. A command-line argument that contains ${extension} expands into as many command-line arguments as there are recipients.

This information is modified by the u flag for case folding.

${mailbox}

This macro expands to the complete local part of a recipient address. For example, with an address user+foo@domain the mailbox is user+foo. A command-line argument that contains ${mailbox} expands to as many command-line arguments as there are recipients.

This information is modified by the u flag for case folding.

${nexthop}

This macro expands to the next-hop hostname. This information is modified by the h flag for case folding.

${original_recipient}

This macro expands to the complete recipient address before any address rewriting or aliasing. A command-line argument that contains ${original_recipient} expands to as many command-line arguments as there are recipients.

This information is modified by the hqu flags for quoting and case folding.

This feature is available as of Postfix 2.5.

${queue_id}

This macro expands to the queue id. This feature is available as of Postfix 2.11.

${recipient}

This macro expands to the complete recipient address. A command-line argument that contains ${recipient} expands to as many command-line arguments as there are recipients.

This information is modified by the hqu flags for quoting and case folding.

${sasl_method}

This macro expands to the name of the SASL authentication mechanism in the AUTH command when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2.

${sasl_sender}

This macro expands to the SASL sender name (i.e. the original submitter as per RFC 4954) in the MAIL FROM command when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2.

${sasl_username}

This macro expands to the SASL user name in the AUTH command when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2.

${sender}

This macro expands to the envelope sender address. By default, the null sender address expands to MAILER-DAEMON; this can be changed with the null_sender attribute, as described above. This information is modified by the q flag for quoting.

${size}

This macro expands to Postfix's idea of the message size, which is an approximation of the size of the message as delivered.

${user}

This macro expands to the username part of a recipient address. For example, with an address user+foo@domain the username part is user. A command-line argument that contains ${user} expands into as many command-line arguments as there are recipients.

This information is modified by the u flag for case folding.

## STANDARDS

```
RFC 3463 (Enhanced status codes)
```

## DIAGNOSTICS

Command exit status codes are expected to follow the conventions defined in <sysexits.h>. Exit status 0 means normal successful completion.

In the case of a non-zero exit status, a limited amount of command output is logged, and reported in a delivery status notification. When the output begins with a 4.X.X or 5.X.X enhanced status code, the status code takes precedence over the non-zero exit status (Postfix version 2.3 and later).

After successful delivery (zero exit status) a limited amount of command output is logged, and reported in "success" delivery status notifications (Postfix 3.0 and later). This command output is not examined for the presence of an enhanced status code.

Problems and transactions are logged to syslogd(8) or postlogd(8). Corrupted message files are marked so that the queue manager can move them to the corrupt queue for further inspection.

## SECURITY

```

```

This program needs a dual personality 1) to access the private Postfix queue and IPC mechanisms, and 2) to execute external commands as the specified user. It is therefore security sensitive.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically as pipe(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.

## RESOURCE AND RATE CONTROLS

```

```

In the text below, transport is the first field in a master.cf entry.

transport_time_limit ($command_time_limit)

A transport-specific override for the command_time_limit parameter value, where transport is the master.cf name of the message delivery transport.

Implemented in the qmgr(8) daemon:

transport_destination_concurrency_limit ($default_destination_concurrency_limit)

A transport-specific override for the default_destination_concurrency_limit parameter value, where transport is the master.cf name of the message delivery transport.

transport_destination_recipient_limit ($default_destination_recipient_limit)

A transport-specific override for the default_destination_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

## MISCELLANEOUS CONTROLS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

delay_logging_resolution_limit (2)

The maximal number of digits after the decimal point when logging sub-second delay values.

export_environment (see 'postconf -d' output)

The list of environment variables that a Postfix process will export to non-Postfix processes.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

mail_owner (postfix)

The UNIX system account that owns the Postfix queue and most Postfix daemon processes.

max_idle (100s)

The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.

max_use (100)

The maximal number of incoming connections that a Postfix daemon process will service 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.

queue_directory (see 'postconf -d' output)

The location of the Postfix top-level queue directory.

recipient_delimiter (empty)

The set of characters that can separate an email address localpart, user name, or a .forward file name from its extension.

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 example, "smtpd" becomes "prefix/smtpd".

Available in Postfix version 3.0 and later:

pipe_delivery_status_filter ($default_delivery_status_filter)

Optional filter for the pipe(8) delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries.

Available in Postfix version 3.3 and later:

enable_original_recipient (yes)

Enable support for the original recipient address after an address is rewritten to a different address (for example with aliasing or with canonical mapping).

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

```
qmgr(8), queue manager
bounce(8), delivery status reports
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## 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
Wietse Venema
Google, Inc.
111 8th Avenue
New York, NY 10011, USA
```


postlogd

package: postfix

title: postlogd(8)

text:
# postlogd(8)

## NAME
postlogd - Postfix internal log server

## SYNOPSIS

```
postlogd [generic Postfix daemon options]
```

## DESCRIPTION

This program logs events on behalf of Postfix programs when the maillog configuration parameter specifies a non-empty value.

## BUGS

Non-daemon Postfix programs don't know that they should log to the internal logging service before they have processed command-line options and main.cf parameters. These programs still log earlier events to the syslog service.

If Postfix is down, the non-daemon programs postfix(1), postsuper(1), postmulti(1), and postlog(1), will log directly to $maillog_file. These programs expect to run with root privileges, for example during Postfix start-up, reload, or shutdown.

Other non-daemon Postfix programs will never write directly to $maillog_file (also, logging to stdout would interfere with the operation of some of these programs). These programs can log to postlogd(8) if they are run by the super-user, or if their executable file has set-gid permission. Do not set this permission on programs other than postdrop(1), postqueue(1) and (Postfix >= 3.7) postlog(1).

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically, as postlogd(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.

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

maillog_file (empty)

The name of an optional logfile that is written by the Postfix postlogd(8) service.

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_name (see 'postconf -d' output)

A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd".

service_name (read-only)

The master.cf service name of a Postfix daemon process.

postlogd_watchdog_timeout (10s)

How much time a postlogd(8) process may take to process a request before it is terminated by a built-in watchdog timer.

## SEE ALSO

```
postconf(5), configuration parameters
syslogd(8), system logging
```

## README_FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
MAILLOG_README, Postfix logging to file or stdout
```

## LICENSE

```

```

The Secure Mailer license must be distributed with this software.

## HISTORY

This service was introduced with Postfix version 3.4.

## AUTHOR(S)

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


postscreen

title: postscreen(8)

text:
# postscreen(8)

## NAME
postscreen - Postfix zombie blocker

## SYNOPSIS

```
postscreen [generic Postfix daemon options]
```

## DESCRIPTION

The Postfix postscreen(8) server provides additional protection against mail server overload. One postscreen(8) process handles multiple inbound SMTP connections, and decides which clients may talk to a Postfix SMTP server process. By keeping spambots away, postscreen(8) 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) handles the MX service on TCP port 25, and smtpd(8) receives mail from MUAs on the submission service (TCP port 587) which requires client authentication. 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) maintains a temporary allowlist for clients that have passed a number of tests. When an SMTP client IP address is allowlisted, postscreen(8) hands off the connection immediately to a Postfix SMTP server process. This minimizes the overhead for legitimate mail.

By default, postscreen(8) 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) is configured to reject mail from clients that fail one or more tests. postscreen(8) logs rejected mail with the client address, helo, sender and recipient information.

postscreen(8) 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) 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) or postlogd(8).

## BUGS

The postscreen(8) 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 deliver 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) 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) for more details including examples.

NOTE: Some postscreen(8) 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) 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) 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) 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 expansions.

postscreen_reject_footer ($smtpd_reject_footer)

Optional information that is appended after a 4XX or 5XX postscreen(8) server response.

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

## PERMANENT ALLOW/DENYLIST TEST

```

```

This test is executed immediately after a remote SMTP client connects. If a client is permanently 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) 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) cache between primary and backup MTAs, which would introduce a common point of failure.

postscreen_allowlist_interfaces (static:all)

A list of local postscreen(8) server IP addresses where a non-allowlisted remote SMTP client can obtain postscreen(8)'s temporary allowlist status.

## BEFORE 220 GREETING TESTS

```

```

These tests are executed before the remote SMTP client receives the "220 servername" greeting. 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) service entry in master.cf.

postscreen_dnsbl_action (ignore)

The action that postscreen(8) 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 an 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 patterns with 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) 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) 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) 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 seconds under stress, up to 6 seconds otherwise).

smtpd_service_name (smtpd)

The internal service that postscreen(8) 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) 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) server IP addresses where a non-allowlisted remote SMTP client can obtain postscreen(8)'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 parameter.

## 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) 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) server.

postscreen_disable_vrfy_command ($disable_vrfy_command)

Disable the SMTP VRFY command in the postscreen(8) daemon.

postscreen_forbidden_commands ($smtpd_forbidden_commands)

List of commands that the postscreen(8) server considers in violation of the SMTP protocol.

postscreen_helo_required ($smtpd_helo_required)

Require that a remote SMTP client sends HELO or EHLO before commencing a MAIL transaction.

postscreen_non_smtp_command_action (drop)

The action that postscreen(8) 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) server.

postscreen_pipelining_action (enforce)

The action that postscreen(8) 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) server.

## CACHE CONTROLS

```

```

postscreen_cache_cleanup_interval (12h)

The amount of time between postscreen(8) cache cleanup runs.

postscreen_cache_map (btree:$data_directory/postscreen_cache)

Persistent storage for the postscreen(8) server decisions.

postscreen_cache_retention_time (7d)

The amount of time that postscreen(8) will cache an expired temporary allowlist entry before it is removed.

postscreen_bare_newline_ttl (30d)

The amount of time that postscreen(8) will use the result from a successful "bare newline" SMTP protocol test.

postscreen_dnsbl_max_ttl (${postscreen_dnsbl_ttl?{$postscreen_dnsbl_ttl}:{1}}h)

The maximum amount of time that postscreen(8) 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) 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) will use the result from a successful PREGREET test.

postscreen_non_smtp_command_ttl (30d)

The amount of time that postscreen(8) will use the result from a successful "non_smtp_command" SMTP protocol test.

postscreen_pipelining_ttl (30d)

The amount of time that postscreen(8) will use the result from a successful "pipelining" SMTP protocol test.

## RESOURCE CONTROLS

```

```

line_length_limit (2048)

Upon input, long lines are chopped up into pieces of at most this length; upon delivery, 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) daemon.

postscreen_command_count_limit (20)

The limit on the total number of commands per SMTP session for postscreen(8)'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)'s built-in SMTP protocol 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) process may take to respond to a remote SMTP client command 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) 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) service entry in master.cf.

## OBSOLETE STARTTLS SUPPORT CONTROLS

```

```

These parameters are supported for compatibility with smtpd(8) legacy parameters.

postscreen_use_tls ($smtpd_use_tls)

Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but do not require 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 example, "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), Postfix SMTP server
tlsproxy(8), Postfix TLS proxy server
dnsblog(8), DNS allow/denylist logger
postlogd(8), Postfix logging
syslogd(8), 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) 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
```


proxymap

title: proxymap(8)

text:
# proxymap(8)

## NAME
proxymap - Postfix lookup table proxy server

## SYNOPSIS

```
proxymap [generic Postfix daemon options]
```

## DESCRIPTION

The proxymap(8) server provides read-only or read-write table lookup service to Postfix processes. These services are implemented with distinct service names: proxymap and proxywrite, respectively. The purpose of these services is:

- To overcome chroot restrictions. For example, a chrooted SMTP server needs access to the system passwd file in order to reject mail for non-existent local addresses, but it is not practical to maintain a copy of the passwd file in the chroot jail. The solution:

```
local_recipient_maps =

    proxy:unix:passwd.byname $alias_maps
```

- To consolidate the number of open lookup tables by sharing one open table among multiple processes. For example, making mysql connections from every Postfix daemon process results in "too many connections" errors. The solution:

```
virtual_alias_maps =

    proxy:mysql:/etc/postfix/virtual_alias.cf
```

The total number of connections is limited by the number of proxymap server processes.

- To provide single-updater functionality for lookup tables that do not reliably support multiple writers (i.e. all file-based tables).

The proxymap(8) server implements the following requests:

open maptype:mapname flags

Open the table with type maptype and name mapname, as controlled by flags. The reply includes the maptype dependent flags (to distinguish a fixed string table from a regular expression table).

lookup maptype:mapname flags key

Look up the data stored under the requested key. The reply is the request completion status code and the lookup result value. The maptype:mapname and flags are the same as with the open request.

update maptype:mapname flags key value

Update the data stored under the requested key. The reply is the request completion status code. The maptype:mapname and flags are the same as with the open request. To implement single-updater maps, specify a process limit of 1 in the master.cf file entry for the proxywrite service.

This request is supported in Postfix 2.5 and later.

delete maptype:mapname flags key

Delete the data stored under the requested key. The reply is the request completion status code. The maptype:mapname and flags are the same as with the open request. This request is supported in Postfix 2.5 and later.

sequence maptype:mapname flags function

Iterate over the specified database. The function is one of DICT_SEQ_FUN_FIRST or DICT_SEQ_FUN_NEXT. The reply is the request completion status code and a lookup key and result value, if found. This request is supported in Postfix 2.9 and later.

The request completion status is one of OK, RETRY, NOKEY (lookup failed because the key was not found), BAD (malformed request) or DENY (the table is not approved for proxy read or update access).

There is no close command, nor are tables implicitly closed when a client disconnects. The purpose is to share tables among multiple client processes.

## SERVER PROCESS MANAGEMENT

```

```

proxymap(8) servers run under control by the Postfix master(8) server. Each server can handle multiple simultaneous connections. When all servers are busy while a client connects, the master(8) creates a new proxymap(8) server process, provided that the process limit is not exceeded. Each server terminates after serving at least $max_use clients or after $max_idle seconds of idle time.

## SECURITY

```

```

The proxymap(8) server opens only tables that are approved via the proxy_read_maps or proxy_write_maps configuration parameters, does not talk to users, and can run at fixed low privilege, chrooted or not. However, running the proxymap server chrooted severely limits usability, because it can open only chrooted tables.

The proxymap(8) server is not a trusted daemon process, and must not be used to look up sensitive information such as UNIX user or group IDs, mailbox file/directory names or external commands.

In Postfix version 2.2 and later, the proxymap client recognizes requests to access a table for security-sensitive purposes, and opens the table directly. This allows the same main.cf setting to be used by sensitive and non-sensitive processes.

Postfix-writable data files should be stored under a dedicated directory that is writable only by the Postfix mail system, such as the Postfix-owned data_directory.

In particular, Postfix-writable files should never exist in root-owned directories. That would open up a particular type of security hole where ownership of a file or directory does not match the provider of its content.

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8).

## BUGS

The proxymap(8) server provides service to multiple clients, and must therefore not be used for tables that have high-latency lookups.

The proxymap(8) read-write service does not explicitly close lookup tables (even if it did, this could not be relied on, because the process may be terminated between table updates). The read-write service should therefore not be used with tables that leave persistent storage in an inconsistent state between updates (for example, CDB). Tables that support "sync on update" should be safe (for example, Berkeley DB) as should tables that are implemented by a real DBMS.

## CONFIGURATION PARAMETERS

```

```

On busy mail systems a long time may pass before proxymap(8) relevant changes to main.cf are picked up. 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.

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

data_directory (see 'postconf -d' output)

The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

max_idle (100s)

The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.

max_use (100)

The maximal number of incoming connections that a Postfix daemon process will service 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.

proxy_read_maps (see 'postconf -d' output)

The lookup tables that the proxymap(8) server is allowed to access for the read-only service.

Available in Postfix 2.5 and later:

data_directory (see 'postconf -d' output)

The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).

proxy_write_maps (see 'postconf -d' output)

The lookup tables that the proxymap(8) server is allowed to access for the read-write service.

Available in Postfix 3.3 and later:

service_name (read-only)

The master.cf service name of a Postfix daemon process.

## SEE ALSO

```
postconf(5), configuration parameters
master(5), generic daemon options
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
DATABASE_README, Postfix lookup table overview
```

## LICENSE

```

```

The Secure Mailer license must be distributed with this software.

## HISTORY

The proxymap service was introduced with Postfix 2.0.

## 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
```


qmgr

title: qmgr(8)

text:
# qmgr(8)

## NAME
qmgr - Postfix queue manager

## SYNOPSIS

```
qmgr [generic Postfix daemon options]
```

## DESCRIPTION

The qmgr(8) daemon awaits the arrival of incoming mail and arranges for its delivery via Postfix delivery processes. The actual mail routing strategy is delegated to the trivial-rewrite(8) daemon. This program expects to be run from the master(8) process manager.

Mail addressed to the local double-bounce address is logged and discarded. This stops potential loops caused by undeliverable bounce notifications.

## MAIL QUEUES

```

```

The qmgr(8) daemon maintains the following queues:

incoming

Inbound mail from the network, or mail picked up by the local pickup(8) daemon from the maildrop directory.

active

Messages that the queue manager has opened for delivery. Only a limited number of messages is allowed to enter the active queue (leaky bucket strategy, for a fixed delivery rate).

deferred

Mail that could not be delivered upon the first attempt. The queue manager implements exponential backoff by doubling the time between delivery attempts.

corrupt

Unreadable or damaged queue files are moved here for inspection.

hold

Messages that are kept "on hold" are kept here until someone sets them free.

## DELIVERY STATUS REPORTS

```

```

The qmgr(8) daemon keeps an eye on per-message delivery status reports in the following directories. Each status report file has the same name as the corresponding message file:

bounce

Per-recipient status information about why mail is bounced. These files are maintained by the bounce(8) daemon.

defer

Per-recipient status information about why mail is delayed. These files are maintained by the defer(8) daemon.

trace

Per-recipient status information as requested with the Postfix "sendmail -v" or "sendmail -bv" command. These files are maintained by the trace(8) daemon.

The qmgr(8) daemon is responsible for asking the bounce(8), defer(8) or trace(8) daemons to send delivery reports.

## STRATEGIES

```

```

The queue manager implements a variety of strategies for either opening queue files (input) or for message delivery (output).

leaky bucket

This strategy limits the number of messages in the active queue and prevents the queue manager from running out of memory under heavy load.

fairness

When the active queue has room, the queue manager takes one message from the incoming queue and one from the deferred queue. This prevents a large mail backlog from blocking the delivery of new mail.

slow start

This strategy eliminates "thundering herd" problems by slowly adjusting the number of parallel deliveries to the same destination.

round robin

The queue manager sorts delivery requests by destination. Round-robin selection prevents one destination from dominating deliveries to other destinations.

exponential backoff

Mail that cannot be delivered upon the first attempt is deferred. The time interval between delivery attempts is doubled after each attempt.

destination status cache

The queue manager avoids unnecessary delivery attempts by maintaining a short-term, in-memory list of unreachable destinations.

preemptive message scheduling

The queue manager attempts to minimize the average per-recipient delay while still preserving the correct per-message delays, using a sophisticated preemptive message scheduling.

## TRIGGERS

```

```

On an idle system, the queue manager waits for the arrival of trigger events, or it waits for a timer to go off. A trigger is a one-byte message. Depending on the message received, the queue manager performs one of the following actions (the message is followed by the symbolic constant used internally by the software):

D (QMGR_REQ_SCAN_DEFERRED)

Start a deferred queue scan. If a deferred queue scan is already in progress, that scan will be restarted as soon as it finishes.

I (QMGR_REQ_SCAN_INCOMING)

Start an incoming queue scan. If an incoming queue scan is already in progress, that scan will be restarted as soon as it finishes.

A (QMGR_REQ_SCAN_ALL)

Ignore deferred queue file time stamps. The request affects the next deferred queue scan.

F (QMGR_REQ_FLUSH_DEAD)

Purge all information about dead transports and destinations.

W (TRIGGER_REQ_WAKEUP)

Wakeup call, This is used by the master server to instantiate servers that should not go away forever. The action is to start an incoming queue scan.

The qmgr(8) daemon reads an entire buffer worth of triggers. Multiple identical trigger requests are collapsed into one, and trigger requests are sorted so that A and F precede D and I. Thus, in order to force a deferred queue run, one would request A F D; in order to notify the queue manager of the arrival of new mail one would request I.

## STANDARDS

```
RFC 3463 (Enhanced status codes)
RFC 3464 (Delivery status notifications)
```

## SECURITY

```

```

The qmgr(8) daemon is not security sensitive. It reads single-character messages from untrusted local users, and thus may be susceptible to denial of service attacks. The qmgr(8) daemon does not talk to the outside world, and it can be run at fixed low privilege in a chrooted environment.

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8). Corrupted message files are saved to the corrupt queue for further inspection.

Depending on the setting of the notify_classes parameter, the postmaster is notified of bounces and of other trouble.

## BUGS

A single queue manager process has to compete for disk access with multiple front-end processes such as cleanup(8). A sudden burst of inbound mail can negatively impact outbound delivery rates.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are not picked up automatically as qmgr(8) is a persistent process. Use the "postfix reload" command after a configuration change.

The text below provides only a parameter summary. See postconf(5) for more details including examples.

In the text below, transport is the first field in a master.cf entry.

## COMPATIBILITY CONTROLS

```

```

Available before Postfix version 2.5:

allow_min_user (no)

Allow a sender or recipient address to have `-' as the first character.

Available with Postfix version 2.7 and later:

default_filter_nexthop (empty)

When a content_filter or FILTER request specifies no explicit next-hop destination, use $default_filter_nexthop instead; when that value is empty, use the domain in the recipient address.

## ACTIVE QUEUE CONTROLS

```

```

qmgr_clog_warn_time (300s)

The minimal delay between warnings that a specific destination is clogging up the Postfix active queue.

qmgr_message_active_limit (20000)

The maximal number of messages in the active queue.

qmgr_message_recipient_limit (20000)

The maximal number of recipients held in memory by the Postfix queue manager, and the maximal size of the short-term, in-memory "dead" destination status cache.

qmgr_message_recipient_minimum (10)

The minimal number of in-memory recipients for any message.

default_recipient_limit (20000)

The default per-transport upper limit on the number of in-memory recipients.

transport_recipient_limit ($default_recipient_limit)

A transport-specific override for the default_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

default_extra_recipient_limit (1000)

The default value for the extra per-transport limit imposed on the number of in-memory recipients.

transport_extra_recipient_limit ($default_extra_recipient_limit)

A transport-specific override for the default_extra_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

Available in Postfix version 2.4 and later:

default_recipient_refill_limit (100)

The default per-transport limit on the number of recipients refilled at once.

transport_recipient_refill_limit ($default_recipient_refill_limit)

A transport-specific override for the default_recipient_refill_limit parameter value, where transport is the master.cf name of the message delivery transport.

default_recipient_refill_delay (5s)

The default per-transport maximum delay between refilling recipients.

transport_recipient_refill_delay ($default_recipient_refill_delay)

A transport-specific override for the default_recipient_refill_delay parameter value, where transport is the master.cf name of the message delivery transport.

## DELIVERY CONCURRENCY CONTROLS

```

```

initial_destination_concurrency (5)

The initial per-destination concurrency level for parallel delivery to the same destination.

default_destination_concurrency_limit (20)

The default maximal number of parallel deliveries to the same destination.

transport_destination_concurrency_limit ($default_destination_concurrency_limit)

A transport-specific override for the default_destination_concurrency_limit parameter value, where transport is the master.cf name of the message delivery transport.

Available in Postfix version 2.5 and later:

transport_initial_destination_concurrency ($initial_destination_concurrency)

A transport-specific override for the initial_destination_concurrency parameter value, where transport is the master.cf name of the message delivery transport.

default_destination_concurrency_failed_cohort_limit (1)

How many pseudo-cohorts must suffer connection or handshake failure before a specific destination is considered unavailable (and further delivery is suspended).

transport_destination_concurrency_failed_cohort_limit ($default_destination_concurrency_failed_cohort_limit)

A transport-specific override for the default_destination_concurrency_failed_cohort_limit parameter value, where transport is the master.cf name of the message delivery transport.

default_destination_concurrency_negative_feedback (1)

The per-destination amount of delivery concurrency negative feedback, after a delivery completes with a connection or handshake failure.

transport_destination_concurrency_negative_feedback ($default_destination_concurrency_negative_feedback)

A transport-specific override for the default_destination_concurrency_negative_feedback parameter value, where transport is the master.cf name of the message delivery transport.

default_destination_concurrency_positive_feedback (1)

The per-destination amount of delivery concurrency positive feedback, after a delivery completes without connection or handshake failure.

transport_destination_concurrency_positive_feedback ($default_destination_concurrency_positive_feedback)

A transport-specific override for the default_destination_concurrency_positive_feedback parameter value, where transport is the master.cf name of the message delivery transport.

destination_concurrency_feedback_debug (no)

Make the queue manager's feedback algorithm verbose for performance analysis purposes.

## RECIPIENT SCHEDULING CONTROLS

```

```

default_destination_recipient_limit (50)

The default maximal number of recipients per message delivery.

transport_destination_recipient_limit ($default_destination_recipient_limit)

A transport-specific override for the default_destination_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

## MESSAGE SCHEDULING CONTROLS

```

```

default_delivery_slot_cost (5)

How often the Postfix queue manager's scheduler is allowed to preempt delivery of one message with another.

transport_delivery_slot_cost ($default_delivery_slot_cost)

A transport-specific override for the default_delivery_slot_cost parameter value, where transport is the master.cf name of the message delivery transport.

default_minimum_delivery_slots (3)

How many recipients a message must have in order to invoke the Postfix queue manager's scheduling algorithm at all.

transport_minimum_delivery_slots ($default_minimum_delivery_slots)

A transport-specific override for the default_minimum_delivery_slots parameter value, where transport is the master.cf name of the message delivery transport.

default_delivery_slot_discount (50)

The default value for transport-specific _delivery_slot_discount settings.

transport_delivery_slot_discount ($default_delivery_slot_discount)

A transport-specific override for the default_delivery_slot_discount parameter value, where transport is the master.cf name of the message delivery transport.

default_delivery_slot_loan (3)

The default value for transport-specific _delivery_slot_loan settings.

transport_delivery_slot_loan ($default_delivery_slot_loan)

A transport-specific override for the default_delivery_slot_loan parameter value, where transport is the master.cf name of the message delivery transport.

## OTHER RESOURCE AND RATE CONTROLS

```

```

minimal_backoff_time (300s)

The minimal time between attempts to deliver a deferred message; prior to Postfix 2.4 the default value was 1000s.

maximal_backoff_time (4000s)

The maximal time between attempts to deliver a deferred message.

maximal_queue_lifetime (5d)

Consider a message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the maximal_queue_lifetime limit.

queue_run_delay (300s)

The time between deferred queue scans by the queue manager; prior to Postfix 2.4 the default value was 1000s.

transport_retry_time (60s)

The time between attempts by the Postfix queue manager to contact a malfunctioning message delivery transport.

Available in Postfix version 2.1 and later:

bounce_queue_lifetime (5d)

Consider a bounce message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the bounce_queue_lifetime limit.

Available in Postfix version 2.5 and later:

default_destination_rate_delay (0s)

The default amount of delay that is inserted between individual message deliveries to the same destination and over the same message delivery transport.

transport_destination_rate_delay ($default_destination_rate_delay)

A transport-specific override for the default_destination_rate_delay parameter value, where transport is the master.cf name of the message delivery transport.

Available in Postfix version 3.1 and later:

default_transport_rate_delay (0s)

The default amount of delay that is inserted between individual message deliveries over the same message delivery transport, regardless of destination.

transport_transport_rate_delay ($default_transport_rate_delay)

A transport-specific override for the default_transport_rate_delay parameter value, where the initial transport in the parameter name is the master.cf name of the message delivery transport.

## SAFETY CONTROLS

```

```

qmgr_daemon_timeout (1000s)

How much time a Postfix queue manager process may take to handle a request before it is terminated by a built-in watchdog timer.

qmgr_ipc_timeout (60s)

The time limit for the queue manager to send or receive information over an internal communication channel.

Available in Postfix version 3.1 and later:

address_verify_pending_request_limit (see 'postconf -d' output)

A safety limit that prevents address verification requests from overwhelming the Postfix queue.

## MISCELLANEOUS CONTROLS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

defer_transports (empty)

The names of message delivery transports that should not deliver mail unless someone issues "sendmail -q" or equivalent.

delay_logging_resolution_limit (2)

The maximal number of digits after the decimal point when logging sub-second delay values.

helpful_warnings (yes)

Log warnings about problematic configuration settings, and provide helpful suggestions.

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.

queue_directory (see 'postconf -d' output)

The location of the Postfix top-level queue directory.

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 example, "smtpd" becomes "prefix/smtpd".

Available in Postfix version 3.0 and later:

confirm_delay_cleared (no)

After sending a "your message is delayed" notification, inform the sender when the delay clears up.

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

## FILES

```
/var/spool/postfix/incoming, incoming queue
/var/spool/postfix/active, active queue
/var/spool/postfix/deferred, deferred queue
/var/spool/postfix/bounce, non-delivery status
/var/spool/postfix/defer, non-delivery status
/var/spool/postfix/trace, delivery status
```

## SEE ALSO

```
trivial-rewrite(8), address routing
bounce(8), delivery status reports
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
SCHEDULER_README, scheduling algorithm
QSHAPE_README, Postfix queue analysis
```

## 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
Preemptive scheduler enhancements:
Patrik Rak
Modra 6
155 00, Prague, Czech Republic
Wietse Venema
Google, Inc.
111 8th Avenue
New York, NY 10011, USA
```


qmqpd

title: qmqpd(8)

text:
# qmqpd(8)

## NAME
qmqpd - Postfix QMQP server

## SYNOPSIS

```
qmqpd [generic Postfix daemon options]
```

## DESCRIPTION

The Postfix QMQP server receives one message per connection. Each message is piped through the cleanup(8) daemon, and is placed into the incoming queue as one single queue file. The program expects to be run from the master(8) process manager.

The QMQP server implements one access policy: only explicitly authorized client hosts are allowed to use the service.

## SECURITY

```

```

The QMQP server is moderately security-sensitive. It talks to QMQP clients and to DNS servers on the network. The QMQP server can be run chrooted at fixed low privilege.

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8).

## BUGS

The QMQP protocol provides only one server reply per message delivery. It is therefore not possible to reject individual recipients.

The QMQP protocol requires the server to receive the entire message before replying. If a message is malformed, or if any netstring component is longer than acceptable, Postfix replies immediately and closes the connection. It is left up to the client to handle the situation.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically, as qmqpd(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.

## CONTENT INSPECTION CONTROLS

```

```

content_filter (empty)

After the message is queued, send the entire message to the specified transport:destination.

receive_override_options (empty)

Enable or disable recipient validation, built-in content filtering, or address mapping.

## SMTPUTF8 CONTROLS

```

```

Preliminary SMTPUTF8 support is introduced with Postfix 3.0.

smtputf8_enable (yes)

Enable preliminary SMTPUTF8 support for the protocols described in RFC 6531, RFC 6532, and RFC 6533.

smtputf8_autodetect_classes (sendmail, verify)

Detect that a message requires SMTPUTF8 support for the specified mail origin classes.

Available in Postfix version 3.2 and later:

enable_idna2003_compatibility (no)

Enable 'transitional' compatibility between IDNA2003 and IDNA2008, when converting UTF-8 domain names to/from the ASCII form that is used for DNS lookups.

## RESOURCE AND RATE CONTROLS

```

```

line_length_limit (2048)

Upon input, long lines are chopped up into pieces of at most this length; upon delivery, long lines are reconstructed.

hopcount_limit (50)

The maximal number of Received: message headers that is allowed in the primary message headers.

message_size_limit (10240000)

The maximal size in bytes of a message, including envelope information.

qmqpd_timeout (300s)

The time limit for sending or receiving information over the network.

## TROUBLE SHOOTING CONTROLS

```

```

debug_peer_level (2)

The increment in verbose logging level when a nexthop destination, remote client or server name or network address matches a pattern given with the debug_peer_list parameter.

debug_peer_list (empty)

Optional list of nexthop destination, remote client or server name or network address patterns that, if matched, cause the verbose logging level to increase by the amount specified in $debug_peer_level.

soft_bounce (no)

Safety net to keep mail queued that would otherwise be returned to the sender.

## TARPIT CONTROLS

```

```

qmqpd_error_delay (1s)

How long the Postfix QMQP server will pause before sending a negative reply to the remote QMQP client.

## MISCELLANEOUS CONTROLS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

max_idle (100s)

The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.

max_use (100)

The maximal number of incoming connections that a Postfix daemon process will service 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.

qmqpd_authorized_clients (empty)

What remote QMQP clients are allowed to connect to the Postfix QMQP server port.

queue_directory (see 'postconf -d' output)

The location of the Postfix top-level queue directory.

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 example, "smtpd" becomes "prefix/smtpd".

verp_delimiter_filter (-=+)

The characters Postfix accepts as VERP delimiter characters on the Postfix sendmail(1) command line and in SMTP commands.

Available in Postfix version 2.5 and later:

qmqpd_client_port_logging (no)

Enable logging of the remote QMQP client port in addition to the hostname and IP address.

Available in Postfix 3.3 and later:

service_name (read-only)

The master.cf service name of a Postfix daemon process.

## SEE ALSO

```
http://cr.yp.to/proto/qmqp.html, QMQP protocol
cleanup(8), message canonicalization
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
QMQP_README, Postfix ezmlm-idx howto.
```

## LICENSE

```

```

The Secure Mailer license must be distributed with this software.

## HISTORY

The qmqpd service was introduced with Postfix version 1.1.

## 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
```


scache

title: scache(8)

text:
# scache(8)

## NAME
scache - Postfix shared connection cache server

## SYNOPSIS

```
scache [generic Postfix daemon options]
```

## DESCRIPTION

The scache(8) server maintains a shared multi-connection cache. This information can be used by, for example, Postfix SMTP clients or other Postfix delivery agents.

The connection cache is organized into logical destination names, physical endpoint names, and connections.

As a specific example, logical SMTP destinations specify (transport, domain, port), and physical SMTP endpoints specify (transport, IP address, port). An SMTP connection may be saved after a successful mail transaction.

In the general case, one logical destination may refer to zero or more physical endpoints, one physical endpoint may be referenced by zero or more logical destinations, and one endpoint may refer to zero or more connections.

The exact syntax of a logical destination or endpoint name is application dependent; the scache(8) server does not care. A connection is stored as a file descriptor together with application-dependent information that is needed to re-activate a connection object. Again, the scache(8) server is completely unaware of the details of that information.

All information is stored with a finite time to live (ttl). The connection cache daemon terminates when no client is connected for max_idle time units.

This server implements the following requests:

save_endp ttl endpoint endpoint_properties file_descriptor

Save the specified file descriptor and connection property data under the specified endpoint name. The endpoint properties are used by the client to re-activate a passivated connection object.

find_endp endpoint

Look up cached properties and a cached file descriptor for the specified endpoint.

save_dest ttl destination destination_properties endpoint

Save the binding between a logical destination and an endpoint under the destination name, together with destination specific connection properties. The destination properties are used by the client to re-activate a passivated connection object.

find_dest destination

Look up cached destination properties, cached endpoint properties, and a cached file descriptor for the specified logical destination.

## SECURITY

```

```

The scache(8) server is not security-sensitive. It does not talk to the network, and it does not talk to local users. The scache(8) server can run chrooted at fixed low privilege.

The scache(8) server is not a trusted process. It must not be used to store information that is security sensitive.

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8).

## BUGS

The session cache cannot be shared among multiple machines.

When a connection expires from the cache, it is closed without the appropriate protocol specific handshake.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically as scache(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.

## RESOURCE CONTROLS

```

```

connection_cache_ttl_limit (2s)

The maximal time-to-live value that the scache(8) connection cache server allows.

connection_cache_status_update_time (600s)

How frequently the scache(8) server logs usage statistics with connection cache hit and miss rates for logical destinations and for physical endpoints.

## MISCELLANEOUS CONTROLS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

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 example, "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.

## SEE ALSO

```
smtp(8), SMTP client
postconf(5), configuration parameters
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
CONNECTION_CACHE_README, Postfix connection cache
```

## LICENSE

```

```

The Secure Mailer license must be distributed with this software.

## HISTORY

This service was introduced with Postfix version 2.2.

## 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
```


showq

title: showq(8)

text:
# showq(8)

## NAME
showq - list the Postfix mail queue

## SYNOPSIS

```
showq [generic Postfix daemon options]
```

## DESCRIPTION

The showq(8) daemon reports the Postfix mail queue status. The output is meant to be formatted by the postqueue(1) command, as it emulates the Sendmail `mailq' command.

The showq(8) daemon can also be run in stand-alone mode by the superuser. This mode of operation is used to emulate the `mailq' command while the Postfix mail system is down.

## SECURITY

```

```

The showq(8) daemon can run in a chroot jail at fixed low privilege, and takes no input from the client. Its service port is accessible to local untrusted users, so the service can be susceptible to denial of service attacks.

## STANDARDS

```

```

None. The showq(8) daemon does not interact with the outside world.

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8).

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically as showq(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.

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

duplicate_filter_limit (1000)

The maximal number of addresses remembered by the address duplicate filter for aliases(5) or virtual(5) alias expansion, or for showq(8) queue displays.

empty_address_recipient (MAILER-DAEMON)

The recipient of mail addressed to the null address.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

max_idle (100s)

The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.

max_use (100)

The maximal number of incoming connections that a Postfix daemon process will service 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.

queue_directory (see 'postconf -d' output)

The location of the Postfix top-level queue directory.

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 example, "smtpd" becomes "prefix/smtpd".

Available in Postfix version 2.9 and later:

enable_long_queue_ids (no)

Enable long, non-repeating, queue IDs (queue file names).

Available in Postfix 3.3 and later:

service_name (read-only)

The master.cf service name of a Postfix daemon process.

## FILES

```
/var/spool/postfix, queue directories
```

## SEE ALSO

```
pickup(8), local mail pickup service
cleanup(8), canonicalize and enqueue mail
qmgr(8), queue manager
postconf(5), configuration parameters
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## 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
Wietse Venema
Google, Inc.
111 8th Avenue
New York, NY 10011, USA
```