SMTP with Telnet

March 9, 2009 | Filed Under My Notes | 652 views 

Nothing spectacular here, but at times you may need to manually test an SMTP connection, so here is how (the mail server responses are italic):

telnet mailhost.domain.com 25

220 mailhost.domain.com ESMTP MAILHOST

helo yourhost.yourdomain.com

250 mailhost.domain.com Hello yourhost.yourdomain.com [yourip], pleased to meet you

mail from: youremail@yourdomain.com

250 2.1.0 Sender ok

rcpt to: recipientemail@recipientdomain.com

250 2.1.5 Recipient ok

data

354 Enter mail, end with “.” on a line by itself

Subject: Test Message

Test Message
.

250 2.0.0 Message accepted for delivery

quit

The responses may vary a bit depending on the SMTP server but that is basically it.

Details on the SMTP server response codes can be found in rfc2821 check sections 4.2.2 and 4.2.3

Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • del.icio.us
  • Digg
  • Mixx
  • Google Bookmarks
  • Technorati

No related posts.

Comments

Leave a Reply




Spam protection by WP Captcha-Free

Welcome

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed. Enjoy!
 

Not into geek stuff? Check out The VABiker.Net or SuffolkSky.com.
 

Why not Follow Me on Twitter?

 

  • Geek Reads

     
    • VMware vSphere 4.1 HA and DRS Technical Deepdive
      This technical guide covers the basic steps needed to create a VMware HA and DRS cluster, but even more important explains the concepts and mechanisms behind HA and DRS which will enable you to make well educated decisions. This book will take you in to the trenches of HA and DRS and will give you the tools to understand and implement e.g. HA admission control policies, DRS resource pools and resource allocation settings.
       
    • Mastering vSphere 4 by Scott Lowe
      Install and manage one or one thousand virtual servers in your enterprise with the latest generation of VMware virtualization software, vSphere 4, and this comprehensive guide.

    • vSphere 4.0 Quick Start Guide
      vSphere 4.0 Quick Start Guide continues from an idea started several years ago by a few engineers. The idea was simple, provide an easy to use reference guide for all level administrators, consultants and architects.