Remove a node from cluster

Julien Groselle
Added over 4 years ago

Preparation

Fist of all, you have to remove this node from your domain's MX record.
Be sure that the DNS replication is up to date and this MailCleaner node does not receive mail anymore.

Remove node from cluster

To remove a mode from the cluster you have to run the folowing script on the master

/usr/mailcleaner/scripts/configuration/slaves.pl

################################
## Mailcleaner slaves manager ##
################################

1) change host settings
2) view slaves
3) delete slave
4) add slave
5) set this host as slave
q) quit

Enter your choice: 

Select 2) view slaves and note the ID of the node you want to remove.
After select 3) delete slave and entre the slave ID. Press Enter and "*q*" to quit and apply changes to MailCleaner Firewall.

At this point, login to the web admin interface and go to Monitoring -> Status to confirm that the node is not in cluster anymore.

Some things about datas

All MailCleaner nodes store their own datas. So the SPAM and Content quarantines are located on each nodes.
If you stop the node, you won't be able to restore / release messages.

A best practice could be to remove the node from MX record and wait until the quarantine are empty.
After that you can execute the remove procedure above.

If you don't care about datas, you can stop the server / virtual machine.