Re: Patch: fix for second attempt to auth gmail smtp

Can you add comments in the code indication that this is a workaround
for GMail's SMTP?

Please also try to push a version of this patch in upstream Camel.

On Mon, 2008-10-13 at 19:54 +0200, José Dapena Paz wrote:
> 	Hi,
> 	The problem this patch is intended to solve is the following:
> 	* Try to connect to gmail smtp using a wrong password. The result is
> the expected one, and we get the get password dialog in platform.
> 	* After setting the right password, it will try to connect again,
> reusing the same connection. On setting up sasl, gmail smtp will return
> a 535 error, and this way, connection will fail even before sending the
> user/passwd pair.
> 	I would say that returning that 535 error as a response to AUTH LOGIN
> command is not very standard. But that's how gmail smtp works.
> 	The solution implemented in the patch is just, on getting the 535 in
> the AUTH LOGIN where we woudln't expect it, we disconnect and connect
> again to smtp server, to start a connection attempt from scratch. We
> handle exceptions in a way it won't ask again for password for the real
> second attempt. This behavior solves the issue.
> Changelog would be:
> * libtinymail-camel/camel-lite/camel/providers/camel-smtp-transport.c:
> On getting a 535 error after AUTH %s step of smtp_auth, we reconnect to
> the smtp service, to start a clean attempt to auth. This makes gmail
> smtp second attempt to login work as expected.o
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]