Welcome! Log In Create A New Profile

Advanced

imap proxy and untagged commands

Timo Sirainen
March 13, 2013 09:54AM
Hi,

I noticed that the IMAP proxying code currently doesn't ignore extra
untagged replies from the backend server. For example this would be a
valid session:

S: * OK Server ready
S: * NO We're having some load issues
C: a login {4}
S: * OK foo
S: + OK
S: * OK bar
C: user pass
S: * OK almost done
S: a OK logged in

In real world Dovecot can already send some extra untagged replies if
there is some trouble (e.g. heavy load) with its authentication process.
What happens is:

S: * OK Waiting for authentication process to respond..
C: a LOGIN {3}
S: * OK Waiting for authentication process to respond..

and nginx fails:

2013/03/13 15:38:55 [error] 7257#0: *15 upstream sent invalid response:
"* OK Waiting for authentication process to respond.." while reading
response from upstream, client: 127.0.0.1, server: 0.0.0.0:10143, login:
"tss", upstream: 127.0.0.1:143

I attempted to fix this, but it looks like the current code doesn't make
this very easy. Especially since it seems to be handling data one "read
block" at a time, which can contain multiple lines, each of which should
be handled separately (the untagged and non-untagged replies may arrive
in the same IP packet).

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

imap proxy and untagged commands

Timo Sirainen 878 March 13, 2013 09:54AM

Re: imap proxy and untagged commands

Maxim Dounin 378 March 13, 2013 10:50AM

Re: imap proxy and untagged commands

Timo Sirainen 494 March 14, 2013 12:28PM

Re: imap proxy and untagged commands

Maxim Dounin 1027 March 15, 2013 08:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 234
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready