This technique is useful for sending mail under desperate circumstances, and it's pretty straightforward. From a command line, type something like the following. Note that type in boldface is what the server responds with.

telnet mail.whateverdomain.com 25

Connected to whateverdomain.com.
Escape character is '^]'.
220-whateverdomain.com Smail-3.2.0.101 (#2 1998-Jul-16) ready at Mon, 27 Nov 2000 13: 34:55 -0600 (EST)


HELO yourmachine.yourdomain.com
250 yourdomain.com Hello yourmachine.yourdomain.com (yourdomain.com from address 64.214.123.23).
MAIL FROM:foo@yourdomain.com
250 foo@yourdomain.com ... Sender Okay
RCPT TO:joe_user@yahoo.com
250 'joe_user@yahoo.com' Recipient Okay.
DATA
354 Enter mail, end with "." on a line by itself
From: Meredith Foo
To: Joe
CC: foo@yourdomain.com
BCC: bar@yourdomain.com
Subject: Test Message

This is only a test.
.
250 Mail accepted
SEND
500 Command unrecognized
QUIT
221 whateverdomain.com closing connection

Notes:

  1. Don't count on being able to spoof your from: address with this. Most SMTP servers capture your machine name and IP address, and that info is transmitted as part of the header of the message that you send. It's good enough for a laugh (evildictator@coup.whitehouse.gov?) but that's about it.

  2. Also note that the final SEND command may or may not be needed, depending on the server that you're using.

  3. This only works for sending mail. For checking mail, see telnet to pop servers.

Another note:
If you try to spoof the machine part of your email address, the SMTP server will probably tell on you, so don't count on being able to do that. But spoofing your username works beautifully.

Of course, we must use this power only for good, never for evil.

Log in or register to write something here or to contact authors.