1 (edited by t10 2016-03-22 14:38:29)

Topic: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

======== Required information ====
- iRedMail version (check /etc/iredmail-release):  iRedMail-0.9.4
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: -
====

Hi, This is my testing for HA mailservers and it's work smoothly
sorry for using standard config, bcause im not linux expert. wink
*use search engine first if u have a problem big_smile


GOAL: 2 iRedmail Servers behind 2 Keepalived+HAProxy 
REQUIRED: 4 Servers Under Centos 7
EXAMPLE DOMAIN : ngembatbas.kom


t10a

*all servers must be installed CentOS7

STEPS :
1. Install+Configure KeepAlived
2. Install+Configure HAProxy
3. Install+Configure GlusterFS as glusterserver & glusterclient  (u can use separate machine for glusterserve) it's better to use a new hard drive with the same capacity 
4. Install+Configure Iredmail -> sync LDAP(Master-Slave), replicate MariDB (Master-Master)


                **************************************************************
                        1. Install+Configure KeepAlived  (2 Servers)
                **************************************************************   

#for both servers:

[root@ ~] nano /etc/hosts

192.168.1.1 ha1
192.168.1.2 ha2
192.168.1.3 mail1
192.168.1.4 mail2

[root@ ~] yum install -y keepalived
[root@ ~] mv /etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf_DEFAULT

#on server1
[root@ha1 ~] nano /etc/keepalived/keepalived.conf
#Add this

vrrp_script chk_haproxy {
    script "killall -0 haproxy" # check the haproxy process
    interval 2 # every 2 seconds
    weight 2 # add 2 points if OK
}
vrrp_instance VI_1 {
    interface eth0 # (change eth0  to your existing interface ) interface to monitor
    state MASTER # MASTER on ha1, BACKUP on ha2
    virtual_router_id 51
    priority 101 # 101 on ha1, 100 on ha2
    virtual_ipaddress {
    192.168.1.10 # virtual ip address
    }
    track_script {
        chk_haproxy
    }
}

#on server2
[root@ha2 ~] nano /etc/keepalived/keepalived.conf
#Add this

vrrp_script chk_haproxy {
    script "killall -0 haproxy" # check the haproxy process
    interval 2 # every 2 seconds
    weight 2 # add 2 points if OK
}
vrrp_instance VI_1 {
    interface eth0 # (change eth0  to your existing interface ) interface to monitor
    state BACKUP # MASTER on ha1, BACKUP on ha2
    virtual_router_id 51
    priority 100 # 101 on ha1, 100 on ha2
    virtual_ipaddress {
    192.168.1.10 # virtual ip address
    }
    track_script {
        chk_haproxy
    }
}

#start KeepAlived on both servers
[root@ ~] systemctl enable keepalived
[root@ ~] systemctl start keepalived

#cek status of virtual IP (192.168.1.10) using this command on both servers,
[root@ha2 ~] ip a


                **************************************************************
                        2. Install+Configure HAProxy  (2 Servers)
                **************************************************************   
#for both servers:               
[root@ ~] yum install -y haproxy               
[root@ ~] mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg_DEFAULT

#on server1 add this
[root@ha1 ~] nano /etc/haproxy/haproxy.cfg

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 debug
        maxconn   45000 # Total Max Connections.
        daemon
        nbproc      1 # Number of processing cores.
defaults
        timeout server 86400000
        timeout connect 86400000
        timeout client 86400000
        timeout queue   1000s

# [HTTP Site Configuration]
listen  http_web 192.168.1.10:80
                bind *:80
                bind *:443 ssl crt /etc/ssl/ngembatbas.kom/ngembatbas.kom.pem
            redirect scheme https if !{ ssl_fc }
        mode http
        balance roundrobin  # Load Balancing algorithm
        option httpchk
        option forwardfor
        server mail1 192.168.1.3:443 weight 1 maxconn 512 check
        server mail2 192.168.1.4:443 weight 1 maxconn 512 check

# [HTTPS Site Configuration]
listen  https_web 192.168.1.10:443
        mode tcp
        balance source# Load Balancing algorithm
        reqadd X-Forwarded-Proto:\ http
        server mail1 192.168.1.3:443 weight 1 maxconn 512 check
        server mail2 192.168.1.4:443 weight 1 maxconn 512 check

