I have been receiving a lot of complaints lately from my email service subscribers that outgoing emails were categorized as spam and going directly in the spam folder of their recipients. Upon checking the problem, I discovered that one of the domains hosted in the server has been compromised to send unsolicited emails and was blacklisted by major free email service providers — uggh! The server is using Exim MTA to handle SMTP service, with multiple IPs assigned to the server I decided to route the offending domains’ email relays to the servers’ loopback interface. The rest of the domains are then routed to a clean IP address or to their assigned dedicated IP address.

Below were the steps made to resolve the above email problem:

1. Login your mail server through ssh or console, if you have physical access.
2. Edit your mailips file located in /etc directory:


             sudo vi /etc/mailips
            

3. Your mailips should look like the format below:


           #  Domain : IP
           # Route specific domain to an IP
               seoroot.com : 198.23.111.25 
           # All outgoing domain emails to specific IP, except for compromised domains
               * : 1.2.3.4
           # All compromised domains
               domain1 : 127.0.0.1
               domain2 :  127.0.0.1
          

4. Save and exit your editor. Restart your Exim MTA.


               service exim restart
             

That’s about it! You should have your new mailips in effect already. Do send a test mail and check that you have your email in your inbox.

Feel free to drop me an email/comment below for help and suggestions/tips.

Leave a Reply

Your email address will not be published. Required fields are marked *