Help on POP3 proxy setup

Marcelo Souza scuba at centroin.com.br
Tue Jul 8 23:32:09 MSD 2008


Hi all,

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__

-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-
[nginx.conf]

user  nobody;
worker_processes  1;

error_log  logs/error.log debug;

pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    perl_modules  perl/lib;
    perl_require  mailauth.pm;

    server {
    listen 8080 ;
        location /auth {
            perl  mailauth::handler;
        }
    }
}

mail {    
auth_http  127.0.0.1:8080/auth;

    pop3_capabilities  "TOP"  "USER";

    server {
        listen     11000;
        protocol   pop3;
        proxy      on;
    }

}

-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

TIA,

- Marcelo






More information about the nginx mailing list