nginx imap proxy problem
francis at daoine.org
Mon Mar 28 15:50:12 MSD 2011
On Sun, Mar 27, 2011 at 11:24:44PM +0200, Alokat wrote:
> On 03/27/11 23:19, Alokat wrote:
> >I try to use this php script:
When I copy-paste that script, "php -l" eventually shows me three lines
with syntax errors that can be fixed by adding some parentheses.
> >But all I get is:
> >auth http server web-srv.de:80 did not send server or port while in
> >http auth state, client: <clientIP>, server: <mail-srv:993>, login:
> >"<foo at bar>"
Unmodified, you will probably get a http 500 back from the server. That
would lead to this error message.
> >I guess it's the php script but don't know where in the script I have
> >to look for the error.
"php -l", or the (php-running) server error log should point at the
lines. Then you can fix them while adding your own password-verification
and server-selection code.
> And I'm using lighttpd as auth server.
That's where to find the php errors, then.
http://wiki.nginx.org/MailCoreModule#Authentication describes what http
request nginx makes, and what response it expects.
The GET and Host: lines come from your auth_http configuration.
The Auth-User: and Auth-Pass: lines come from your mail client.
I suggest you mimic the nginx http request manually, using something like
curl -i -H 'Auth-User: whoever' -H 'Auth-Pass: whatever' http://example.com/auth
to confirm that you get the correct "pass" and "fail" responses from
your auth script. Once that is working, you can test the nginx setup.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx