9

I sent an email to 2 receipients and I checked maillog:

tail -5000 maillog | grep "020EE4202065"

Aug  7 17:31:24 mail postfix/smtpd[7478]: 020EE4202065: client=NodoOffice[118.70.28.223], sasl_method=PLAIN, sasl_username=ngadt@my_great_company.com
Aug  7 17:31:24 mail postfix/cleanup[7485]: 020EE4202065: message-id=<6b36518e-14b1-6fac-dd27-c4c900aff87c@my_great_company.com>
Aug  7 17:31:28 mail opendkim[1717]: 020EE4202065: DKIM-Signature field added (s=default, d=my_great_company.com)
Aug  7 17:31:28 mail postfix/qmgr[2817]: 020EE4202065: from=<ngadt@my_great_company.com>, size=5481240, nrcpt=2 (queue active)
Aug  7 17:31:32 mail postfix/smtp[7487]: 020EE4202065: to=<mrs_lorem@the-bank.com.vn>, relay=mail.the-bank.com.vn[103.11.172.xx]:25, delay=8.3, delays=4.3/0.07/0.31/3.6, dsn=2.6.0, status=sent (250 2.6.0 <6b36518e-14b1-6fac-dd27-c4c900aff87c@my_great_company.com> [InternalId=23138874] Queued mail for delivery)
Aug  7 17:31:53 mail postfix/smtp[7486]: 020EE4202065: to=<mr_ipsum@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.204.26]:25, delay=30, delays=4.3/0.03/3/23, dsn=2.0.0, status=sent (250 2.0.0 OK 1502101899 g4si5235454plk.325 - gsmtp)
Aug  7 17:31:53 mail postfix/qmgr[2817]: 020EE4202065: removed

I noticed that there is an extra info

[InternalId=23138874] Queued mail for delivery

in the line to=<mrs_lorem@the-bank.com.vn> and mrs_lorem@the-bank.com.vn says that she doesn't see that email in her mailbox.

Could you please explain what does that (Queued mail for delivery) mean? And did email server at the-bank.com.vn received that email?

Thank you!

ThanhLoyal
  • 193
  • 1
  • 1
  • 5
  • 1
    It means the mail server that accepted the message replied 'Queued mail for delivery' and it's entirely out of your hands now. –  Aug 08 '17 at 02:07
  • This log snippet was extracted from *my server*. Did my server send that email to server at the-bank? – ThanhLoyal Aug 08 '17 at 02:21
  • I already answered that question. (yes) –  Aug 08 '17 at 02:30

2 Answers2

10

Just to add some extra info to this. Regarding lines like the following -

Aug  7 17:31:32 mail postfix/smtp[7487]: 020EE4202065: to=<mrs_lorem@the-bank.com.vn>, relay=mail.the-bank.com.vn[103.11.172.xx]:25, delay=8.3, delays=4.3/0.07/0.31/3.6, dsn=2.6.0, status=sent (250 2.6.0 <6b36518e-14b1-6fac-dd27-c4c900aff87c@my_great_company.com> [InternalId=23138874] Queued mail for delivery)

The important things for you are relay=mail.the-bank.com.vn and status=sent. Those two fields basically confirm that your server connected to mail.the-bank.com.vn in order to deliver the email, and that server accepted the message. From that point on your server has done its job and it's up to the recipient's server to continue delivery.

About this message on the end -

(250 2.6.0 <6b36518e-14b1-6fac-dd27-c4c900aff87c@my_great_company.com> [InternalId=23138874] Queued mail for delivery)

When an SMTP client connects to a mail server, it sends a sequence of commands, like the following example (C = Client, S = Server)

C> MAIL FROM: sender@domain.com
S> 250 2.1.0 OK
C> RCPT TO: recipient@otherdomain.com
S> 250 2.1.5 Ok
... etc ...

Each command sent by the client gets a response from the server which starts with a status code, 2xx codes being success. There's also usually a second code after this, but the rest of the line can generally be whatever the server wants to send.

The text in brackets in the log is the entire line returned by the recipient's server when your system finished giving it the message. This starts with the status code (success in this case), but the rest of it is just whatever the server wanted to send.

In this case that looks like the normal response from an Exchange server (IIRC), and basically says thanks, I've put the message in my queue ready to deliver. (Most mail servers have processes that handle accepting inbound mail, placing it in a inbound-delivery queue, and separate processes that actually deliver the message to mailboxes.)

Having this in the log is often useful for debugging because it usually contains the message ID the recipient server assigned the message (If the recipient's mail admin can't find the message you can give them the log entry / id). Gmail return the following for instance, which appears to be their timestamp (handy if someone complains about a message at 10:45:23, but after scouring logs you discover the sender's time is 3 hours out), and an ID.

(250 2.0.0 OK 1502179523 b127si743181wmc.127 - gsmtp)

Basically, SMTP server developers usually put text in that last response that will help that server's administrator locate/track the message.

USD Matt
  • 5,381
  • 15
  • 23
6

That's already answered in the comments but for the technical explanation.

In that message all the part between parenthesis are the "other side" response. The first number is the return code. 250 is the OK of the SMTP (simple mail transfer protocol) and is the only response mandatory the rest varies from server to server and between actions

http://www.rfc-editor.org/rfc/rfc2821.txt section 4.2.2

theist
  • 1,229
  • 2
  • 10
  • 24