Amit Kumar Gupta
Amit Kumar Gupta

Reputation: 7413

What is the need of SMTP AUTH?

I want to write an application which can receive emails locally and can response with successful and error responses.

After reading some tutorials about how SMTP works I was trying to send an email using telnet to my locally running SMTP server.

  1. Connect to SMTP server
  2. HELO/EHLO command
  3. AUTH ...
  4. MAIL from command
  5. RCPT to command
  6. DATA command
  7. write somedata
  8. QUITE

What I couldn't understand is step 3. Why do I need to be authenticated to send an email to localhost. I mean if I am yahoo user and I have to send an email to gmail user, how can I be authenticated to gmail SMTP server?

Upvotes: 2

Views: 2198

Answers (2)

echawkes
echawkes

Reputation: 477

SMTP AUTH protects the server from unauthorized use. For example, Google doesn't allow people to send email from Google's email servers unless they have an account. You prove that you have an account (or that you are somehow authorized to use their servers) by authenticating with the AUTH command.

Maybe an example where the email service isn't free would be more clear. If you are trying to send email using GoDaddy's email servers, but you don't have an account, they will prevent you from doing it. GoDaddy charges people to use their services.

If you are running a company called mycompany.com, and you run your own mail servers, you don't want every spammer in the world using your servers to send email out of your company. You require senders to authenticate using AUTH in order to protect your servers from unauthorized use.

Upvotes: 2

Akhilesh Singh
Akhilesh Singh

Reputation: 1724

SMTP Auth is used to authenticate the send email. SMTP AUTH authenticates you directly with our SMTP server. This is transparent to you as a user.

SMTP is the protocol (the language) your email program uses to send email through our email server. AUTH is the part of that protocol that is used to verify that you are one of our users.

SMTP authentication allows the client to show the server that this client has permission to relay e-mail through this server.

In most cases, you can send without authentication to local e-mail addresses of this domain

(i.e. send from [email protected] to [email protected])

because the server does not need to relay your e-mail to external servers. Authentication is required whenever the recipient is not of a local domain

(i.e. send from [email protected] to [email protected], provided that company.com and example.com use different e-mail servers).

If you want to read more about this Here I find the some reference where it explain very clearly.

  1. http://www.afterlogic.com/mailbee-net/docs/smtp_authentication.html
  2. http://www.softhome.net/help/faq/smtp-auth.html

Hope this can help full for you.

Upvotes: 2

Related Questions