reverse proxy imap

vicosoft at vicosoft at
Wed Feb 9 11:07:26 MSK 2011

Someone has set up a reverse proxy imap, you connect to a Lotus Domino
server on port 993? It is the typical question, but could send the
configuration files? It would help me a lot to understand how to configure
it. Thanks.

I installed nginx from the Fedora repository, version is 0.8.53.

My nginx.conf:

user              nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log info;
pid        /var/run/;

events {
    worker_connections  1024;
    multi_accept on;

mail {
        auth_http localhost:80;
        auth_http_timeout 6000;
        imap_auth plain;
        imap_capabilities  "IMAP4rev1"  "UIDPLUS";

    server {
        listen     993;
        protocol   imap;
        proxy      on;


http {
        include mime.types;
        default_type application/octet-stream;
        perl_modules lib/perl5;

        sendfile on;

        keepalive_timeout 65;

        server {
                listen 80;
                server_name localhost;
                location /auth {
                 perl mailauth::handler;
        location / {
                root html;
                index index.html index.htm;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root html;

The  (is in /usr/lib/perl5/ )

package mailauth;
use nginx;

our $auth_ok;
our $mail_server_ip={""};
our $protocol_ports={};

sub handler {
my $r=shift;
if ($auth_ok==1){
$r->header_out("Auth-Status", "OK");
$r->header_out("Auth-Server", $domino);
$r->header_out("Auth Plain",$r->header_in("Auth Plain"));
} else {
$r->header_out("Auth-Status", "Invalid login or password") ;


return OK;



Jose Antonio Vico Palomino
E-Mail: vicosoft at

Visita mi Blogs:


Skype: vicosoft
Google Talk: vicosoft at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list