# Reporting
listen stats :9000 #Listen on localhost port 9000
                mode http
                stats enable #Enable statistics
                stats hide-version #Hide HAPRoxy version, a necessity for any public-facing site
                stats realm Haproxy\ Statistics #Show this text in authentication popup (escape space characters with backslash)
                stats uri /haproxy_stats #The URI of the stats page, in this case localhost:9000/haproxy_stats
                stats auth Username:Password #Set a username and password

       
#on server2 add this
[root@ha2 ~] nano /etc/haproxy/haproxy.cfg

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 debug
        maxconn   45000 # Total Max Connections.
        daemon
        nbproc      1 # Number of processing cores.
defaults
        timeout server 86400000
        timeout connect 86400000
        timeout client 86400000
        timeout queue   1000s

# [HTTP Site Configuration]
listen  http_web 192.168.1.10:80
                bind *:80
                bind *:443 ssl crt /etc/ssl/ngembatbas.kom/ngembatbas.kom.pem
            redirect scheme https if !{ ssl_fc }
        mode http
        balance roundrobin  # Load Balancing algorithm
        option httpchk
        option forwardfor
        server mail1 192.168.1.3:80 weight 1 maxconn 512 check
        server mail2 192.168.1.4:80 weight 1 maxconn 512 check

# [HTTPS Site Configuration]
listen  https_web 192.168.1.10:443
        mode tcp
        balance source# Load Balancing algorithm
        reqadd X-Forwarded-Proto:\ http
        server mail1 192.168.1.3:443 weight 1 maxconn 512 check
        server mail2 192.168.1.4:443 weight 1 maxconn 512 check

# Reporting
listen stats :9000 #Listen on localhost port 9000
                mode http
                stats enable #Enable statistics
                stats hide-version #Hide HAPRoxy version, a necessity for any public-facing site
                stats realm Haproxy\ Statistics #Show this text in authentication popup (escape space characters with backslash)
                stats uri /haproxy_stats #The URI of the stats page, in this case localhost:9000/haproxy_stats
                stats auth your_username:your_password #Set a username and password

#Create cert for ssl redirect (to iRedMail Servers)
[root@ ~] mkdir /etc/ssl/ngembatbas.kom/
[root@ ~] openssl genrsa -out /etc/ssl/ngembatbas.kom/ngembatbas.kom.key 2048
[root@ ~] openssl req -new -key /etc/ssl/ngembatbas.kom/ngembatbas.kom.key \
                   -out /etc/ssl/ngembatbas.kom/ngembatbas.kom.csr

[root@ ~] openssl x509 -req -days 365 -in /etc/ssl/ngembatbas.kom/ngembatbas.kom.csr \
                    -signkey /etc/ssl/ngembatbas.kom/ngembatbas.kom.key \
                    -out /etc/ssl/ngembatbas.kom/ngembatbas.kom.crt
                   
[root@ ~] cat /etc/ssl/ngembatbas.kom/ngembatbas.kom.crt /etc/ssl/ngembatbas.kom/ngembatbas.kom.key \
           | sudo tee /etc/ssl/ngembatbas.kom/ngembatbas.kom.pem   
          
#Activate HAProxy service:
[root@ ~] systemctl enable haproxy
[root@ ~] systemctl start haproxy

#check log if any errors
[root@ ~] tail -f /var/log/messages

#allow http/s,haproxystat  ports
[root@ ~] firewall-cmd --zone=public --permanent --add-port=80/tcp
[root@ ~] firewall-cmd --zone=public --permanent --add-port=443/tcp
[root@ ~] firewall-cmd --zone=public --permanent --add-port=9000/tcp
[root@ ~] firewall-cmd --reload


                **************************************************************
                        3. Install+Configure GlusterFS  (2 Servers)
                **************************************************************
               
#add this on both servers               
[root@ ~] nano /etc/hosts   

192.168.1.3 mail1
192.168.1.4 mail2

#on server1 add new disk
[root@mail1 ~] fdisk /dev/sdb    #type 'n', and hit enter for next question, (dont forget to write) hit 'w'
[root@mail1 ~] /sbin/mkfs.ext4 /dev/sdb1
[root@mail1 ~] mkdir /glusterfs1

