Updated: 28 September 2026 · Applies to: Postfix 3.8 (Ubuntu 24.04) and 3.10 (Ubuntu 26.04)

When a message does not arrive, the Postfix log usually tells you why. This guide shows where the log is, how to find one message, and how to understand the most common SMTP error codes and texts.

Where is the log?

sudo journalctl -t postfix/smtp -t postfix/qmgr -t postfix/smtpd --since "1 hour ago"
sudo tail -f /var/log/mail.log     # if the file exists on your system

Ubuntu servers keep logs in the systemd journal; some installations also write /var/log/mail.log. If you use a separate transport such as out1 (How to make Postfix send from a specific IP address with a matching HELO name?), its lines have the tag postfix/out1.

Follow one message

  1. Find the message in the log by recipient: sudo journalctl -t postfix/smtp --since today | grep "to=<jane@example.org>".
  2. Note the queue ID at the start of the line (for example 4F3A21B2C).
  3. Show all lines of that message: sudo journalctl --since today | grep 4F3A21B2C.
  4. Read status=: sent (accepted by the recipient's server), deferred (try again later), bounced (permanent failure).
  5. Read the text in parentheses: it is what the other server answered.

Check the queue

postqueue -p          # what is waiting and why
postqueue -f          # try again now
sudo postcat -q 4F3A21B2C | head -40   # show one queued message

What the codes mean

The first digit says what kind of answer it is: 2 = OK, 4 = temporary (Postfix retries), 5 = permanent (Postfix gives up and returns a bounce). The second number group (like 5.1.1 or 4.7.0) is the enhanced status code defined in RFC 3463: the first part 5.1.x is about addressing, x.2.x about the mailbox, x.4.x about the network, x.5.x about the protocol and x.7.x about policy and security.

Useful counts

sudo journalctl -t postfix/smtp --since "1 hour ago" | grep -c "status=sent"
sudo journalctl -t postfix/smtp --since "1 hour ago" | grep -c "status=deferred"
sudo journalctl -t postfix/smtp --since "1 hour ago" | grep -c "status=bounced"

Compare the three numbers. Many deferred lines from one provider are a sign to slow down; many bounces are a sign of a bad list.

Frequently asked questions

The log says status=sent, but the mail is not in the inbox.
The receiver accepted it and then filtered it, most likely into spam. Check authentication, reputation and content (How to test authentication and deliverability of your outgoing email?).

How long does Postfix retry?
By default 5 days (maximal_queue_lifetime), then it returns a bounce.

Source: RFC 3463: Enhanced Mail System Status Codes.

Need a dedicated server, more IP addresses, or a hand with the setup?

Prefer a hand with the setup? Our engineers can do it for you: Hire an Expert, or use our on-demand server management.

Was this answer helpful? 0 Users Found This Useful (0 Votes)