Configuring nginx as mail proxy
lbonetto at kenzanmedia.com
Wed Oct 24 15:49:43 UTC 2012
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.
I then got an error that no events was present so I just added
Now nginx is starting but I never see any hit to my mock service despite it being specified in auth_http
No errors reported in the error log.
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?
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?
Again, here is my current config:
error_log /var/log/nginx/error.log info;
server_name <my mail server>;
pop3_auth plain apop cram-md5;
pop3_capabilities "LAST" "TOP" "USER" "PIPELINING" "UIDL";
smtp_auth login plain cram-md5;
smtp_capabilities "SIZE 10485760" ENHANCEDSTATUSCODES 8BITMIME DSN;
# SMTP on port 2525 not 25
# proxy on;
On Oct 24, 2012, at 10:53 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Wed, Oct 24, 2012 at 10:27:33AM -0400, Laurent Bonetto wrote:
>> I need to use nginx as a mail proxy. I am completely new to
>> nginx and need some help with the configuration.
>> $ nginx -V nginx version: nginx/1.2.4 configure arguments:
>> --prefix=/opt/local --with-cc-opt='-I/opt/local/include -O2'
>> $ nginx nginx: [emerg] unknown directive "mail" in
>> The only mention of that error on the web brings up a discussion
>> in Russian and the translation is "This question is no longer
>> My questions:
>> Why am I getting this unknow directive?
> To use nginx mail proxy module, you have to enable it during
> compilation using the --with-mail configure argument. From the
> "nginx -V" output you've provided it's clear that nginx binary you
> are using doesn't have mail module compiled in.
> See here for more details:
> Maxim Dounin
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx