↑ ↓ select, Enter open, Esc close

Find permanently rejected emails in the mail log

Adjust the values, the command updates live
root@server
grep "status=bounced" /var/log/maillog | tail -n 20

Lists the last 20 permanently failed deliveries. At the end of each line, the remote server’s response is shown in parentheses, for example an unknown recipient, a full mailbox or a rejection due to a blacklist, SPF or DKIM. If the same reasons pile up across different recipients, the problem is usually on your own server.

Also searched as

  • emails are being rejected
  • undeliverable message cause
  • server blacklisted emails bounce back

Related one-liners

All in Mail

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.