proxy_bind/splitting with nginx mail module for IMAP

M
  • 10 Jul '24
I am currently working on a setup using nginx mail module with several backends. Due to port exhaustion, I would like to do splitting of outgoing connections across several IPs. For http this is well documented, but for the mail module I could not find anything. Simply trying "proxy_bind" in the mail{}-config does not yield any success, because it is forbidden in this context.

How would you tackle port exhaustion with many long-running IMAP connections?

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20240710/e0ee4a9f/attachment.htm>
S
  • 10 Jul '24
Hi Malte,

hope you're doing well.

On Wed, Jul 10, 2024 at 07:09:42PM +0200, Malte Schmidt via nginx wrote:
> 
> I am currently working on a setup using nginx mail module with several
> backends. Due to port exhaustion, I would like to do splitting of outgoing
> connections across several IPs. For http this is well documented, but for
> the mail module I could not find anything. Simply trying "proxy_bind" in
> the mail{}-config does not yield any success, because it is forbidden in
> this context.
> 
> How would you tackle port exhaustion with many long-running IMAP connections?

A quick look into the source code shows there's no such functionality
available for the mail module.

That's probably possible to create a solution based on the stream module,
where such functionality exists.

Thank you.

-- 
Sergey A. Osokin