$Cambridge: hermes/src/cyrus-imapd/DPC_CMU_INFO/replication_testrig,v 1.2 2003/09/11 13:44:47 dpc22 Exp $ A quick and dirty recipe for setting up an replication test rig. ================================================================ Components ========== The replication system consists of four components which are of interest here. All of the following have (fairly rough and ready) manual pages. sync_client } The service programs which run at the two ends of the link sync_server } replicate Program which runs: sync_client [ + options defined in replicate(8) man page ] on local system and the following hardwired command: ssh -x -c blowfish [nominated server] sync_server in order to start the server running. We would clearly need some better configuration options before this is generally useful. sync_test A small test harness which allows us to run sync_client and sync_server on a single system for testing and debugging purposes. Runs sync_client [ + options defined in sync_test(8) man page ] for the client end, and sync_server -C /etc/imap_hermes.conf to start the server up. Again hardwired and needs cleaning up. Compilation =========== I would recommend compiling the test rig on a RedHat 9 box using CONFIGURE.sh to select configure options, just in case I have made a foul up on other platforms. I would also advise running with: unixnamespace: yes unixhierarchysep: yes to start off with as that is the well tested path. Create master and replica systems ================================= As root: # mkdir /var/imap-hermes /var/spool/imap-hermes # chown cyrus:cyrus /var/imap-hermes /var/spool/imap-hermes # mkdir /var/imap-hermes2 /var/spool/imap-hermes2 # chown cyrus:cyrus /var/imap-hermes2 /var/spool/imap-hermes2 # mkdir /usr/sieve # chown cyrus:cyrus /var/sieve # mkdir /usr/sieve2 # chown cyrus:cyrus /usr/sieve2 Copy sample imapd-hermes.conf, imap-hermes2.conf, cyrus-hermes.conf from this directory to /etc. As cyrus user: $ ./tools/mkimap /etc/imapd-hermes.conf $ ./tools/mkimap /etc/imapd-hermes2.conf Start up saslauthd and master (simulated master system). Create inbox for nominated user (dpc22 in my case) using e.g: autocreatequota magic. Create some mailfolders and messages at the source end. Make sure that /usr/local/cyrus-hermes/bin is in the search $PATH for the cyrus user. sync_test -v -v -u dpc22 should do something like the following... magenta[cyrus]$ sync_test -v -v -u dpc22 USER dpc22 USER_ALL dpc22 RESET dpc22 SETQUOTA user.dpc22 ... CREATE user.dpc22 6b98205c00000001 "dpc22 lrswipcda " 0 1 SELECT user.dpc22 SETSEEN dpc22 ... CREATE user.dpc22.aaa 0875eb093f587442 "dpc22 lrswipcda " 0 1062761538 SELECT user.dpc22.aaa UIDLAST 26 1062764470 SETSEEN dpc22 ... ENDUSER Other things that you might like to try: sync_test -v -v -u user.dpc22 user.dpc22.aaa user.dpc22.bbb replicates given set of mail folders. sync_test -v -v -r will start rolling replication up, which is what you are really interested in.