Welcome! Log In Create A New Profile

Advanced

Re: nginx imap proxy problem

Francis Daly
March 28, 2011 07:52AM
On Sun, Mar 27, 2011 at 11:24:44PM +0200, Alokat wrote:
> On 03/27/11 23:19, Alokat wrote:

Hi there,

> >I try to use this php script:
> >
> >http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

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@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,

f
--
Francis Daly francis@daoine.org

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

nginx imap proxy problem

Alokat March 27, 2011 05:20PM

Re: nginx imap proxy problem

Alokat March 27, 2011 05:26PM

Re: nginx imap proxy problem

Francis Daly March 28, 2011 07:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 246
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