Discussion Locked

SMTP codes

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm trying to test various stages of our smtp servers and i'm looking to find out the code to send an email from the port, i.e. if i telnet to the server on port 25 & then try to send an email from there

any help or direct is greatly appreciated
thanks

7 replies

by curlergirl

Here's how you do it (press Enter after each line):

First, if you open a telnet session and can't see what you're typing, quit the session. Then open another telnet session without specifying an address (just type "telnet" and press Enter). Then type: set local_echo. This will set your telnet option so that you can see what you're typing on the screen. Then close that session and start again.

1. Telnet to port 25 on the SMTP server. Once you see the header info for the server, type the commands below.
2. Type: helo domain.com. (put in your proper email domain name)
3. You should get a response such as: 250 OK, or sometimes it will give you a 250 response with other info after it (depending on what type of server it is - aslong as it's "250" and then something, you're OK).
4. Type: mail from: (valid email user name on your domain). Response should be 250-OK followed by senders email address.
4. Type: rcpt to: (valid email address on the SMTP server's domain to send to). Response should be 250-Accepted or 250-OK followed by recipient's address.
5. Type: data. You'll get a response: Send data. End with CRLF.CRLF.
6. Type any message you want to send. At the end, type a return (Enter) followed by a period (".") followed by a return. You should get another 250-OK response.
7. Type: quit to end your session. You should get a 221 closing connection response and then you're disconnected.
8. If at any time you type an invalid command, you'll get a 500-Invalid command or 501-Invalid syntax response.

If you get other responses, or it doesn't accept your commands, then something is obviously wrong. Hope this helps!

by isys

To get a comprehensive test of your mail system, go here:

http://www.abuse.net/relay.html

This discussion is closed to new replies.