[root@mail1 ~] nano /etc/fstab
#add this line
/dev/sdb1 /glusterfs1      ext4    defaults        1 2

#remount all
[root@mail1 ~] mount -a

#on server2 add new disk
[root@mail2 ~] fdisk /dev/sdb    #type 'n', and hit enter for next question, (dont forget to write) hit 'w'
[root@mail2 ~] /sbin/mkfs.ext4 /dev/sdb1
[root@mail2 ~] mkdir /glusterfs2

[root@ ~] nano /etc/fstab
#add this line

/dev/sdb1 /glusterfs1      ext4    defaults        1 2

#remount all
[root@mail2 ~] mount -a

#Install to both servers               
[root@ ~] rpm  -ivh  http://dl.fedoraproject.org/pub/epel/7/ … noarch.rpm
[root@ ~] wget  -P /etc/yum.repos.d http://download.gluster.org/pub/gluster … -epel.repo
[root@ ~] yum -y install glusterfs glusterfs-fuse glusterfs-server
#start it
[root@ ~] systemctl enable glusterd.service
[root@ ~] systemctl start glusterd.service
#disabling firewalld, 
[root@ ~] systemctl stop firewalld.service
[root@ ~] systemctl disable firewalld.service               

#on server1
[root@mail1 ~]# gluster peer probe mail2

#on server2
[root@mail1 ~]# gluster peer probe mail1

#u can check status using this command : 'gluster peer status'

#ONLY on server1
[root@mail1 ~]# gluster volume create mailrep-volume replica 2  mail1:/glusterfs1/vmail  mail2:/glusterfs2/vmail force
[root@mail1 ~]# gluster volume start mailrep-volume
#check it
[root@mail1 ~]# gluster volume info mailrep-volume


#create folder for vmail n mount glusterfs to vmail folder

#on server1
[root@mail1 ~]# mkdir  /var/vmail
[root@mail1 ~]# mount.glusterfs mail1:/mailrep-volume /var/vmail/

[root@mail1 ~]# nano /etc/fstab
#add this line

mail1:/mailrep-volume /var/vmail glusterfs defaults,_netdev 0 0

[root@mail1 ~] mount -a
#check it
[root@mail1 ~] df -h

#on server2
[root@mail2 ~]# mkdir  /var/vmail
[root@mail2 ~]# mount.glusterfs mail2:/mailrep-volume /var/vmail/

[root@mail2 ~]# nano /etc/fstab
#add this line

mail2:/mailrep-volume /var/vmail glusterfs defaults,_netdev 0 0

[root@mail2 ~] mount -a
#check it
[root@mail2 ~] df -h

###TESTING
cd  /var/vmail; touch R1 R2 R3 R4 R5 R6

#make sure, by checking files on both servers,
[root@ ~] ls -la /var/vmail


                **************************************************************
                        4.  Install+Configure Iredmail  (2 Servers)
                **************************************************************

For installing iredmail on centos,check this link : http://www.iredmail.org/docs/install.ir … .rhel.html

ATTENTION:
* First install iRedMail to mail1 and Second to mail2 (better,do not reboot after installing iRedMail, wait untill finish install/configure)
* Dont forget to choose LDAP and using default mail folder : '/var/vmail' ---  (i use nginx)


    #Configure LDAP sync (Master-Slave) :
    *************************************
#on server1(MASTER):
[root@mail1 ~] nano /etc/openldap/slapd.conf
###insert this to bottom of file

moduleload syncprov
index entryCSN,entryUUID eq
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 200

#on server2 SLAVE):
[root@mail2 ~] nano /etc/openldap/slapd.conf
##insert this to bottom of file and change the settings to your own

syncrepl   rid=001
           provider=ldap://mail1:389
           searchbase="dc=ngembatbas,dc=kom"
           bindmethod=simple
           binddn="cn=vmail,dc=ngembatbas,dc=kom"
           credentials=erec3xiThBUW9QnnU9Bnifp3434
           schemachecking=on
           type=refreshOnly
           retry="60 +"
           scope=sub
           interval=00:00:01:00
           attrs="*,+"

          
