Nginx 使用 Perl 进行 IMAP 的认证

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

user  nobody;
worker_processes  1;
error_log  logs/error.log  info;
pid        logs/nginx.pid;
 
events {
  worker_connections  1024;
  multi_accept on;
}
 
http {
  perl_modules  perl/lib;
  perl_require  mailauth.pm;
 
  server {
    location /auth {
      perl  mailauth::handler;
    }
  }
}
 
mail {
  auth_http  127.0.0.1:80/auth;
 
  pop3_capabilities  "TOP"  "USER";
  imap_capabilities  "IMAP4rev1"  "UIDPLUS";
 
  server {
    listen     110;
    protocol   pop3;
    proxy      on;
  }
 
  server {
    listen     143;
    protocol   imap;
    proxy      on;
  }
}