On Thu, Dec 22, 2022 at 04:47:57AM +0400, Samer Afach <samer.af...@msn.com> wrote:
> If I were you, I'd focus on my lack of understanding of the email protocol. > Now that, is a part that I still cannot fully understand, embarrassingly so. > I still don't know what ehlo means, except that it's the first message. I > don't know why it matters what address we put after it. That does make me > look like an idiot, doesn't it? :-) There are hundreds of RFCs (at least!) involved in all the facets of email. Nobody is born having already read them all. Learning anything takes time. And email is famously complex. There's an old quote from Sendmail's documentation that says: The world is complex, and the mail configuration reflects that. But you don't have to read all the RFCs, they are mostly for implementers. Although I recommend it whenever you really want to understand the details of formats and protocols that you are interested in. It might seem daunting, but it's worth the effort. Reading a fair amount of Postfix documentation is needed, though, if using Postfix to handle your email, and your requirements aren't simple. The http://www.postfix.org website has links to lots of documentation. Read what seems relevant to your needs. And look for tutorials relevant to your needs elsewhere on the internet as well. Back to EHLO... EHLO is the first client message in the SMTP protocol. Originally, the first message was HELO and it includes the hostname of the client (so the server knows who is saying hello). That matters because a lot of mail servers will check that that hostname is sensible. They do that because (presumably) a lot of spam comes from clients that don't provide a sensible hostname. Ideally, the hostname would be one that matches the public IP address of the mail server. EHLO is an extension to the SMTP protocol that causes the server to send back a list of features that it supports, so that the client knows what it can do with that server (e.g., STARTTLS, SMTPUTF8, 8BITMIME, etc.). cheers, raf