Digital Marketing

How to Debug SMTP from command line

Debug Email by Telnet

[superman@goyun.info ~]$ telnet mail.goyun.info 25
Trying 192.168.1.90...
Connected to 192.168.1.90.
Escape character is '^]'.

220 mail.goyun.info ESMTP service ready
(The first command we need to issue to the mail server is the EHLO or HELO.  This is a basic greeting that starts the communication between the telnet client and the SMTP server.  Also passed is the DNS PTR for the IP address from which we are connecting as determined previously.
EHLO ptr.of.your.ip)
EHLO isnly.com
250 mail.goyun.info Hello isnly.com [192.168.1.100]

(The next command we need to issue is the MAIL FROM command.  This determines the address to which bounces are sent.  This is not the same as the from header, which is the email address shown in an email client.)
MAIL FROM: gold@goyun.info
250 OK
RCPT TO: silver@goyun.info
250 Accepted
DATA
354 send message
From: "John Smith" <business@goyun.info>
To: "Jane Doe" <news@goyun.info>
Subject: test message sent from manual telnet session        

input your content here.
.
("." to end the content)

250 2.6.0 message received
quit
221 mail.goyun.info closing connection

An email may be submitted to an SMTP server using:


nc localhost 25 << EOF

EHLO mail.goyun.info

MAIL FROM: mail@mail.goyun.info

RCPT TO: me@goyun.info

DATA

Subject: test message sent from manual telnet session

Body of email.

.
QUIT
EOF

Comments

Popular posts from this blog

Make online money from the Internet