<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks. That was indeed my first issue. I did sudo port edit nginx, added --with-mail to the config options, reinstalled, and now I am passed that error.<div><br></div><div>I then got an error that no events was present so I just added <br><div> events {</div><div><div> worker_connections 1;</div><div> }</div><div><br></div><div>Now nginx is starting but I never see any hit to my mock service despite it being specified in auth_http</div><div><pre>    auth_http    <a href="http://localhost:8080/authorize">http://localhost:8080/authorize</a>;
</pre></div><div>No errors reported in the error log.</div><div><br></div><div>When is nginx expected to hit the url specified in nginx? When it gets launched? When an event occurs on the ports 110 and 2525 with the protocols I specified?</div><div><br></div><div>I tried sending emails to/from my mail server that uses POP3 on port 110 and SMTP on port 2525 and never saw any hit to the authorize url. Am I missing another component in my config?</div><div><br></div><div>Again, here is my current config:</div><div><br></div><div><div>   worker_processes  1;</div><div><br></div><div>  error_log  /var/log/nginx/error.log info;</div><div><br></div><div> events {</div><div> worker_connections 1;</div><div> }</div><div><br></div><div>  mail {      </div><div>    server_name       <my mail server>; </div><div>    auth_http    <a href="http://localhost:8080/authorize">http://localhost:8080/authorize</a>;</div><div><br></div><div>    pop3_auth         plain apop cram-md5;</div><div>    pop3_capabilities "LAST" "TOP" "USER" "PIPELINING" "UIDL";</div><div><br></div><div>    smtp_auth         login plain cram-md5;</div><div>    smtp_capabilities "SIZE 10485760" ENHANCEDSTATUSCODES 8BITMIME DSN;</div><div> </div><div>   xclient           off;</div><div><br></div><div>    server {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span># SMTP on port 2525 not 25</div><div>        listen   2525;</div><div>        protocol smtp;</div><div>    }</div><div>    server {</div><div>          listen     110;</div><div>          protocol   pop3;</div><div>#          proxy      on;</div><div>          proxy_pass_error_message  on;</div><div>    }</div><div> }</div><div><br></div><div><br></div></div><div><br></div><div><br></div><div><div>On Oct 24, 2012, at 10:53 AM, Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello!<br><br>On Wed, Oct 24, 2012 at 10:27:33AM -0400, Laurent Bonetto wrote:<br><br><blockquote type="cite">I need to use nginx as a mail proxy. I am completely new to <br>nginx and need some help with the configuration.<br></blockquote><br>[...]<br><br><blockquote type="cite">$ nginx -V nginx version: nginx/1.2.4 configure arguments: <br>--prefix=/opt/local --with-cc-opt='-I/opt/local/include -O2' <br>--with-ld-opt=-L/opt/local/lib <br>--conf-path=/opt/local/etc/nginx/nginx.conf <br>--error-log-path=/opt/local/var/log/nginx/error.log <br>--http-log-path=/opt/local/var/log/nginx/access.log <br>--pid-path=/opt/local/var/run/nginx/nginx.pid <br>--lock-path=/opt/local/var/run/nginx/nginx.lock <br>--http-client-body-temp-path=/opt/local/var/run/nginx/client_body_temp <br>--http-proxy-temp-path=/opt/local/var/run/nginx/proxy_temp <br>--http-fastcgi-temp-path=/opt/local/var/run/nginx/fastcgi_temp <br>--http-uwsgi-temp-path=/opt/local/var/run/nginx/uwsgi_temp <br>--with-ipv6<br><br>$ nginx nginx: [emerg] unknown directive "mail" in <br>/opt/local/etc/nginx/nginx.conf:6<br><br>The only mention of that error on the web brings up a discussion <br>in Russian and the translation is "This question is no longer <br>relevant"<br><br><br>My questions:<br><br>Why am I getting this unknow directive?<br></blockquote><br>To use nginx mail proxy module, you have to enable it during<br>compilation using the --with-mail configure argument.  From the <br>"nginx -V" output you've provided it's clear that nginx binary you <br>are using doesn't have mail module compiled in.<br><br>See here for more details:<br><a href="http://nginx.org/en/docs/mail/ngx_mail_core_module.html">http://nginx.org/en/docs/mail/ngx_mail_core_module.html</a><br><br>[...]<br><br>-- <br>Maxim Dounin<br>http://nginx.com/support.html<br><br>_______________________________________________<br>nginx mailing list<br>nginx@nginx.org<br>http://mailman.nginx.org/mailman/listinfo/nginx<br></blockquote></div><br></div></div></body></html>