Limiting number of mail(imap/pop) connections per user per IP

Naresh V nareshov at
Mon Nov 1 13:18:40 MSK 2010

On 1 November 2010 14:37, Naresh V <nareshov at> wrote:
> Hi,
> In real IMAP servers like Dovecot, there is a way to limit the number
> of connections made by a username from a particular IP.
> Now that nginx is going to sit in front of my dovecot - I won't be
> able make use of this limit in dovecot anymore (dovecot will see only
> my nginxes IPs as client IP)
> How can I achieve this sort of limiting at the nginx level itself?

I see that the perl auth_http handler can see the real client's IP in
the 'Client-IP' HTTP header - is there a way to forward this via
IMAP/POP3 talk to the backend IMAPD/POP3D?
If this were possible, I can continue to use the limits in Dovecot as-is

-Naresh V.

More information about the nginx mailing list