commands=N
is not an error message, direct indication of success or failure; it's just for your information that during SMTP exchange there was N commands issued by the client, for you to roughly understand how long the conversation took.
Typical SMTP conversation looks like the following:
(connection established)
(server) 220 server.host.nam.me ESMTP blah-blah blah ...
(client) HELO [or EHLO] client.host.na.me
(server) 250-...
250-...
250 (proceed)
(client) MAIL FROM: [envelope sender email address]
(server) 250 (proceed)
(client) RCPT TO: [envelope recipient email address]
(server) 250 (proceed)
(client) DATA
(server) 250 (proceed end message with CRLF | "." | CRLF)
(client) message headers and data
(client) .
(server) 250 QUEUED as [some name]
(client) QUIT
(server) 221 Goodbye!
(connection terminated)
If you count how many times client did something, you'd find it's 5: HELO
, MAIL FROM
, RCPT TO
, DATA
and QUIT
. Those are commands, and as you see, typically it takes 5 commands to send a mail. In some cases it might be more: client may authenticate, or have several RCPT TO
commands (to add more recipients for this message), or whatever. I believe this is your case: additional recipient admin@...
causes extra RCPT TO
command to be issued.
Also in some cases server or client may interrupt the conversation early. For example, if server doesn't want to relay mail with certain envelope sender address, it may indicate error instead of 250 (accepted) reply code after receiving MAIL FROM
, and client may reply with QUIT
to that, resulting in a conversation taking less than 5 commands. So if you see a number less that 5 there, it may be the indication of a failure (but not always).
The only definitive indication of the delivery status of a message is the word after the status=
in the log line:
Aug 10 07:29:46 ubuntu postfix/smtp[1669639]: 1B16341206: to=<[email protected]>, relay=route1.mx.cloudflare.net[2606:4700:f5::c]:25, delay=2.6, delays=0.01/0/0.19/2.4, dsn=2.0.0, status=sent (250 2.0.0 Ok)
This mail was sent
, which really means, the route1.mx.cloudflare.net
server replied with 250 (ok) ...
after the last dot in the DATA command during the SMTP conversation. There may be other status here, which mean their corresponding statuses, and it is how Postfix indicates problems with the delivery.