FLUSH(8) FLUSH(8) NAME flush - Postfix fast flush server SYNOPSIS flush [generic Postfix daemon options] DESCRIPTION The flush server maintains a record of deferred mail by destination. This information is used to improve the per- formance of the SMTP ETRN request, and of its command-line equivalent, sendmail -qR. This program expects to be run from the master(8) process manager. The record is implemented as a per-destination logfile with as contents the queue IDs of deferred mail. A logfile is append-only, and is truncated when delivery is requested for the corresponding destination. A destination is the part on the right-hand side of the right-most @ in an email address. Per-destination logfiles of deferred mail are maintained only for eligible destinations. The list of eligible des- tinations is specified with the fast_flush_domains config- uration parameter, which defaults to $relay_domains. This server implements the following requests: FLUSH_REQ_ADD sitename queue_id Inform the fast flush server that the specified message is queued for sitename. Depending on log- ging policy, the fast flush server stores or ignores the information. FLUSH_REQ_SEND sitename Request delivery of mail that is queued for site- name. If the destination is eligible for a fast flush logfile, this request triggers delivery of messages listed in that destination's logfile, and the logfile is truncated to zero length; if mail is undeliverable it will be added back to the logfile. If the destination is not eligible for a fast flush logfile, this request triggers delivery of all queued mail. TRIGGER_REQ_WAKEUP This wakeup request from the master is an alterna- tive way to request FLUSH_REQ_REFRESH. FLUSH_REQ_REFRESH (completes in the background) Refresh non-empty per-destination logfiles that were not read in fast_flush_refresh_time hours, by simulating send requests (see above) for the corre- sponding destinations. 1 FLUSH(8) FLUSH(8) Delete empty per-destination logfiles that were not updated in fast_flush_purge_time days. FLUSH_REQ_PURGE (completes in the background) Refresh all non-empty per-destination logfiles, by simulating send requests (see above) for the corre- sponding destinations. This can be incredibly expensive when logging is enabled for many destina- tions, and is not recommended. Delete empty per-destination logfiles that were not updated in fast_flush_purge_time days. The server response is one of: FLUSH_STAT_OK The request completed normally. FLUSH_STAT_BAD The flush server rejected the request (bad request name, bad request parameter value). FLUSH_STAT_FAIL The request failed. SECURITY The fast flush server is not security-sensitive. It does not talk to the network, and it does not talk to local users. The fast flush server can run chrooted at fixed low privilege. DIAGNOSTICS Problems and transactions are logged to syslogd(8). BUGS Fast flush logfiles are truncated only after a FLUSH_REQ_SEND request, not when mail is actually deliv- ered, and therefore can accumulate outdated or redundant data. In order to maintain sanity, FLUSH_REQ_REFRESH must be executed periodically. This can be automated with a suitable wakeup timer setting in the master.cf configura- tion file. Upon receipt of a request to deliver all mail for an eli- gible destination, the flush server requests delivery of all messages that are listed in that destination's log- file, regardless of the recipients of those messages. This is not an issue for mail that is sent to a relay_domains destination because such mail typically only has recipi- ents in one domain. FILES /var/spool/postfix/flush, location of "fast flush" logfiles. 2 FLUSH(8) FLUSH(8) CONFIGURATION PARAMETERS See the Postfix main.cf file for syntax details and for default values. Use the postfix reload command after a configuration change. fast_flush_domains What destinations can have a "fast flush" logfile. By default, this is set to $relay_domains. fast_flush_refresh_time Refresh a non-empty "fast flush" logfile that was not read in this amount of time (default time unit: hours), by simulating a send request for the corre- sponding destination. fast_flush_purge_time Remove an empty "fast flush" logfile that was not updated in this amount of time (default time unit: days). SEE ALSO smtpd(8) Postfix SMTP server qmgr(8) Postfix queue manager 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 3