A setting method of REPLICATION in Cyrus-IMAP
Seiichirou Hiraoka
flathill at netspring.co.jp
Mon May 14 03:20:30 EDT 2007
Hello.
There is a question about REPLICATION in Cyrus-IMAP.
At first, can I manage Cyrus-IMAP with MASTER-MASTER constitution
with two servers when I use REPLICATION?
I searched a document and ML, but think that I have you teach it
because only a method to manage as MASTER-SLAVE seems to be carried.
By the way, I set it in the following examination environment at first
to manage it by MASTER-SLAVE constitution.
Server:
IP: 1.1.1.1
The OS: Solaris9(SPARC)
Software:
Cyrus-IMAP 2.2.10
(./configure --disable-gssapi --with-sasl --with-bdb \
--with-openssl --with-libwrap)
Cyrus-SASL 2.1.20
(./configure --disable-krb4 --disable-gssapi --enable-login \
--with-pam --with-des --with-openssl)
Mail Spool: /var/spool/imap(on NFS)
DBs: /var/imap
Replica:
IP: 1.1.1.2
The OS: Solaris9(SPARC)
Software:
Cyrus-IMAP 2.2.10
(The same as above)
Cyrus-SASL 2.1.20
(The same as above)
Mail Spool: /var/spool/imap(on NFS)
DBs: /var/imap
I worked as follows.
1) Setting up Server
- /etc/imapd.conf
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus, cyrus-admin
sasl_pwcheck_method: saslauthd
pop3_tls_cert_file: /var/imap/server.pem
pop3_tls_key_file: /var/imap/server.pem
imap_tls_cert_file: /var/imap/server.pem
imap_tls_key_file: /var/imap/server.pem
tls_cert_file: /var/imap/server.pem
tls_key_file: /var/imap/server.pem
expunge_mode: delayed
sync_host: 1.1.1.2
sync_authname: cyrus-admin
sync_password: password
sync_log: 1
- /etc/services
csync 2005/tcp
2) Setting up Replica
- /etc/imapd.conf
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus, cyrus-admin
sasl_pwcheck_method: saslauthd
pop3_tls_cert_file: /var/imap/server.pem
pop3_tls_key_file: /var/imap/server.pem
imap_tls_cert_file: /var/imap/server.pem
imap_tls_key_file: /var/imap/server.pem
tls_cert_file: /var/imap/server.pem
tls_key_file: /var/imap/server.pem
- /etc/cyrus.conf
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0
imaps cmd="imapd -s" listen="imaps" prefork=0
provide_uuid=1
pop3 cmd="pop3d" listen="pop3" prefork=0
pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# Nntp cmd="nntpd" listen="nntp" prefork=0 provide_uuid=1
# nntps cmd="nntpd -s" listen="nntps" prefork=0
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
provide_uuid=1
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/imap/socket/notify"
proto="udp" prefork=1
syncserver cmd="/usr/cyrus/bin/sync_server" listen="csync"
}
...
- /etc/services
csync 2005/tcp
3) Start Cyrus-IMAP on Server/Replica
saslauthd -a pam -n 0 &
/usr/cyrus/bin/master &
4) Start sync_client on Server
I carry it out in Server as follows
/usr/cyrus/bin/sync_client -l -v -u username
Then the following messages display in a terminal
1.1.1.2 Can not connect to server '', 15 retrying in seconds
And the following messages output in /var/log/imapd.log
May 14 15:59:05 Replica syncserver[17840]: [ID 518349 local6.debug]
executed
May 14 15:59:05 Replica syncserver[17840]: [ID 921384 local6.debug]
accepted connection
May 14 15:59:05 Replica syncserver[17840]: [ID 177842 local6.debug]
cmdloop(): startup
May 14 15:59:05 Replica syncserver[17840]: [ID 824502 local6.notice]
badlogin: Server [1.1.1.1] DIGEST-MD5 [SASL(-13): user not found: no
secret in database]
May 14 15:59:09 Replica syncserver[17840]: [ID 921384 local6.debug]
accepted connection
May 14 15:59:09 Replica syncserver[17840]: [ID 177842 local6.debug]
cmdloop(): startup
May 14 15:59:09 Replica syncserver[17840]: [ID 824502 local6.notice]
badlogin: Server [1.1.1.1] DIGEST-MD5 [SASL(-13): user not found: no
secret in database]
On Replica side, saslauthd starts with -a pam option, and
cyrus-admin user exist in /etc/passwd.
I am happy as things mentioned above when I can have advice.
- flathill
More information about the Info-cyrus
mailing list