Re: Problems with IMAP4S LOGIN command
FCa <[email protected]>
| Newsgroups | gmane.mail.perdition.user |
|---|---|
| Organization | Sciences Po |
| Message-ID | <[email protected]> |
On Thu July 9 2009 13:48:37 Simon Horman wrote: > On Thu, Jul 02, 2009 at 03:10:39PM +0200, TOPdesk Systeembeheer > ([email protected]) wrote: > > Since an upgrade to our backend IMAPS server (Zarafa 6.20.7), we > > have some trouble authenticating via our perdition IMAP4S proxy > > (version 1.17-7etch1). I've enabled debug and connection logging, > > and I see that the LOGIN command is splitted in 3 lines instead of > > sending the whole command in one. Is that normal? Can I configure > > it somewhere? <.../...> > Are you in a position to modify the perdition code? If so, it would > be good to see if changing to the short-format resolves your problem. > The relevant code is in imap4_out_authenticate() in > perdition/imap4_out.c Hi, Here we just had to do the trick because of a bad IMAP server implementation too. For the purpose I modified the imap4_out.c code (diff attached) but as I'm not a C guru I don't know if it's the best way. Regards. ______________________________________________ Perdition-users mailing list [email protected] http://lists.vergenet.net/listinfo/perdition-users
imap4_out.c_singleline.diff
(text/x-patch, 998 B)
344,367c344
<
< if(imap4_write(rs_io, NULL_FLAG, tag, IMAP4_CMD_LOGIN, 1, "{%d}",
< strlen(pw->pw_name))<0){
< VANESSA_LOGGER_DEBUG("imap4_write login");
< status=-1;
< goto leave;
< }
< if(n) { new_n = *n; }
< if((status=imap4_out_response(rs_io, eu_io, cont, ok, &q, buf, &new_n))<0){
< VANESSA_LOGGER_DEBUG("imap4_out_response login");
< }
<
< if(imap4_write(rs_io, NULL_FLAG, NULL, NULL, 2, "%s {%d}",
< pw->pw_name, strlen(pw->pw_passwd))<0){
< VANESSA_LOGGER_DEBUG("imap4_write name");
< status=-1;
< goto leave;
< }
< if(n) { new_n = *n; }
< if((status=imap4_out_response(rs_io, eu_io, cont, ok, &q, buf, &new_n))<0){
< VANESSA_LOGGER_DEBUG("imap4_out_response name");
< }
<
< if(imap4_write(rs_io, NULL_FLAG, NULL, NULL, 1, "%s", pw->pw_passwd)<0){
---
> if(imap4_write(rs_io, NULL_FLAG, tag, IMAP4_CMD_LOGIN, 2, "%s %s", pw->pw_name, pw->pw_passwd)<0){