To allow sending emails from another server (to use your server as a relay), you need to allow access to that IP address.
Step 1. Whitelist IP address on the firewall
csf -a IP-HERE
Step 2. Add IP address to Exim Configuration
Navigate to WHM > Exim Configuration Manager and under Basic Editor locate
- Trusted SMTP IP addresses
- Sender verification bypass IP addresses
Add your IP to both of them, save changes and restart Exim.
Step 3. Add IP to /etc/relayhosts
Exim uses a file /etc/relayhosts that have IP addresses of temporarily whitelisted senders. The file is dynamically generated so you shouldn’t modify it directly. Instead, create a new file /etc/alwaysrelay and add the IP address in it.
restart Exim and check if the added IP is included in /etc/relayhosts
cat /etc/relayhosts | grep IP-HERE