#on both servers set firewalld to accept gluster port, ldap port, and database to each servers 
#or u can set by your own rules
[root@ ~] firewall-cmd --permanent --zone=iredmail --add-rich-rule="rule family="ipv4" \
            source address="192.168.1.3/24" \
            port protocol="tcp" port="389" accept"

[root@ ~] firewall-cmd --permanent --zone=iredmail --add-rich-rule="rule family="ipv4" \
            source address="192.168.1.4/24" \
            port protocol="tcp" port="3306" accept"

[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=111/udp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=24007/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=24008/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=24009/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=139/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=445/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=965/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=2049/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=38465-38469/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=631/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=963/tcp
[root@ ~] firewall-cmd --zone=iredmail --permanent --add-port=49152-49251/tcp
#reload it
[root@ ~] firewall-cmd --reload

#reload ldap
[root@ ~] systemctl restart slapd.service


    #Configure MariaDB replica (Master-Master) :
    ********************************************
#on server1   
[root@mail1 ~]# nano /etc/my.cnf
#add this after [mysqld]

server-id               = 1
    log_bin                 = /var/log/mariadb/mariadb-bin.log
    log-slave-updates
    log-bin-index             = /var/log/mariadb/log-bin.index
    log-error                 = /var/log/mariadb/error.log
    relay-log                 = /var/log/mariadb/relay.log
    relay-log-info-file     = /var/log/mariadb/relay-log.info
    relay-log-index         = /var/log/mariadb/relay-log.index
    auto_increment_increment = 10
    auto_increment_offset   = 1
    binlog_do_db            = amavisd
    binlog_do_db            = iredadmin
    #binlog_do_db           = iredapd
    binlog_do_db            = roundcubemail
    binlog_do_db            = sogo
    binlog-ignore-db=test
    binlog-ignore-db=information_schema
    binlog-ignore-db=mysql
    log-slave-updates
    replicate-ignore-db=test
    replicate-ignore-db=information_schema
    replicate-ignore-db=mysql

#reload database and already master   
[root@mail1 ~]# systemctl restart mariadb


#on server2
[root@mail1 ~]# nano /etc/my.cnf
#add this after [mysqld]

server-id               = 2
    log_bin                 = /var/log/mariadb/mariadb-bin.log
    log-slave-updates
    log-bin-index             = /var/log/mariadb/log-bin.index
    log-error                 = /var/log/mariadb/error.log
    relay-log                 = /var/log/mariadb/relay.log
    relay-log-info-file     = /var/log/mariadb/relay-log.info
    relay-log-index         = /var/log/mariadb/relay-log.index
    auto_increment_increment = 10
    auto_increment_offset = 1
    binlog_do_db            = amavisd
    binlog_do_db            = iredadmin
    #binlog_do_db           = iredapd
    binlog_do_db            = roundcubemail
    binlog_do_db            = sogo
    binlog-ignore-db=test
    binlog-ignore-db=information_schema
    binlog-ignore-db=mysql
    log-slave-updates
    replicate-ignore-db=test
    replicate-ignore-db=information_schema
    replicate-ignore-db=mysql

#reload database and already master   
#on server1
[root@mail1 ~]# systemctl restart mariadb
               
#create replicator user on both servers
[root@mail1 ~]# mysql -u root -pYourDBRootPassword
                create user 'replicator'@'%' identified by '12345678';
                grant replication slave on *.* to 'replicator'@'%';
               
                #check master status for 'File' and 'Position'
                SHOW MASTER STATUS;
                +--------------------+----------+----------------------------------------------+-------------------------------+
                | File               | Position | Binlog_Do_DB                                 | Binlog_Ignore_DB              |
                +--------------------+----------+----------------------------------------------+-------------------------------+
                | mariadb-bin.000001 |      245 | amavisd,iredadmin,iredapd,roundcubemail,sogo | test,information_schema,mysql |
                +--------------------+----------+----------------------------------------------+-------------------------------+
                1 row in set (0.00 sec)
               
                exit;

#on server2               
[root@mail2 ~]# mysql -u root -pYourDBRootPassword
                create user 'replicator'@'%' identified by '12345678';
                grant replication slave on *.* to 'replicator'@'%';
               
                #configure as slave
                slave stop;        
                # change to your own master status MASTER_LOG_FILE is from 'File', MASTER_LOG_POS is from 'Position' of master mail1
                CHANGE MASTER TO MASTER_HOST = '192.168.1.3', MASTER_USER = 'replicator', MASTER_PASSWORD = '12345678', MASTER_LOG_FILE = 'mariadb-bin.000001', MASTER_LOG_POS = 245;
                slave start;    
               
                #check master status for 'File' and 'Position'
                SHOW MASTER STATUS;    
                +--------------------+----------+----------------------------------------------+-------------------------------+
                | File               | Position | Binlog_Do_DB                                 | Binlog_Ignore_DB              |
                +--------------------+----------+----------------------------------------------+-------------------------------+
                | mariadb-bin.000001 |     289 | amavisd,iredadmin,iredapd,roundcubemail,sogo | test,information_schema,mysql |
                +--------------------+----------+----------------------------------------------+-------------------------------+
                1 row in set (0.00 sec)

                #check slave status
                show slave status\G;   
                exit;
[root@mail2 ~]#    systemctl restart mariadb           

#BACK to server1
#on server1
[root@mail1 ~]#
                mysql -u root -pYourDBRootPassword
                slave stop;
                # change to your own master status MASTER_LOG_FILE is from 'File', MASTER_LOG_POS is from 'Position' of master mail2
                CHANGE MASTER TO MASTER_HOST = '192.168.1.4', MASTER_USER = 'replicator', MASTER_PASSWORD = '12345678', MASTER_LOG_FILE = 'mariadb-bin.000001', MASTER_LOG_POS = 289;
                slave start;
               
                #check slave status
                show slave status\G;   
                exit;               
[root@mail1 ~]#    systemctl restart mariadb           
               
#reboot one of mailserver n wait till up, then reboot the other mailserver (*)
               
### FINISH ###
for testing:
1. u can create users using iredadmin on mail1, then check users from mail2 and its already sync big_smile
2. try to login using roundcubemail from any mailserver then u can check users on database 'roundcubemail->users', and its already sync big_smile
3. u can try to shutdown others server to testing it (ha1 or ha2  --/OR--  mail1 or mail2)

*only mail1 'can add n modify' users
*this mailservers act  as Glusterserver & Glusterclient, if u want to reboot the servers, please reboot firts server untill this up then reboot the second server.
if all servers are reboot for the same time it will not mount '/var/vmail' folder.  u must mount manually using this command 'gluster volume start mailrep-volume force'       
               

to view the DB easily, u can install phpmyadmin :
yum install phpmyadmin -y
ln -s /usr/share/phpMyAdmin /var/www/html/

cd /var/lib/php/
mkdir session
chown nginx:nginx session/   

References:
GlusterFS:
http://www.unixmen.com/install-glusterf … -centos-7/

DBReplica
http://linoxide.com/how-tos/configure-m … tos-linux/
http://tecadmin.net/how-to-set-up-mysql … lication/#
https://support.rackspace.com/how-to/my … plication/
http://www.tecmint.com/mariadb-master-s … el-debian/

HAProxy+KeepAlived
http://tecadmin.net/install-and-configu … on-centos/
http://www.unixmen.com/configure-high-a … eepalived/
https://serversforhackers.com/using-ssl … th-haproxy

LDAP
http://www.iredmail.org/forum/topic6306 … -only.html

----

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

2

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Very good, thanks very much for sharing. It would be better if you can write the document in Markdown format, then i can publish it under http://www.iredmail.org/docs/ smile

All our documentations are hosted here:
https://bitbucket.org/zhb/iredmail-docs/src

3

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

ZhangHuangbin wrote:

Very good, thanks very much for sharing. It would be better if you can write the document in Markdown format, then i can publish it under http://www.iredmail.org/docs/ smile

All our documentations are hosted here:
https://bitbucket.org/zhb/iredmail-docs/src

ok, u can see this https://bitbucket.org/jrt10/catatan/src

*sorry if not as expected, im not good at writing (usin' m*kpad2 ) and I've never used bitbucket before big_smile
*u can ignore it if it does not match as expectations smile

4

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Is it ok to allow me to fully copy your document and commit to iRedMail document repository? it will appear in our web site: http://www.iredmail.org/docs/

I will do some formatting to make it look better, and of course will keep the author info (i do formatting job, not steal your work) smile

5

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

ZhangHuangbin wrote:

Is it ok to allow me to fully copy your document and commit to iRedMail document repository? it will appear in our web site: http://www.iredmail.org/docs/

absolutely yes.. big_smile,  it's an honor for me wink

ZhangHuangbin wrote:

I will do some formatting to make it look better, and of course will keep the author info (i do formatting job, not steal your work) smile

go on , all up to you and this is yours now big_smile smile

6

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Thanks for your generous.

*) May i know your full name and email address? i will add them in the document.
*) Also, can we get a high quality copy of this image? http://s14.postimg.org/sfooxggu9/iredmailhat10b.png
*) Draft document is now online, with basic formatting, but no typo or detailed improvements yet:
http://www.iredmail.org/docs/haproxy.ke … terfs.html

