backup replication: sync_try_imap
Philippe
a4obmfyynykaadikaqjugtica5ewkdyamu at protected32.unixadm.org
Fri Aug 31 07:18:56 EDT 2018
Hi all,
I'm using cyrus-imapd 3.0.8 and I'm trying to set up a rolling backup
over imap as csync is marked as obsolete.
According to the documentation I configured the servers this way:
master:
--%snip%--
# imapd.conf
sync_log: yes
sync_log_channels: backup
backup_sync_host: my.backupserver.local
backup_sync_port: imap
backup_sync_try_imap: yes
backup_sync_authname: cyrus
backup_sync_password: somepassword
backup_sync_repeat_interval: 1
--%snip%--
replica:
--%snip%--
# cyrus.conf
SERVICES {
imap cmd="imapd" listen="*:imap"
}
--%snip%--
Testing:
> $ echo ". logout" | nc my.backupserver.local 143
> * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 SASL-IR] my.backupserver.local Cyrus IMAP 3.0.8-1.el7 RHEL server ready
> * BYE LOGOUT received
> . OK Completed
As far as I understood this should be sufficient to make sync_client use
imap in favor of csync. Unfortunately, sync_client isn't sending valid
imap commands to the server.
> $ strace -y -yy -e connect,read,write -s 1024 sync_client -n backup -o -l -v -u user1 |& egrep '(TCP|pipe):'
> connect(5<TCP:[44275807]>, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.1.253")}, 16) = -1 EINPROGRESS (Operation now in progress)
> read(5<TCP:[172.31.254.1:44144->192.168.1.253:143]>, "* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 SASL-IR] my.backupserver.local Cyrus IMAP 3.0.8-1.el7 RHEL server ready\r\n", 4096) = 174
> write(5<TCP:[172.31.254.1:44144->192.168.1.253:143]>, "EXIT\r\n", 6) = 6
> read(5<TCP:[172.31.254.1:44144->192.168.1.253:143]>, "* BAD Invalid tag\r\n", 4096) = 19
> write(2<pipe:[44272774]>, "Can not connect to server 'my.backupserver.local'\n", 61Can not connect to server 'my.backupserver.local'
Now when I change "backup_sync_try_imap: yes" to "sync_try_imap: yes" it
seems to be working at first but then another connection opens and fails:
> $ strace -y -yy -e connect,read,write -s 1024 sync_client -n backup -o -l -v -u user1 |& egrep '(TCP|pipe):'
> connect(5<TCP:[44278756]>, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.1.253")}, 16) = -1 EINPROGRESS (Operation now in progress)
> read(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 SASL-IR] my.backupserver.local Cyrus IMAP 3.0.8-1.el7 RHEL server ready\r\n", 4096) = 174
> write(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "A01 AUTHENTICATE DIGEST-MD5\r\n", 29) = 29
> read(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "+ ...", 4096) = 276
> write(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "...", 410) = 410
> read(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "+ cnNwYXV0aD05Y2E1ZDgyNmMyNTZkNTc0ODhlNmFiMDBkMTVjNjY0Mw==\r\n", 4096) = 60
> write(5<TCP:[172.31.254.1:44420->192.168.1.253:143]>, "...", 36) = 36
> connect(5<TCP:[44278759]>, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.1.253")}, 16) = -1 EINPROGRESS (Operation now in progress)
> read(5<TCP:[172.31.254.1:44424->192.168.1.253:143]>, "* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE LOGINDISABLED AUTH=CRAM-MD5 AUTH=DIGEST-MD5 SASL-IR] my.backupserver.local Cyrus IMAP 3.0.8-1.el7 RHEL server ready\r\n", 4096) = 174
> write(5<TCP:[172.31.254.1:44424->192.168.1.253:143]>, "EXIT\r\n", 6) = 6
> read(5<TCP:[172.31.254.1:44424->192.168.1.253:143]>, "* BAD Invalid tag\r\n", 4096) = 19
> write(2<pipe:[44306013]>, "Can not connect to server 'my.backupserver.local'\n", 61Can not connect to server 'my.backupserver.local'
Am I missing something?
Best,
Philippe
More information about the Cyrus-devel
mailing list