Hello!
On Tue, Nov 24, 2015 at 4:12 PM, Dominic Lüchinger wrote:
> I'm wondering if the lua-nginx-module module could be used in the context of
> ngx_mail.
> I'm looking for a possibility to handle the following usecases:
> - Perform the HTTP authentication in Lua =>
> http://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html
> - Deliver SNI-based certificates. Like this feature
> https://github.com/openresty/lua-nginx-module/issues/331 , but for the mail
> context.
>
Well, lua-nginx-module is really ngx_http_lua_module, which means its
directives can only be used in the http {} configuration block of
nginx.conf. For your usage, we need a ngx_mail_lua_module which is for
nginx's "mail" subsystem instead of the classic "http".
Given my (limited) knowledge of the "mail" subsystem of nginx, it is
not really easy since the "mail" subsystem has many hard-coded things
in the core which makes 3rd-party module hooks much less capable. But
well, I didn't look deeper enough :) Interested developers can try
proving me wrong.
Regards,
-agentzh