If you want to update this document, just send me a pull request, here's the source file in 'iredmail-docs' repository:
https://bitbucket.org/zhb/iredmail-docs … at=default

7

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

t10 wrote:

go on , all up to you and this is yours now

With this permit, i may update document with more details in the future, including change the descriptions, it might look like not written by you. smile

8

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

ZhangHuangbin wrote:
t10 wrote:

go on , all up to you and this is yours now

With this permit, i may update document with more details in the future, including change the descriptions, it might look like not written by you. smile

it's ok. totally agree  big_smile big_smile wink smile smile

9

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Dear t10,

*) May i know your full name and email address? i will add them in the document.
*) Also, can we get a high quality copy of this image? http://s14.postimg.org/sfooxggu9/iredmailhat10b.png

10

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

ZhangHuangbin wrote:

Dear t10,

*) May i know your full name and email address? i will add them in the document.

*) Also, can we get a high quality copy of this image? http://s14.postimg.org/sfooxggu9/iredmailhat10b.png

I just add, u can check in here again -> https://bitbucket.org/jrt10/catatan/src/

i use yED to create/export the image, I attach the original file so that you can edit as you like smile  smile

11

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

How about this: i push my formatted document to your bitbucket repo, then just add a link to your repo on http://www.iredmail.org/docs/ ?
This way you can keep update your document. smile

