Quantcast
Viewing all articles
Browse latest Browse all 2

Testing Email Manually with Telnet (spoofing email)

Being able to send email manually seems to be a bit of a lost art. It is extremely handy to know how to use telnet to send email for testing procmail filters, and any other part of your mail system. It can also be fun to spoof email to a friend or co-worker. Read on for a quick run down.


Open a connection to the mail server.
telnet mail.server.com 25
Now initiate the SMTP session. The host connecting to the remote SMTP server identifies itself by it’s fully qualified DNS host name, so be sure to replace localhost.localdomain with your sending servers FQDN.
helo localhost.localdomain
MAIL indicates who is sending the mail. Any returned mail will be sent back to this address.
mail from: you@yourdomain.com
RCPT indicates who will be receiving the mail. You can indicate more than one user by issuing multiple RCPT commands.
rcpt to: someguy@hisdomain.com
DATA indicates that you are about to send the text (or body) of the message. The message text must end with the following five letter sequence: “\r\n.\r\n.“
data
From: Your Name
Subject: Very important
This is the first line
This is the second line
.

QUIT ends the SMTP session.
quit


Viewing all articles
Browse latest Browse all 2

Trending Articles