2

I have one cyrus murder (aggregator) master and a IMAP backend cluster on failover consisting of 2 nodes (backend1 and backend2).

I use corosync/pacemaker to set :

  • a virtual IP
  • start and stop the cyrus-imapd service

for the backend IMAP cluster.

I use too drbd to synchronize the /var/lib/imap and the /var/spool/imap between my 2 IMAP backends.

For example, the cyrus-imapd service runs on the backend1. When userA creates folders and subfolders in their INBOX, the backend1 requets the aggregator with the mupdate protocole. It replied positively and on the aggregator's mailboxes.db we have the folders plus the backend's name where the folder is stored.

Even if the backend1 stops, the backend2 takes over. When userA create folder, cyrus-imapd requests from the aggregator if it can create the folder. The aggregator replied negatively because the aggregator knows that the userA's mailbox is managed by the backend1. It doesn't know that backend1 and backend2 are the "same". So it ordered the backend2 to delete the mailbox. But as their datas are replicated, so the maibox disappears on backend1.

So my question is the following : Is there an option, in the imapd.conf or something else that allows my 2 backend's IMAP appear with the same name ?

1

Sounds like you just need to set the same 'servername' option on both machines in imapd.conf.

{ "servername", NULL, STRING } /* This is the hostname visible in the greeting messages of the POP, IMAP and LMTP daemons. If it is unset, then the result returned from gethostname(2) is used. */

That's not all it does though - it's also used by murder to identify the server.

  • Okay I didn't think I could use the servername option because there is no indication in the definition of this option that it is used in the MUPDATEprotocol . So I'm going to test it. Thanks a lot. – Cédric Dec 13 '13 at 9:14
  • I've updated the docs in git to say this: This is the hostname visible in the greeting messages of the POP, IMAP and LMTP daemons. If it is unset, then the result returned from gethostname(2) is used. This is also the value used by murder clusters to identify the host name. It should be resolvable by DNS to the correct host, and unique within an active cluster. If you are using low level replication (e.g. drbd) then it should be the same on each copy and the DNS name should also be moved to the new master on failover. – Bron Gondwana Dec 18 '13 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.