J
J
JulieDD2022-01-22 12:10:48
Email
JulieDD, 2022-01-22 12:10:48

What happens after a tcp connection is established using the SMTP protocol?

Письмо уже напечатано с помощью почтового клиента(Outlook, например), мы нажали кнопочку "отправить". После этого отправляется ARP-запрос, далее DNS-запрос, и наконец, установлено TCP-соединение.

Мы установили tcp-соединение с почтовым сервером, что происходит потом, письмо сразу не отправляется, есть какой-то служебный обмен в виде каких-то стандартизованных сообщений, которые передаются в определённой последовательности, что это за сообщения?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2022-01-22
@karabanov

These are the messages
Example in PHP
You can manually send a letter by connecting to the 25th port using telnetor nc(netcat), for example

A
Alexander Falaleev, 2022-01-22
@suffix_ixbt

[000.000]		Trying TLS on mail.babai.ru[185.248.101.86:25] (10)
[000.117]		Server answered
[000.827]	<  	220 mail.babai.ru, ESMTP EXIM 4.93
[000.828]		We are allowed to connect
[000.828]	  >	EHLO www11-do.CheckTLS.com
[000.944]	<  	250-mail.babai.ru Hello www11-do.checktls.com [167.71.160.115]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN CRAM-MD5
250-STARTTLS
250 HELP
[000.944]		We can use this server
[000.945]		TLS is an option on this server
[000.945]	  >	STARTTLS
[001.062]	<  	220 TLS go ahead
[001.062]		STARTTLS command works on this server
[001.193]		Connection converted to SSL
    SSLVersion in use: TLSv1_3
    Cipher in use: TLS_AES_256_GCM_SHA384
    Perfect Forward Secrecy: yes
    Certificate #1 of 3 (sent by MX):
    Cert VALIDATED: ok
    Cert Hostname VERIFIED (mail.babai.ru = mail.babai.ru | DNS:mail.babai.ru)
    Not Valid Before: Jun 16 00:00:00 2021 GMT
    Not Valid After: Jul 17 23:59:59 2022 GMT
    subject= /CN=mail.babai.ru
    issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=Thawte RSA CA 2018
    Certificate #2 of 3 (sent by MX):
    Cert VALIDATED: ok
    Not Valid Before: Nov  6 12:23:52 2017 GMT
    Not Valid After: Nov  6 12:23:52 2027 GMT
    subject= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=Thawte RSA CA 2018
    issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
    Certificate #3 of 3 (added from CA Root Store):
    Cert VALIDATED: ok
    Not Valid Before: Nov 10 00:00:00 2006 GMT
    Not Valid After: Nov 10 00:00:00 2031 GMT
    subject= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
    issuer= /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
[001.576]	~~>	EHLO www11-do.CheckTLS.com
[001.693]	<~~	250-mail.babai.ru Hello www11-do.checktls.com [167.71.160.115]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN CRAM-MD5
250 HELP
[001.694]		TLS successfully started on this server
[001.694]	~~>	MAIL FROM:<[email protected]>
[001.810]	<~~	250 OK
[001.811]		Sender is OK
[001.811]	~~>	QUIT
[001.927]	<~~	221 mail.babai.ru closing connection

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question