2

When setting-up my mobile email client, I usually need to enter the SMTP relay server domain name, but why my email client need a SMTP relay server at all?

I think it can directly talk to the smtpd server (e.g. postfix) from which domain the destination Email address is, by looking up the DNS MX records. And send directly to it, why not?


Actually I have another confusion, if a smtpd server use SMTP AUTH, then how can a rely server elsewhere rely a mail to it? The rely server simply don't have the username and password necessary to transfer that mail.

Wei Zhong
  • 580
  • 10
  • 17

2 Answers2

2

Email clients use SMTP relay server to

  • simplify email sending (e.g. to avoid repeating delivery attempts by email client)
  • avoid being mistaken for spammers.

Direct email sending might be a reasonably simple option in ancient pre spam past.

SMTP AUTH is used (mainly) with email client to email server communication. SMTP server to SMTP server communication could not require SMTP AUTH without prohibiting email from "strangers". SMTP AUTH allows to accept messages from trusted clients (customers) even from IP addresses that otherwise would be blocked by DNSBL (e.g. DUL ranges).

AnFi
  • 10,493
  • 3
  • 23
  • 47
  • Thanks for your answer, I agree that avoiding spammers and allowing machanizm like SPF is the big reason. Another question is, when I telnet a gmail MTA (according to MX record, I choose aspmx3.googlemail.com, whose IPv4 is 74.125.24.26) on my Linode VPS I am successful, while when I telnet using the laptop in my home, the telnet times out. But I can ping that address, so is there some firewall detecting my destination port? and filtering messages with port 25? – Wei Zhong Sep 29 '14 at 02:20
  • Most likely yes (as spam prevention). Google may "firewall out" at it's MX servers IP addresses (networks) "very unlikely" to host legitimate mail/SMTP servers. – AnFi Sep 29 '14 at 06:56
1

A SMTP server these days does many more things:

  • Queues the emails and works on delivering them: this may not matter if you just send a single email here and there, but it's a different thing for a 500k recipients newsletter.

  • Retries messages than can not be delivered immediately (e.g., slow receiving server), and eventually bounces them if they cannot be delivered. According to RFC 5321 once a SMTP server accepts responsibility of an email message, it must not lose it but either deliver or return (bounce) it.

  • DKIM sign the message.

  • Route emails to go out from different sending IP addresses and host names, for deliverability purposes. (Email reputation is based a lot on sending IP addresses.)

  • Throttle delivery of large amounts of emails to avoid being seen as an aggressive sender and getting blocked.

  • Optionally, archive (or bcc) all outgoing email, for documentation or compliance purposes.

Of course you can also do all these things in your email sending application and then you don't need a SMTP server, then you wrote an SMTP server.

Community
  • 1
  • 1
Robert
  • 7,394
  • 40
  • 45
  • 64