Here's the markdown file:
https://bitbucket.org/zhb/iredmail-docs … usterfs.md

12

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

ZhangHuangbin wrote:

How about this: i push my formatted document to your bitbucket repo, then just add a link to your repo on http://www.iredmail.org/docs/ ?
This way you can keep update your document. smile

Sounds good. smile wink but its not a problem if it not in my repo too, it is up to you now big_smile

ZhangHuangbin wrote:

Here's the markdown file:
https://bitbucket.org/zhb/iredmail-docs … usterfs.md

wow, its look better now. thanks zhang big_smile smile

13

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Hey,

Is the servers needs to be dedicated physical servers?. Can I create four servers, say on AWS EC2 and use them?.

Thanks

14

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

abdulwahabkdi wrote:

Is the servers needs to be dedicated physical servers?

No.

abdulwahabkdi wrote:

Can I create four servers, say on AWS EC2 and use them?.

YES.

15 (edited by mkumarjha 2017-03-15 23:13:36)

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

thanks for sharing.
when i use virtual ip in outlook, we are unable to login with our server.
its ok with gui, but how can we achive through outlook or thunderbird.
i am unable to talnet with virtual ip

16

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

hi, @mkumarjha,

Seems your keepalived is not working correctly, check its log file.

BTW, we have a fully working iRedMail load-balance cluster solution, if you're interested in this, please contact us: http://www.iredmail.org/contact.html

17 (edited by t10 2017-11-20 16:40:15)

Re: HA iRedmail, Using: KeepAlived+HAProxy,GlusterFS, syncLDAP, dbReplica

Hi,
if needed, this is an update tutor for failover iredmail.(video include)
both mailserver can add n modify' users (sync each other)

https://goo.gl/tgdTC7

Thx