SMTP-auth via telnet

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
LVL 14
grimkinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dansotoCommented:
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
grimkinAuthor Commented:
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
dansotoCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mwaremanCommented:
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
grimkinAuthor Commented:
hi guys,

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

errr how do i accept both answers ?!?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.