Nginx imap proxy problem

Hi,

I try to use this php script:

http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

But all I get is:

auth http server web-srv.de:80 did not send server or port while in http
auth state, client: , server: mail-srv:993, login:
[email protected]

I guess it’s the php script but don’t know where in the script I have to
look for the error.

Regards,
alokat

On 03/27/11 23:19, Alokat wrote:

[email protected]
http://nginx.org/mailman/listinfo/nginx
And I’m using lighttpd as auth server.

Regards,
alokat

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: , server: mail-srv:993, login:
[email protected]

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 D. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs