Help on POP3 proxy setup

Igor Sysoev is at rambler-co.ru
Wed Jul 9 17:05:52 MSD 2008


On Wed, Jul 09, 2008 at 09:49:03AM -0300, scuba at centroin.com.br wrote:

> Igor,
> 
> On Wed, 9 Jul 2008, Igor Sysoev wrote:
> 
> |On Wed, Jul 09, 2008 at 10:41:58AM +0400, Igor Sysoev wrote:
> |
> |> On Tue, Jul 08, 2008 at 07:32:09PM +0000, Marcelo Souza wrote:
> |> 
> |> > I was just introduced to Nginx and I'm in trouble to setup it as a proxy for my
> |> > POP3 servers. 
> |> > I'm using a modified (test) version of the mailauth.pm to understand the program
> |> > behavior, but it's showing the following error message in log:
> |> > 
> |> > 2008/07/08 15:25:17 [error] 69652#0: *7 auth http server 127.0.0.1:8080 did not 
> |> > send server or port while in http auth state, client: 127.0.0.1, server: 0.0.0.0
> |> > :11000, login: "anyuser"
> |> > 
> |> > Connecting to the POP:  localhost:11000 (test pop proxy with nginx), gives: 
> |> > 
> |> > -ERR internal server error
> |> > 
> |> > After valid user info.
> |> > 
> |> > Here are the mailauth.pm with hardcoded values, and the nginx.conf:
> |> > 
> |> > [mailauth.pm]
> |> > package mailauth;
> |> > use nginx;
> |> > 
> |> > sub handler {
> |> >     my $r = shift;
> |> >             
> |> >             $r->header_out("Auth-Status", "OK") ;
> |> >             $r->header_out("Auth-Server", "myserver.domain.com" );
> |> >             $r->header_out("Auth-Port", "100");
> |> >             $r->send_http_header("text/html");
> |> >             return OK;
> |> > }
> |> > 1;
> |> > __END__
> |> 
> |> nginx does not understand DNS names in Auth-Server, only IPs.
> |> I need to make the error message more clear.
> |
> |No, error in this case will be 'auth http server 127.0.0.1:8080 sent
> |invalid server address:"myserver.domain.com" while in http auth state'
> |
> |Probably, you have changed mailauth.pm and have not reconfigure nginx:
> |it uses old compiled mailauth.pm.
> 
> 	It seems to be using the modified version. It's copied to perl/lib 
> under nginx home, and I restarted the master. Whatelse should be done?
> 	Can you send (or point) me a basic working authorization script?

This is working prototype (I've tested it now), just set IP in Auth-Server
header. If it still does not work, could you create debug log ?


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





More information about the nginx mailing list