Solved

smtp login with telnet

Posted on 2012-12-22
10
667 Views
Last Modified: 2013-01-12
I am using telnet



>>http://support.microsoft.com/kb/153119



my mailserver requires a login (i think)

I sent messages but there is no 'from email address'
when I check the message in my mail inbox

maybe because I am not logged in

but how to log in
0
Comment
Question by:rgb192
  • 4
  • 4
  • 2
10 Comments
 
LVL 17

Expert Comment

by:BudDurland
ID: 38717042
When sending a message to an SMTP server, the first part of the conversation is what is called the "SMTP Envelope"; basically identity stuff to the server.  The commands "HELO (or EHLO), MAIL FROM: and RCPT TO: are all part of the envelope.

Everything after the DATA command is the actual e-mail message.  Most e-mail clients look here for the sender data, TO: and CC: information, Subject line, and the date/time of the message (although some clients look at the mail headers for the date/time).  After you issue the DATA command, you should send lines similar to this:

Date: Sat, 22 Dec 2012 23:16:00 -0500
From: John Doe <john.doe@example.com>
To: Jane Doe <jane.Doe@example.com>
CC: Little Timmy Doe <tim.doe@example.com
Subject: Holiday Shopping

Open in new window


Keep in mind that what you put here is what the recipient's mail program uses to separate TO: addresses and CC: addresses.  When send mail to the server, both TO: and CC: addresses are part of the RCPT TO line.

Hope this helps.
0
 

Author Comment

by:rgb192
ID: 38717163
yes,
but I can only get to data
if the
mail from:
and
recpt to:

are the same


I want to send to another address, so I must log on to my email
0
 
LVL 17

Accepted Solution

by:
BudDurland earned 250 total points
ID: 38717501
To send to multiple addresses, you would use multiple RCPT TO: lines prior to issuing he DATA command.  By the way, your RCPT TO: should alos have the e-mail addresses enclosed in <> (i.e. RCPT TO: <john.doe@example.com>)

If the mail server won't accept anything in the RCPT TO: line other than your e-mail address (or perhaps another address in the same email domain), that sounds to me like the server is not allowing you to do SMTP relay.  It is very common for mail/SMTP servers to not allow SMTP relay for open connections.  You have to use SMTP AUTH with a valid login and password.  Some mail servers will, rather than use SMTP AUTH, allow relay if you do a successful POP3 login first.  Another way to solve that would be to configure the mail server to allow SMTP relay from the IP address  where you are using Telnet.

There are several utilites for Windows that will let you send mail from the command line.  The most commonly known is probably BLAT.
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 250 total points
ID: 38720449
The login portion requires that you have the response ready in a base64 encoding.
I.e. telnet host 25
Ehlo servername
Auth login plain
<this is where as an answer to the response you need to provide the correct username and then a password>
Once this process returns a 2xx, means you re authenticated.
Mail from/rcpt to defines the envelope sender and envelope recipients as was pointed out.  The data section is broken not the header and the body of the message separated by a single empty line and terminated by a single period on a line.

It is not clear what it is you are trying to test.
0
 

Author Comment

by:rgb192
ID: 38722159
How to do pop3 login


How to do base64 login
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 17

Expert Comment

by:BudDurland
ID: 38722444
Example of a POP3 long here:

http://coewww.rutgers.edu/www1/linuxclass2007/lessons/lesson12/sec_6.html

A Bas64 SMTP login cannot effectively be done manually.  It requires that the password be encoded.  Wikipedia actually has a fair explanation of base64 encoding:

http://en.wikipedia.org/wiki/Base64

At this point, the question remains.  What are you trying to do?  What problem are you trying to solve?
0
 

Author Comment

by:rgb192
ID: 38730382
http://en.wikipedia.org/wiki/Base64
I may not need base64
and dont understand how the link applies to sending an email on telent

because this link is almost working for me:
http://coewww.rutgers.edu/www1/linuxclass2007/lessons/lesson12/sec_6.html

are there other commands than
retr 1

because this retrys a previous email, how can I write a new email
0
 
LVL 76

Expert Comment

by:arnold
ID: 38730394
Retr 1 up is a a pop mechanism to read emails you received.
You have to use smtp to send email.

Base64 is needed to encode the username/password for authentication.

You can test you smtp telnet by sending an email to yourself,  a server that handles incoming emails for mydomain.com will not require authentication from anyone when a message recipient is user@mydomain.com
0
 
LVL 17

Expert Comment

by:BudDurland
ID: 38730734
> http://en.wikipedia.org/wiki/Base64
> I may not need base64
> and dont understand how the link applies to sending an email on telent

It applies to how you may have to enter the username & password during SMTP authentication in order to relay mail (send mail to a domain other than yours).  If you can get the POP3 login example to work, that may be all you need, because some SMTP servers are configured to allow relaying after a successful POP3 login from that IP address.

Login via POP3, then immediately logout.  Then try a simple SMTP session, with a RCPT TO: address that is not in your domain, and see if it goes out.
0
 

Author Closing Comment

by:rgb192
ID: 38771006
these will work for pop email login

which is what I need

thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now