The University SMTP service is handled by the two hosts smtp1.qub.ac.uk and smtp2.qub.ac.uk. The service is normally handled by smtp1.qub.ac.uk and smtp2.qub.ac.uk is available as a backup. The active SMTP server is configured with the IP address for smtp.qub.ac.uk set as a secondary address. Switching the service requires the secondary IP address to be removed from the current active server and added to the network configuration on the current passive server. A small change also needs to made to the Exim configuration on each of the servers.
It is best to update the Exim configuration in advance of making changes to the network configuration. The SMTP transport section in the configuration file looks like this –
driver = smtp
port = 52
connect_timeout = 1m
interface = 126.96.36.199
Comment out the interface line on the active server and uncomment it on the target server. Make the changes active by restarting Exim on both servers after the network configurations (see below) have been updated. Make sure that eximon is running on both servers so you can check whether the SMTP traffic has successfully switched.
Display the current IP address configuration on the active server –
# ip a show dev ens192 | grep inet
inet 188.8.131.52/24 brd 184.108.40.206 scope global noprefixroute ens192
inet 220.127.116.11/24 brd 18.104.22.168 scope global secondary noprefixroute ens192:1
inet6 fe80::250:56ff:fe8c:c405/64 scope link
The secondary address is highlighted. Remove the secondary address from the active server as follows –
# ip a del 22.214.171.124/24 dev ens192:1
Add the secondary address on the target server as follows –
# ip a add 126.96.36.199/24 dev ens192:1
Make these changes in quick succession on the active and target servers and then restart Exim on each using –
# systemctl restart exim
Monitor SMTP traffic on each server using eximon. It sometimes takes a couple of minutes for connecting hosts to pick up on the change depending on the refresh rate of their arp tables.