IMAP proxy problems

Igor Sysoev is at rambler-co.ru
Thu Aug 16 21:41:09 MSD 2007


On Thu, Aug 16, 2007 at 06:26:34PM +0200, Attila Nagy wrote:

> I'm trying to set up nginx (stable and devel, both without success) as 
> an IMAP proxy to an Exchange server.
> 
> The config is:
> daemon off;
> error_log  /var/log/nginx-error.log debug;
> events {
>    worker_connections  1024;
> }
> mail {
>    auth_http  127.0.0.1:9000/cgi-bin/auth;
>    imap_capabilities  "IMAP4rev1"  "UIDPLUS";
> 
>    server {
>        listen     143;
>        protocol   imap;
>        proxy      on;
>    }
> }
> 
> I give back on TCP/9000 the following:
> HTTP/1.0 200 OK
> Auth-Status: OK
> Auth-Server: 127.0.0.1
> Auth-Port: 1433
> (this is just a test on a forwarded port)
> 
> What I get in the log:
> 2007/08/16 16:06:43 [info] 38634#0: *6 client  connected to
> 2007/08/16 16:06:48 [error] 38634#0: *6 upstream sent invalid response: 
> "LOGIN BAD Protocol Error: "Unknown command found"." while reading 
> response from upstream, client: , server: , login: "", upstream:
> 
> If I trace nginx, I see the following IO:
> 38634 nginx    GIO   fd 8 read 103 bytes
>       "* OK Microsoft Exchange Server 2003 IMAP4rev1 server version 
> 6.5.7638.\
>        1 (MAILSRV) ready.\r
>       "
> 38634 nginx    RET   recvfrom 103/0x67
> 38634 nginx    CALL  sendto(0x8,0x3f1140,0xb,0,0,0)
> 38634 nginx    GIO   fd 8 wrote 11 bytes
>       "LOGIN {6}\r
>       "
> 38634 nginx    RET   sendto 11/0xb
> 38634 nginx    CALL  kevent(0x7,0x40c000,0,0x414000,0x200,0x7fdffffe3b0)
> 38634 nginx    RET   kevent 2
> 38634 nginx    CALL  gettimeofday(0x7fdffffe250,0)
> 38634 nginx    RET   gettimeofday 0
> 38634 nginx    CALL  recvfrom(0x8,0x47c000,0x2000,0,0,0)
> 38634 nginx    GIO   fd 8 read 38 bytes
>       "+ Ready for additional command text.\r
>       "
> 38634 nginx    RET   recvfrom 38/0x26
> 38634 nginx    CALL  sendto(0x8,0x3f1170,0x6,0,0,0)
> 38634 nginx    GIO   fd 8 wrote 6 bytes
>       " {8}\r
>       "
> 38634 nginx    RET   sendto 6
> 38634 nginx    CALL  kevent(0x7,0x40c000,0,0x414000,0x200,0x7fdffffe3b0)
> 38634 nginx    RET   kevent 2
> 38634 nginx    CALL  gettimeofday(0x7fdffffe250,0)
> 38634 nginx    RET   gettimeofday 0
> 38634 nginx    CALL  recvfrom(0x8,0x47c000,0x2000,0,0,0)
> 38634 nginx    GIO   fd 8 read 52 bytes
>       "LOGIN BAD Protocol Error: "Unknown command found".\r
>       "
> 
> The OS is FreeBSD/sparc64, version 6-STABLE, nginx linked statically (if 
> that counts).

I do not see login, password, etc. in log and trace.
Have you removed them or this is a untouched logs ?


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list