Due to spamming issues occurred in Exim mail server the IP gets blacklisted. In order to avoid that we can change the mail server IP. It's Easy to change the IP address in Exim. But if you wish to automatically set IP rotation in Exim mail server, follow the steps below.
First edit the Exim configuration file
# vi /etc/exim.conf Search for the line :
interface =
Replace this line with
interface = xxx.xxx.x.1${eval:${substr{-2}{1}{$tod_zulu}}%9+1}If Server is having IP's from xxx.xxx.x.11 to xxx.xxx.x.20 , you can use above line.
+1 is the starting ip, 9 is the increment value ie 11(xxx.xxx.x.11) to how much. Here it is 20 (xxx.xxx.x.20)