Testing Your Server for Open Relays
If your server has its mail relays open, your server might be used to send spam emails. If you're not sure if your relays are open, try both tests below. If your relays are open, you should use the instructions below to close them.
To Manually Test Your Server for Open Relays
From your local machine, run the following command through cmd (Windows®) or SSH (Mac and Linux):
helo me
mail from: testfrom@coolexample.com
rcpt to: testrcpt@coolexample.com
Where [server IP]
is your server's IP address.
If your relays are closed, you will receive an error that you cannot connect, similar to the following error:
Connected to mail.myserver.com.
Escape character is '^]'.
...
554 : Relay access denied
If you receive any other outputs, your relays are open.
To Perform an Automated Test for Open Relays
- Go to http://www.abuse.net/relay.html.
- In the Address to test field, enter your server's IP address.
- Click Test for relay.
On the page that displays, receiving the following message means your relays are closed:
Relay test result
All tests performed, no relays accepted.
If you receive any other outputs, your relays are open.
To Close Open Relays
Click one of the following, based on your control panel:
Plesk
- Log in to Plesk as admin.
- Click Server, and then click Mail.
- For Relays, select either Closed or Authentication Required.
- Click OK.
cPanel
Servers using cPanel® have closed relays by default. If you think they might be open, you can close them.
- Connect to your server via SSH.
- Run the following commands:
/scripts/fixrelayd/etc/rc.d/init.d/antirelayd restartservice exim restart