1

Topic: iRedMail cluster, NFS, Dovecot Director.

==== Required information ====
- iRedMail version:
0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
LDAP
- Linux/BSD distribution name and version:
Debian
- Related log if you're reporting an issue:
====

Was wondering if anyone has setup an iRedMail cluster using NFS and Dovecot director. I currently have three iredmail servers setup with LDAP backends one server is setup as a master and the other two as replicas with a shared NFS directory. These three servers sit behind a load balancer which directs incoming traffic to them in a round robin fashion. But my question is if an account is setup on two devices say one on a computer and the other on a moblie device how do I ensure that the account on both devices is routed to the same server to prevent duplicating data or in other terms split braining the account on the server?

I have looked into dovecot director but am a little lost as in how to tie it in with iredmail, but it appears it would take care of the issue of routing an account setup on multiple devices to the same server. Has anyone tried this before or have any suggestions?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedMail cluster, NFS, Dovecot Director.

Why will it generate duplicate data if your NFS is shared to all 3 servers?

3

Re: iRedMail cluster, NFS, Dovecot Director.

ZhangHuangbin wrote:

Why will it generate duplicate data if your NFS is shared to all 3 servers?

Thanks for the reply, if you refer to Dovecots wiki it states that there are some concerns with NFS caching when multiple devices are trying to access the same mailbox simultaneously. This is the reason for the question about dovecot director, from following the dovecot wiki I have most of the configuration done but seem unable to find where doveadm is located. Any further explanation of the issues with NFS caching and the location of doveadm would be appreciated.

4

Re: iRedMail cluster, NFS, Dovecot Director.

jon.hoffart wrote:

seem unable to find where doveadm is located

What do you mean cannot find doveadm? It should be available if you installed Dovecot packages.

5

Re: iRedMail cluster, NFS, Dovecot Director.

I am not saying that it is not available, I am just asking where it is amongst the multiple .conf files for dovecot. I am either overlooking it or looking in the wrong spot making it difficult to locate.

6

Re: iRedMail cluster, NFS, Dovecot Director.

iRedMail uses /etc/dovecot/dovecot.conf, not /etc/dovecot/conf.d/*.

7

Re: iRedMail cluster, NFS, Dovecot Director.

Ok still trying to figure out this dovecot director the part I am stuck is where I suppose to enter or change the settings for doveadm. The following is from the wiki describing what needs to be done for doveadm:

Doveadm server
Use these settings for both director and backends:
service doveadm {
  inet_listener {
    # any port you want to use for this:
    port = 24245
  }
}

local 10.10.10.0/24 {
  # password to use for client authentication
  doveadm_password = secret
  # allow client to only use specified list of commands (default is all):
  #doveadm_allowed_commands =
}
The director also needs the following configuration:
# same port as doveadm's inet_listener
doveadm_proxy_port = 24245

protocol doveadm {
  auth_socket_path = director-userdb
}
Now you can run doveadm commands on the director, and it'll run them automatically on the correct backend server.

8

Re: iRedMail cluster, NFS, Dovecot Director.

I beleive I have followed the dovecot director wiki but have ran into a road block. Without director configured the mail server plays as it is expected to, with director configured I can no longer receive mail. My mac mail client says it is unable to connect to pop or imap, any suggestions on what went wrong or were to look?

9

Re: iRedMail cluster, NFS, Dovecot Director.

Did you direct IMAP/POP3 requests to real mail server?
it's better to ask director related questions in Dovecot mailing list, to get support from Dovecot developers directly.