Lukasz Wiechec | 25 Mar 2005 00:03
Picon
Favicon

Zoe and Newspipe

The special time has come and I decided to integrate Newspipe with ZOE.
Apparently, the package available from Newspipe's homepage
(http://newspipe.sourceforge.net) does not support SMTP authentication so I
started to dab my finger in Python, only to discover that I can't get through
with it. The passwords (which are 100% correct, I'm using them with msmtp and
mutt to pass my outgoing mail to ZOE) are not working and I'm getting this
error:

<snip>

send: 'ehlo mymachine\r\n'
reply: '250-mymachine Hello localhost.localdomain\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250 STARTTLS\r\n'
reply: retcode (250); Msg: mymachine Hello localhost.localdomain
AUTH LOGIN PLAIN
STARTTLS
send: 'STARTTLS\r\n'
reply: '220 Ready to start TLS\r\n'
reply: retcode (220); Msg: Ready to start TLS
send: 'ehlo mymachine\r\n'
reply: '250-mymachine Hello localhost.localdomain\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250 STARTTLS\r\n'
reply: retcode (250); Msg: mymachine Hello localhost.localdomain
AUTH LOGIN PLAIN
STARTTLS
send: 'AUTH PLAIN bHVrYXN6AGx1a2FzegBxYXp3czE5NA==\r\n'
reply: '535 Authentication failed\r\n'
reply: retcode (535); Msg: Authentication failed
(Continue reading)

Zoe | 25 Mar 2005 11:48
Picon

Re: Zoe and Newspipe


On Mar 25, 2005, at 00:03, Lukasz Wiechec wrote:

> I also attach small python snippet I've came up with to test the  
> authentication,
> maybe there is something wrong with it.

Ok... this is/was a bug in the python smtplib:

Patch #1075928: AUTH PLAIN in smtplib.

"smtplib can not log in to some server using command AUTH PLAIN, it  
sends
``user\0user\0pass'' to the server, but ``\0user\0pass'' has better
compatibility."

http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Lib/ 
smtplib.py?rev=1.69&view=log

No kidding.

Your best bet is to update to a more recent version of python/smtplib.

Cheers,

R.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
(Continue reading)

Lukasz Wiechec | 26 Mar 2005 19:13
Picon
Favicon

Re: Zoe and Newspipe

On Fri, Mar 25, 2005 at 11:48:46AM +0100, Zoe wrote:
> 
> On Mar 25, 2005, at 00:03, Lukasz Wiechec wrote:
> 
> >I also attach small python snippet I've came up with to test the  
> >authentication,
> >maybe there is something wrong with it.
> 
> Ok... this is/was a bug in the python smtplib:
> 
> Patch #1075928: AUTH PLAIN in smtplib.
> 
> "smtplib can not log in to some server using command AUTH PLAIN, it  
> sends
> ``user\0user\0pass'' to the server, but ``\0user\0pass'' has better
> compatibility."
> 
> http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Lib/ 
> smtplib.py?rev=1.69&view=log
> 
> No kidding.
> 
> Your best bet is to update to a more recent version of python/smtplib.

Raphael,

thanks for good research work -- I'll try it with patched smtplib !!!

BTW: accessing zoe via secure http wirks good, but occassionally I'm
experiencing the following: sometimes the links need to be clicked on twice
(Continue reading)

Zoe | 25 Mar 2005 10:54
Picon

Re: Zoe and Newspipe

Hi Lukasz,

On Mar 25, 2005, at 00:03, Lukasz Wiechec wrote:

> send: 'AUTH PLAIN bHVrYXN6AGx1a2FzegBxYXp3czE5NA==\r\n'

There seems to be a glitch in the smtplib.login() method... the above 
credentials decode in 'lukaszlukaszqazws194'... note that the user name 
is encoded twice.

> I also attach small python snippet I've came up with to test the 
> authentication,
> maybe there is something wrong with it.

Nothing wrong with your test, rather something odd going on with 
smtplib...

server = smtplib.SMTP( 'localhost', 10025 )
server.set_debuglevel(1)
server.login( 'user', 'password' )

... results in "dXNlcgB1c2VyAHBhc3N3b3Jk" being send. Which, after 
decoding, looks like "useruserpassword". Note that the user name is 
there twice. Bad karma.

I'm not familiar enough with python to offer much help here. Your best 
bet is to contact the author of Newspipe and/or ask the owner of 
smtplib for some explanations.

Cheers,
(Continue reading)


Gmane