<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Sorry, should be problem with SMTP and not IMAP<BR><BR>--- On <B>Wed, 9/29/10, Juliana The <I>&lt;jul_the@yahoo.com&gt;</I></B> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Juliana The &lt;jul_the@yahoo.com&gt;<BR>Subject: Re: How to configure Nginx as IMAP/POP3 reverse proxy - IBM Lotus Domino Server<BR>To: nginx@nginx.org<BR>Date: Wednesday, September 29, 2010, 12:19 AM<BR><BR>
<DIV id=yiv539660247>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi..</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now the POP3 already running.</DIV>
<DIV>But still have problem with SMTP</DIV>
<DIV>&nbsp;</DIV>
<DIV>nginx.conf</DIV>
<DIV>&nbsp;</DIV><SPAN lang=EN>
<DIV>user nobody;</DIV>
<DIV>worker_processes 1;</DIV>
<DIV>#error_log logs/error.log;</DIV>
<DIV>#error_log logs/error.log notice;</DIV>
<DIV>#error_log logs/error.log info;</DIV>
<DIV>error_log /usr/local/nginx/logs/error.log;</DIV>
<DIV>#pid logs/nginx.pid;</DIV>
<DIV>pid /usr/local/nginx/logs/nginx.pid;</DIV>
<DIV> </DIV>
<DIV>events {</DIV>
<DIV>worker_connections 1024;</DIV>
<DIV>multi_accept on;</DIV>
<DIV>}</DIV>
<DIV>mail {</DIV>
<DIV>auth_http 127.0.0.1:80/auth;</DIV>
<DIV>auth_http_timeout 6000;</DIV>
<DIV>smtp_auth plain;</DIV>
<DIV>pop3_auth plain;</DIV>
<DIV>imap_auth plain;</DIV>
<DIV>pop3_capabilities "TOP" "USER";</DIV>
<DIV>imap_capabilities "IMAP4rev1" "UIDPLUS";</DIV>
<DIV> </DIV>
<DIV>server {</DIV>
<DIV>listen 110;</DIV>
<DIV>protocol pop3;</DIV>
<DIV>proxy on;</DIV>
<DIV>}</DIV>
<DIV>server {</DIV>
<DIV>listen 143;</DIV>
<DIV>protocol imap;</DIV>
<DIV>proxy on;</DIV>
<DIV>}</DIV>
<DIV></DIV>
<DIV>server {</DIV>
<DIV>listen 25;</DIV>
<DIV>protocol smtp;</DIV>
<DIV>proxy on;</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV>http {</DIV>
<DIV>include mime.types;</DIV>
<DIV>default_type application/octet-stream;</DIV>
<DIV>perl_modules perl/lib;</DIV>
<DIV>perl_require mailauth.pm;</DIV>
<DIV>#log_format main '$remote_addr - $remote_user [$time_local] "$request" '</DIV>
<DIV># '$status $body_bytes_sent "$http_referer" '</DIV>
<DIV># '"$http_user_agent" "$http_x_forwarded_for"';</DIV>
<DIV>#access_log logs/access.log main;</DIV>
<DIV>sendfile on;</DIV>
<DIV>#tcp_nopush on;</DIV>
<DIV>#keepalive_timeout 0;</DIV>
<DIV>keepalive_timeout 65;</DIV>
<DIV>#gzip on;</DIV>
<DIV>server {</DIV>
<DIV>listen 80;</DIV>
<DIV>server_name localhost;</DIV>
<DIV>#location /auth {</DIV>
<DIV>location /auth {</DIV>
<DIV>perl mailauth::handler;</DIV>
<DIV>}</DIV>
<DIV>#charset koi8-r;</DIV>
<DIV>#access_log logs/host.access.log main;</DIV>
<DIV>location / {</DIV>
<DIV>root html;</DIV>
<DIV>index index.html index.htm;</DIV>
<DIV>}</DIV>
<DIV>#error_page 404 /404.html;</DIV>
<DIV># redirect server error pages to the static page /50x.html</DIV>
<DIV>#</DIV>
<DIV>error_page 500 502 503 504 /50x.html;</DIV>
<DIV>location = /50x.html {</DIV>
<DIV>root html;</DIV>
<DIV>}</DIV>
<DIV># proxy the PHP scripts to Apache listening on 127.0.0.1:80</DIV>
<DIV>#</DIV>
<DIV>#location ~ \.php$ {</DIV>
<DIV># proxy_pass http://127.0.0.1;</DIV>
<DIV>#}</DIV>
<DIV># pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000</DIV>
<DIV>#</DIV>
<DIV>#location ~ \.php$ {</DIV>
<DIV># root html;</DIV>
<DIV># fastcgi_pass 127.0.0.1:9000;</DIV>
<DIV># fastcgi_index index.php;</DIV>
<DIV># fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;</DIV>
<DIV># include fastcgi_params;</DIV>
<DIV>#}</DIV>
<DIV># deny access to .htaccess files, if Apache's document root</DIV>
<DIV># concurs with nginx's one</DIV>
<DIV>#</DIV>
<DIV>#location ~ /\.ht {</DIV>
<DIV># deny all;</DIV>
<DIV>#}</DIV>
<DIV>}</DIV>
<DIV></SPAN>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>mailauth.pm</DIV>
<DIV>&nbsp;</DIV><SPAN lang=EN>
<DIV>package mailauth;</DIV>
<DIV>use nginx;</DIV>
<DIV></DIV>
<DIV>our $auth_ok;</DIV>
<DIV>our $mail_server_ip={"192.168.221.1"};</DIV>
<DIV>our $protocol_ports={};</DIV>
<DIV>$domino="192.168.221.1";</DIV>
<DIV>$protocol_ports-&gt;{'pop3'}=110;</DIV>
<DIV>$protocol_ports-&gt;{'imap'}=143;</DIV>
<DIV>$protocol_ports-&gt;{'smtp'}=25;</DIV>
<DIV></DIV>
<DIV>sub handler {</DIV>
<DIV>my $r=shift; </DIV>
<DIV>$auth_ok=1;</DIV>
<DIV>if ($auth_ok==1){</DIV>
<DIV>$r-&gt;header_out("Auth-Status", "OK") ;</DIV>
<DIV>$r-&gt;header_out("Auth-Server", $domino);</DIV>
<DIV>$r-&gt;header_out("Auth-Port", $protocol_ports-&gt;{$r-&gt;header_in("Auth-Protocol")});</DIV>
<DIV>$r-&gt;header_out("Auth Plain",$r-&gt;header_in("Auth Plain"));</DIV>
<DIV>} else {</DIV>
<DIV>$r-&gt;header_out("Auth-Status", "Invalid login or password") ;</DIV>
<DIV>}</DIV>
<DIV></DIV>
<DIV>$r-&gt;send_http_header("text/html");</DIV>
<DIV></DIV>
<DIV>return OK;</DIV>
<DIV>}</DIV>
<DIV></DIV>
<DIV>1;</DIV></SPAN>
<DIV><BR><BR>--- On <B>Sun, 9/26/10, Maxim Dounin <I>&lt;mdounin@mdounin.ru&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Maxim Dounin &lt;mdounin@mdounin.ru&gt;<BR>Subject: Re: How to configure Nginx as IMAP/POP3 reverse proxy - IBM Lotus Domino Server<BR>To: nginx@nginx.org<BR>Date: Sunday, September 26, 2010, 11:49 AM<BR><BR>
<DIV class=yiv539660247plainMail>Hello!<BR><BR>On Sun, Sep 26, 2010 at 02:24:21AM -0700, Juliana The wrote:<BR><BR>&gt; <BR>&gt; Hi all,<BR>&gt; I'm newbie with nginx.<BR>&gt; I have IBM Lotus Domino Server as an email server with IP Address 192.168.221.1<BR>&gt; and Linux installed Nginx as IMAP/POP3 reverse proxy with IP Address 192.168.221.130<BR>&gt; I've configured nginx.conf like below :<BR>&gt; #user nobody;<BR>&gt; worker_processes 1;<BR>&gt; error_log /usr/local/nginx/logs/error.log;<BR>&gt; pid /usr/local/nginx/logs/nginx.pid;<BR>&gt; events {<BR>&gt; worker_connections 1024;<BR>&gt; multi_accept on;<BR>&gt; }<BR>&gt; mail {<BR>&gt; auth_http 192.168.221.1:81; #Domino server with http proxy (81)<BR><BR>This is obviously wrong as there is no URI of auth script.<BR><BR><A href="http://wiki.nginx.org/MailAuthModule" rel=nofollow target=_blank>http://wiki.nginx.org/MailAuthModule</A><BR><BR>&gt; auth_http_timeout 6000;<BR>&gt; pop3_auth
 "plain";<BR>&gt; pop3_capabilities "TOP" "USER";<BR>&gt; imap_capabilities "IMAP4rev1" "UIDPLUS";<BR>&gt; server {<BR>&gt; listen 110;<BR>&gt; protocol pop3;<BR>&gt; proxy on;<BR>&gt; }<BR>&gt; server {<BR>&gt; listen 143;<BR>&gt; protocol imap;<BR>&gt; proxy on;<BR>&gt; }<BR>&gt; }<BR>&gt; When I tried telnet from client pc to Nginx, I get this response :<BR>&gt; C:\&gt; telnet 192.168.221.130 110<BR>&gt; +OK POP3 ready<BR>&gt; C:\&gt; telnet 192.168.221.130 143<BR>&gt; +OK IMAP4 ready<BR>&gt; I also can telnet from NGINX server to Domino and get this response :<BR>&gt; [root@centostest ~]# telnet 192.168.221.1 81<BR>&gt; Trying 192.168.221.1...<BR>&gt; Connected to 192.168.221.1 (192.168.221.1).<BR>&gt; Escape character is '^]'.<BR>&gt; [root@centostest ~]# telnet 192.168.221.1 110<BR>&gt; Trying 192.168.221.1...<BR>&gt; Connected to 192.168.221.1 (192.168.221.1).<BR>&gt; Escape character is '^]'.<BR>&gt; +OK Lotus Notes POP3 server version Release
 8.5.1 ready on JULMAIL/JTHE.<BR>&gt; [root@centostest ~]# telnet 192.168.221.1 143<BR>&gt; Trying 192.168.221.1...<BR>&gt; Connected to 192.168.221.1 (192.168.221.1).<BR>&gt; Escape character is '^]'.<BR>&gt; * OK Domino IMAP4 Server Release 8.5.1 ready Sun, 26 Sep 2010 13:56:39 +1000<BR>&gt;  <BR>&gt; Does anyone can help how to configure nginx to get response like below :<BR>&gt; When I telnet from client to 192.168.221.130 110<BR>&gt; C:\&gt; telnet 192.168.221.130 110<BR>&gt; +OK Lotus Notes POP3 server version Release 8.5.1 ready on JULMAIL/JTHE.<BR>&gt; When I telnet from client to 192.168.221.130 143<BR>&gt; C:\&gt; telnet 192.168.221.130 143<BR>&gt; * OK Domino IMAP4 Server Release 8.5.1 ready Sun, 26 Sep 2010 13:56:39 +1000<BR><BR>No, you can't change server greeting lines in nginx.<BR><BR>Maxim Dounin<BR><BR>_______________________________________________<BR>nginx mailing list<BR><A
 href="http://us.mc1104.mail.yahoo.com/mc/compose?to=nginx@nginx.org" rel=nofollow target=_blank>nginx@nginx.org</A><BR><A href="http://nginx.org/mailman/listinfo/nginx" rel=nofollow target=_blank>http://nginx.org/mailman/listinfo/nginx</A><BR></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR></DIV></BLOCKQUOTE></td></tr></table><br>