# man > discard(8)

---
type: CommandReference
command: discard
mode: man
section: 8
source: man-pages
---

## Quick Reference

- `discard` — delivery agent that silently discards mail, logging the next-hop destination as the reason
- `discard unix - n n - - discard` — typical master.cf entry to discard mail for a transport
- `discard unix - n n - - discard -o discard_detail_code=5.2.0` — discard with custom RFC 3463 detail code
- `transport_maps` — use in transport map to route mail to discard
- `discard(discard_detail_code=5.2.0)` — per-recipient override in transport map

## Name

discard - Postfix discard mail delivery agent

## Synopsis

`discard [generic Postfix daemon options]`

## Description

The `discard` delivery agent processes delivery requests from the queue manager. It pretends to deliver all recipients, logs the next-hop destination as the reason for discarding, updates the queue file, and marks recipients as finished or requests a later retry. The reason may be prefixed with an RFC 3463-compatible detail code. Delivery status reports are sent to `trace(8)` as appropriate.

## Options

The `discard` daemon accepts the standard Postfix daemon options (see `master(5)`). In addition, the following configuration parameters are relevant:

- `daemon_timeout` (18000s) — time limit for handling a request before watchdog termination
- `max_idle` (100s) — max idle time before voluntary termination
- `max_use` (100) — max number of connections before voluntary termination
- `ipc_timeout` (3600s) — time limit for internal communication
- `delay_logging_resolution_limit` (2) — decimal places in sub-second delay logs
- `double_bounce_sender` (double-bounce) — sender address for postmaster notifications
- `syslog_facility` (mail) — syslog facility
- `syslog_name` (see `postconf -d`) — prefix for process name in syslog
- `service_name` (read-only) — master.cf service name (Postfix 3.3+)

## Examples

**Discard all mail for a domain** in `main.cf`:

shell
transport_maps = hash:/etc/postfix/transport
In `/etc/postfix/transport`:

example.com   discard:
**Discard with a specific detail code** in `master.cf`:

discard unix - n n - - discard
    -o discard_detail_code=5.2.0
Or per-recipient in a transport map:

user@example.com   discard:discard_detail_code=5.2.0
## See Also

- [qmgr(8)](https://www.chedong.com/phpMan.php/man/qmgr/8/markdown) — queue manager
- [bounce(8)](https://www.chedong.com/phpMan.php/man/bounce/8/markdown) — delivery status reports
- [error(8)](https://www.chedong.com/phpMan.php/man/error/8/markdown) — Postfix error delivery agent
- [postconf(5)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown) — configuration parameters
- [master(5)](https://www.chedong.com/phpMan.php/man/master/5/markdown) — generic daemon options
- [master(8)](https://www.chedong.com/phpMan.php/man/master/8/markdown) — process manager
- [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

## Exit Codes

Not documented.