View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > SMTP

From LQWiki

Jump to: navigation, search

SMTP (Simple Mail Transfer Protocol) is a protocol for servers to send email between one another. Most common mail protocol on the Internet.

SMTP daemons

Tips and tricks

You can manually contact your SMTP server using telnet to send email. All you need to know is the server's name and the port (usually 25).

So let's telnet in:

  telnet mail.somehost.com 25

You should now be greeted by some text that looks like:

  Trying 193.29.23.192...
  Connected to mail.somehost.com
  Escape character is '^]'
  220 sbh14.somehost.com ESMTP server ready Wed, 15 Mar 2004 02:32:40 +0100

Now to start sending your mail you write:

  HELO somehost.com
  MAIL FROM:<myaddress@somehost.com>

Note: You can specify any address as the sender, because there is no sender verification

  RCPT TO:<mailaddress@anotherhost.com>
  DATA
  Subject:Hello World!
  From:Elvis Presley <myaddress@somehost.com>
  Hi you at mailaddress. This is a mail sent by telnetting to an smtp server. 
  You can    write as much as you want here. When you are finished enter a . as 
  the only character on a new line.
  Yours, Elvis
  .

To quit just write quit

  quit

See also


Personal tools