上游在nginx-邮件代理中发送无效响应

我绝对是nginx的新手,我想做的是:

  1. 在AWS上设置和配置Nginx(从源)(nginx作为邮件代理)-*服务器开启
  2. 使用stunnel到G-Suit API的上游,登录身份验证后,服务器立即断开连接并给出错误消息。
/nginx/error.log:10个上游发送了无效响应:“ * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS = DEFLATE ENABLE MOV CONDSTORE ESEARCH   UTF8 =接受列表扩展列表状态字面量-特殊用途   APPENDLIMIT = 35651584 2 OK user1@domain.jp已通过身份验证(成功)“   从上游读取响应时,客户端:xxx.xxx.xxx.xxx,服务器:   0.0.0.0:993,登录名:“ user1@domain.jp”,上游:127.0.0.1:20143

这是/nginx.conf

user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
load_module /usr/lib/nginx/modules/ngx_mail_module.so;
error_log  /var/log/nginx/error.log  info;
events {
    worker_connections 1024;
    multi_accept on;
}

mail {
server_name  example.com;
auth_http 127.0.0.0:20080/api/mail/proxyauth;

    #ssl                 on;
    ssl_prefer_server_ciphers  on;
    ssl_certificate     /etc/ssl/certs/server.crt;
    ssl_certificate_key /etc/ssl/certs/server.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

  server {
    listen     995 ssl;
    protocol   pop3;
    proxy      on;
    proxy_pass_error_message on;
  }
   server {
    listen    993 ssl;
    protocol   imap;
    proxy      on;
    proxy_pass_error_message on;
    imap_auth login plain;
  }
    server {
    listen     465 ssl;
    protocol   smtp;
    proxy      on;
    proxy_pass_error_message on;
    xclient    off;
    smtp_auth  login;
 }
}

和/stunnel.conf

[https]
accept  = 20080
connect = gsuit1domain.com:443
delay = yes

错误的可能原因是什么?

评论