?
Solved

SMTP-auth via telnet

Posted on 2003-03-22
5
Medium Priority
?
6,441 Views
Last Modified: 2013-11-30
hi there

im coding an smtp client in java and need to find out how to send SMTP authentication to servers. i know its a base64 encoded challenge / response - i just dont know what to send it! ive looked through the rfc 2554 but cant find it (maybe ive been working on this too long and have overlooked it).

can anyone help?

thanks in advance
0
Comment
Question by:grimkin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:dansoto
ID: 8197986
Link to SMTP commands...

http://www.the-welters.com/professional/smtp.html


Link to sample Java App using these commands..

http://www.objectsfusion.com/applets/applets/guestbooksource.html

Is this what you are looking for?

Dan Soto
New Orleans, LA
0
 
LVL 14

Author Comment

by:grimkin
ID: 8198835
hi,

thanks for your comments. i already have the smtp client coded as far as simple smtp goes, what im looking for is information on how to code the SMTP-AUTH commands.
e.g.

client: EHLO myHost

server: 250-smtp.foobar.com Pleased to meet you
server: 250-ETRN
server: 250-STARTTLS
server: 250-HELP
server: 250-EXPN
server: 250-PIPELINING
server: 250-8BITMIME
server: 250-DSN
server: 250-AUTH LOGIN
server: 250-AUTH=LOGIN
server: 250 SIZE 10485760

client: auth login

server: 334 VXNlcm5hbWU6  <-- some kind of base64 challenge

and thats as far as i get, as im not sure what to do next to authorise/what kind of response to send. all ideas appreciated!
0
 
LVL 7

Accepted Solution

by:
dansoto earned 150 total points
ID: 8200506
Interesting reading in some articles I just went through.  Anyways, here's what I can gather from http://www.jonfullmer.com/smtpauth/ ......

What you are supposed to send next is the base64 encoded username.  Then after it's response (in base64), the encoded password.  This site includes links to base64 coders and decoders as well as some other useful info.  I think this may get you on your way.

Let me know if this helps.

Dan Soto
New Orleans, LA
0
 
LVL 2

Expert Comment

by:mwareman
ID: 8232997
Connect
SEND   EHLO domain.com
250
SEND   AUTH LOGIN
334
SEND   username
334
SEND   password
235
<You are now authenticated>
SEND   MAIL FROM etc...etc..


The trick is - the Username AND the Password need to be Base64 encoded...

I found code to do the Base64 at http://www.di-mgt.com.au/crypto.html.

Hope this helps...

Michael.
0
 
LVL 14

Author Comment

by:grimkin
ID: 8234039
hi guys,

both of these comments helped and both gave links to really good resources ...

errr how do i accept both answers ?!?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

800 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