ESMTP AUTH PLAIN

Hi. I'm looking for info about the ESMTP 'PLAIN' authentication
mechanism and don't find anything at http://www.ietf.org/ nor using
Google. I would like to know the excat step to conduct a 'AUTH PLAIN'
challenge through telnet.

In fact, I thought the steps was something like ('C' meaning 'Client
sending' and 'S', 'Server replies') this, after the EHLO and its server
response :

C : AUTH PLAIN
S : 334 Username:
C : myname
S : 334 Password:
C : mypass
S : 235 Go Ahead

But, not sure and the simple test I've done against two of my SMTP
accounts failed (after 'AUTH PLAIN', server replies '334 ?', then I type
'myname' and [ENTER] and server does nothing, unless the fact he says
'535 invalid user ID or password' if I type a one character more after
[ENTER]).

Also, the only things I've found about PLAIN mechanism on the web seems
to talk about Base64 encoding : very strange in my mind, since I thought
PLAIN was real plain, without any encoding nor encryption of any sort
(like LOGIN or CRAM-MD5).

What's the reality of this AUTH PLAIN mechanism ?
Phillip Parr [ Di, 08 August 2006 23:58 ] [ ID #1424677 ]

Re: ESMTP AUTH PLAIN

In article <MPG.1f4326e8689d86bb9898ae [at] news.tiscali.fr>,
helgo <no [at] no.com> wrote:
>Hi. I'm looking for info about the ESMTP 'PLAIN' authentication
>mechanism and don't find anything at http://www.ietf.org/ nor using
>Google. I would like to know the excat step to conduct a 'AUTH PLAIN'
>challenge through telnet.

AUTH PLAIN was/is defined in RFC 2595 but there's also an I-D that
expounds on it, draft-ietf-sasl-plain, e.g. at the moment:

http://www.ietf.org/internet-drafts/draft-ietf-sasl-plain-09 .txt


>C : AUTH PLAIN
>S : 334 Username:
>C : myname
>S : 334 Password:
>C : mypass
>S : 235 Go Ahead
>
>But, not sure and the simple test I've done against two of my SMTP
>accounts failed (after 'AUTH PLAIN', server replies '334 ?', then I type
>'myname' and [ENTER] and server does nothing, unless the fact he says
>'535 invalid user ID or password' if I type a one character more after
>[ENTER]).

That's closer to AUTH LOGIN; AUTH PLAIN puts three strings
(authorization id, authentication id, and password) all on one line, but
as you note:


>Also, the only things I've found about PLAIN mechanism on the web seems
>to talk about Base64 encoding : very strange in my mind, since I thought
>PLAIN was real plain, without any encoding nor encryption of any sort
>(like LOGIN or CRAM-MD5).

base64 encoding is used.

Given a username and password, you might test via something like:

bash$ printf "%s\0%s\0%s\0" username username password | mmencode -b
dXNlcm5hbWUAdXNlcm5hbWUAcGFzc3dvcmQA

bash$ telnet example.com 25
...
auth plain
334
dXNlcm5hbWUAdXNlcm5hbWUAcGFzc3dvcmQA
235 authentication successful

(assuming no errors above, of course)

mm
mem [ Mi, 09 August 2006 17:15 ] [ ID #1424678 ]

Re: ESMTP AUTH PLAIN

In article <ebcu66$1nh9$1 [at] pyrite.mv.net>, mem [at] geezer.org says...
>
> AUTH PLAIN was/is defined in RFC 2595 but there's also an I-D that
> expounds on it, draft-ietf-sasl-plain, e.g. at the moment:
>
> http://www.ietf.org/internet-drafts/draft-ietf-sasl-plain-09 .txt
>

OK, Mark. Thanks for your link and explanation. I just see your reply
today (too late) and solved my problem some hours ago starting with page
like this : http://www.technoids.org/saslmech.html about this PLAIN
mechanism.
Phillip Parr [ Fr, 11 August 2006 19:18 ] [ ID #1427448 ]

Re: ESMTP AUTH PLAIN

helgo <no [at] no.com> wrote in news:MPG.1f4326e8689d86bb9898ae [at] news.tiscali.fr:

> Hi. I'm looking for info about the ESMTP 'PLAIN' authentication
> mechanism and don't find anything at http://www.ietf.org/ nor using
> Google. I would like to know the excat step to conduct a 'AUTH PLAIN'
> challenge through telnet.
>
> In fact, I thought the steps was something like ('C' meaning 'Client
> sending' and 'S', 'Server replies') this, after the EHLO and its server
> response :
>
> C : AUTH PLAIN
> S : 334 Username:
> C : myname
> S : 334 Password:
> C : mypass
> S : 235 Go Ahead
>
> But, not sure and the simple test I've done against two of my SMTP
> accounts failed (after 'AUTH PLAIN', server replies '334 ?',

Have you to make sure the server supports that method, it will tell you in
the response to EHLO

--
Jem Berkes
Software design for Windows and Linux/Unix-like systems
http://www.sysdesign.ca/
Jem Berkes [ Sa, 12 August 2006 03:08 ] [ ID #1428330 ]

Re: ESMTP AUTH PLAIN

In article <Xns981CD6FCD1AFFjbuserspc9org [at] 216.196.97.131>,
jb [at] users.pc9.org says...
> Have you to make sure the server supports that method, it will tell you in
> the response to EHLO
>

Sorry for the delay, but problem with news update these last days. Yes,
it support ESMTP. But, now it's solved : the problem was because I
believed that the PLAI method did accepted plain text rather than base64
encoded one about username and password. Thanks
Phillip Parr [ Sa, 12 August 2006 13:24 ] [ ID #1428333 ]
Miscellaneous » comp.mail.misc » ESMTP AUTH PLAIN

Vorheriges Thema: Electronic Mail: Frequently Asked Questions (FAQ)
Nächstes Thema: About word-encoding (RFC2047) design