At cPanel, we take security seriously as an insecure server can go through and make our servers unreliable or have data stolen. In some other cases, we want to have other safeguards in place, such as only allowing individual IP addresses to send emails through the server.
In this case, we will be going through the steps on restricting access to SMTP so that only individual IP addresses will be able to send an email on the server. This will help fight against spam sent from the server because a client's login information was found and used to log into the email account.
To be able to blacklist IPs from being able to send emails through SMTP, use the following steps:
- Log into WHM as the root user.
- Go through to Home >> Service Configuration >> Exim Configuration Manager.
- Once that has loaded in, you will go to Access Lists >> Blacklisted SMTP IP addresses.
- Click on Edit and put in the IP address that you would like to blacklist. From there, you can go through and click on save.
- Once the window closes, click on the Save button on the button of the page.
Once this has been set, the system will not allow the IP address specified in the popup to connect to the SMTP server and drop the connection with a 550 error. You can also go through and specify IP ranges in the popup so you can set up IP ranges to exclude full networks or countries.