Some times your server’s either main or shared IP address may get black listed by most of RBLs due to some reasons like(spamming,virus infacted mails & trojans.
In such situations, it would be very difficult to receive/send some important emails due to this black list.And it affact your mail server reputation in all over the world.
In such situation a quick resolution is to route/relay the emails through a secondary IP address on the same server which is not black listed under those RBLs.
The mail server on cpanel i.e exim allows you to change the default IP address used by the mail server so that you would be able to route all emails through this new secondary IP address.
Method 1. :-** 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)**
Add an secondary ip address in to this file and save and exit.
Restart the exim service.
# /etc/init.d/exim restart
Method 2 :- Here are the step by step instructions for you to configure your exim mail server to use new IP address.
1 :- Shutdown the exim service.
# service exim stop or /etc/init.d/exim stop
2 :- Edit your exim configuration file.
# vi /etc/exim.conf
3 :- go to “remote_smtp” section under “TRANSPORTS CONFIGURATION”.
By default it would look like below:
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}}
4 :- Comment line containing “interface” and “helo_data” and add new “interface” to match with that of your new IP address. It should look like as follows:
remote_smtp:
driver = smtp
interface = 10.10.10.10 # Your IP address.
5 :- Save your changes and exit out from your exim configuration file.
Note :- Dont forget to set read only attributes on exim configuration file, so that it won’t get reset to default automatically.
You can do it using following command:
# chattr +aui /etc/exim.conf
6 :- start exim service on your server.
# service exim restart or /etc/init.d/exim restart
7 :- Make sure to set reverse DNS for this new IP address to point a valid FQDN.
8 :- Try sending a test email and you will find that, it was sent using this new IP address configured under your exim configuration.
You can verify it by checking the header of new email under exim’s log file i.e /var/log/exim_mainlog
Enjoy linux !!!
This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!
Hello I am so thrilled I found your webpage, I really found you by mistake, while I was browsing on Askjeeve for something else, Nonetheless I am here now and would just like to say many thanks for a incredible post and a all round thrilling blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the excellent work.
Thanks for sharing superb informations. Your site is so cool. I am impressed by the details that you have on this website. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just couldn’t come across. What a perfect web site.