On Mon, Nov 01, 2010 at 08:17:19PM +0530, Naresh V wrote:
How can I achieve this sort of limiting at the nginx level itself?
It appears that I might have to patch nginx for supporting this. (in
ngx_mail_imap_handler.c: in the s->mail_state and s->command switch
Yes, it’s non-standard and not currently supported. Probably it’s
good idea to support this though.
The other approach a colleague of mine suggested was to implement a
(persistent: on-disk bdb perhaps) counter within mailauth.pm itself:
But I’m not confident if this’d would because I’m not familiar with
the nature of operation of the mail module when it comes to the
post-auth_http communication with the backend - does the mail
component of nginx communicate make only one connection with the
backend for a particular Auth-Status = ‘OK’ with auth_http or more
Only one (or even no one, if something goes wrong - e.g.
connection fails). But you don’t have information about
connection termination with auth_http, so if you want to limit
number of connections - you have to read nginx’s logs anyway.