[Dovecot] IMAP/POP3 Proxy Redundancy
Looking over the list archives and Wiki there doesn't seem to be any sort of built-in host redundancy with the proxy. I would prefer to use a built in though it doesn't look like this is possible.
One of the suggestions that I found in the list archives was to write a script which checks the health of the hosts and adjusts the MySQL table accordingly. Has anyone done anything like this in production?
Thanks,
Cory
Here is a sample of what I'm testing the proxy with.
CREATE TABLE users
(
user
varchar(255) NOT NULL,
filesystem
varchar(5) NOT NULL,
PRIMARY KEY (user
),
UNIQUE KEY idx_user
(user
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE hostmap
(
id
int(11) NOT NULL auto_increment,
filesystem
varchar(5) NOT NULL COMMENT 'Filesystem identifier',
ip
int(10) unsigned NOT NULL,
alive
tinyint(1) NOT NULL default '1',
PRIMARY KEY (id
),
UNIQUE KEY idx_hostmap
(filesystem
,ip
)
) ENGINE=MyISAM AUTO_INCREMENT=103 DEFAULT CHARSET=latin1
password_query = SELECT user,NULL as password, INET_NTOA(hostmap.ip) as host, 'Y' AS proxy_maybe from users left join hostmap on users.filesystem=hostmap.filesystem where hostmap.alive=1 and users.user='%u' limit 1;
On Wed, 2010-08-04 at 11:14 -0500, Cory wrote:
Looking over the list archives and Wiki there doesn't seem to be any sort of built-in host redundancy with the proxy. I would prefer to use a built in though it doesn't look like this is possible.
One of the suggestions that I found in the list archives was to write a script which checks the health of the hosts and adjusts the MySQL table accordingly. Has anyone done anything like this in production?
Are you using NFS or some other shared filesystem? Then you should probably use the new director service in v2.0: http://blog.dovecot.org/2010/05/new-director-service-in-v20-for-nfs.html
It doesn't support automatic failover yet either, but it's much easier to implement to it.
participants (2)
-
Cory
-
Timo Sirainen