When should I send QUIT to an SMTP server? and how long should i have a session?

I program the smtp sender to send a large number of individual emails (not spam). Since there are many destination addresses that belong to a common provider, for example hotmail.com/gmail.com. I would like to combine TCP connections to reuse the session. Is this a good practice? Or should I disconnect and connect to send individual letters?

Since there are a lot of subscribers, the consolidated connection can be stored for a long time (for example, 1 hour), should I actively release the connection at some point?

The last thing that confused me was the destination IP addresses, as I found out that hotmail.com has a lot of mx servers (at least 12). Is it different if I send most of the emails to only one of the servers or separate them and send them to all the servers?

Sorry to ask several questions at the same time, and appreciate your opinion and answer.

+3
source share
2 answers

Connect, send X email addresses for the purpose, disconnect. X should IMHO be somewhere around 16 to 64 - some servers do not like too much in one connection and otherwise will be thrown out.

/ , , .

MX, . .

+1

IMHO, , , , , . , , .

SMTP- , .

, Outlook .

0

Source: https://habr.com/ru/post/1737494/


All Articles