SharkSpace_Scott
03-31-2009, 10:52 AM
There are two options to switch the mail server IP in Cpanel.
Option #1
Login to WHM
Click Exim Configuration Editor
Check the box next to:
"Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)"
Save Changes
Then edit the file /etc/mailips
nano /etc/mailips
from shell and add:
*: ReplacewithnewIP
Restart exim
service exim restartOption #2
Login to Shell
Access the Exim configuration file:
nano /etc/exim.confLocate remote_smtp
The default setup will look like:
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}Change to:
remote_smtp:
driver = smtp
#interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
#helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}
interface = 11.1.1.1.1 # Change to your server IP address.
Save changes and exit.
Restart Exim
service exim restartCpanel may overwrite these changes during an upgrade. This method is normally for a temporary change until you resolve issues with blacklists, etc. on the main IP.
Option #1
Login to WHM
Click Exim Configuration Editor
Check the box next to:
"Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)"
Save Changes
Then edit the file /etc/mailips
nano /etc/mailips
from shell and add:
*: ReplacewithnewIP
Restart exim
service exim restartOption #2
Login to Shell
Access the Exim configuration file:
nano /etc/exim.confLocate remote_smtp
The default setup will look like:
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}Change to:
remote_smtp:
driver = smtp
#interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
#helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}
interface = 11.1.1.1.1 # Change to your server IP address.
Save changes and exit.
Restart Exim
service exim restartCpanel may overwrite these changes during an upgrade. This method is normally for a temporary change until you resolve issues with blacklists, etc. on the main IP.