[Dovecot] Feature Request for Proxy
Hi, Quick feature request for the proxy function:
I have a couple of machines which are all customer facing and customer mailbox lives on any one of them. Customer can login to any machine and the proxy feature then forwards them to the correct machine (often the machine they are already connected to). However, right now if the SQL query simply returns the IP of the correct machine, and this happens to be the same machine that the connection is already on, then we get the auth process stuck in an infinite loop (and generating a lot of log files...)
The quick fix is to customise each installation and add some kind of WHERE clause to change the results IF result is already the same as the machine we are on. However, this is error prone when setting up new machines and it's easy to forget or make a typo adjusting the config files. In my case I am using vservers and it's quite neat to be able to simply copy the whole image and fire it up on a new IP to test an upgrade, etc, hence easy to mess up adjusting the conf files when creating a new image.
Any suggestions on how this could be done more dynamically, or else could I raise a feature request that the auth process somehow realises when it's being forwarded to an IP address that it's actually listening on already already (ie it's a request which loops back to itself), thus simplifying the config files? I haven't cracked open the code, but it sounds somewhat possible to check the list of IP addresses we are currently listening on and check that the proxy dest isn't among them?
Cheers
Ed W
On Sun, 2007-09-09 at 13:26 +0100, Ed W wrote:
Any suggestions on how this could be done more dynamically, or else could I raise a feature request that the auth process somehow realises when it's being forwarded to an IP address that it's actually listening on already already (ie it's a request which loops back to itself), thus simplifying the config files? I haven't cracked open the code, but it sounds somewhat possible to check the list of IP addresses we are currently listening on and check that the proxy dest isn't among them?
Try the attached patch. It probably causes the login to fail then. If it works, I'll continue with a dovecot-auth patch that does the same thing to make it really work automatically.
participants (2)
-
Ed W
-
Timo Sirainen