Replication and Virtual Domains
brong at fastmail.fm
Mon May 15 00:28:44 EDT 2006
Ken and David - a couple of questions:
1) is replication expected to work with virtual domains at all?
2) if not - how difficult do you think it would be to add - since
you've both worked with that code?
I've had a quick glance, but it looks like I need to understand
layers of indirection to get at how mailboxes are looked up during
the sync process.
Silly me, I'm trying to set up both replication and virtual domain support
at the same time - having previously had neither. I have all the machines
set up, the config in place, and I've even tried running "sync_client -u
brong5m at fastmail.fm", that being my test user account.
No luck though.
The two servers are called imap5 and imap6. Imap5 is the master, imap6 the
replica in this particular case. Since we're doing active/active with two
instances of cyrus on each machine, we have:
[root at imap5 root]$ ls -la /etc | grep imap5
-rw-r--r-- 1 root root 1270 May 12 01:37 cyrus-imap5-master.conf
-rw-r--r-- 1 root root 1218 May 12 01:37 cyrus-imap5-replica.conf
lrwxrwxrwx 1 root root 28 May 12 03:09 cyrus-imap5.conf -> /etc/cyrus-imap5-master.conf
-rw-r--r-- 1 root root 1273 May 12 03:09 imapd-imap5-master.conf
-rw-r--r-- 1 root root 1155 May 12 01:37 imapd-imap5-replica.conf
lrwxrwxrwx 1 root root 28 May 12 03:09 imapd-imap5.conf -> /etc/imapd-imap5-master.conf
[root at imap6 root]$ ls -la /etc | grep imap5
-rw-r--r-- 1 root root 1270 May 12 01:52 cyrus-imap5-master.conf
-rw-r--r-- 1 root root 1218 May 12 01:52 cyrus-imap5-replica.conf
lrwxrwxrwx 1 root root 29 May 12 03:31 cyrus-imap5.conf -> /etc/cyrus-imap5-replica.conf
-rw-r--r-- 1 root root 1272 May 12 01:52 imapd-imap5-master.conf
-rw-r--r-- 1 root root 1156 May 12 03:31 imapd-imap5-replica.conf
lrwxrwxrwx 1 root root 29 May 12 03:31 imapd-imap5.conf -> /etc/imapd-imap5-replica.conf
Allowing us to quickly switch between the various configurations.
The symlink is created by the init.d script after it checks that
there is no other instance running, and the "service IP" for that
machine is also bound using heartbeat's send_arp so that we can
just put 'imap5m.internal' as the hostname for the user's IMAP
server and know that whichever machine has that IP address is the
current master for that data pool.
Similarly, we use symlinks such that /var/cyrus/imap5 is the base
directory for cyrus on both machines, even though the data is on
different disks. This allows the configs to be entirely identical
on both machines.
So - here's a directory listing after a bunch of changes and forced
[root at imap5 root]$ find /var/cyrus/imap5/data1/
[root at imap6 root]$ find /var/cyrus/imap5/data1/
(note: we made /var/cyrus/imap5/data1/domain on imap6 by hand after
the first replication failed)
It appears that all users created in the default domain ('internal'
in our config) are replicated fine, but the users in other domains
An attempt to sync the brong5m at fastmail.fm users creates this in the
logs in imap6:
May 12 01:54:42 imap6 syncserver: login: imap5m.internal [10.202.10.5] repluser DIGEST-MD5 User logged in
May 12 01:54:42 imap6 syncserver: Failed to access inbox for brong5m at fastmail.fm
May 12 01:54:42 imap6 syncserver: Unlocked
Let me know if you need the entire configs (minus passwords, natch)
brong at fastmail.fm
More information about the Info-cyrus