Home Guides Glossary

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):

telnet [server IP] 25
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:

Trying IP address...
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

  1. Go to http://mxtoolbox.com/diagnostic.aspx.
  2. In the Mail Server field, enter your server's IP address.
  3. Click Test Email Server.

On the page that displays, receiving a message of Failed To Connect in the Results column of the SMTP Connect row means your relays are closed.

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

  1. Log in to Plesk as admin.
  2. Click Server, and then click Mail.
  3. For Relays, select either Closed or Authentication Required.
  4. Click OK.

cPanel

Servers using cPanel® have closed relays by default. If you think they might be open, you can close them.

  1. Connect to your server via SSH.
  2. Run the following commands:
    /scripts/fixrelayd
    /etc/rc.d/init.d/antirelayd restart
    service exim restart

Simple Control Panel

  1. Connect to your server via SSH.
  2. Using a text editor, add the following line to the bottom of /etc/postfix/main.cf:
    smtpd_sender_restrictions = reject_unknown_sender_domain,reject_non_fqdn_sender
  3. Run the following command:
    service postfix restart

Domain Registration

Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

Website Builder

Build an amazing website in just under an hour with Website Builder. Take advantage of designs created just for your industry and then customize them to reflect your one-of-a-kind idea.

Website Security

Protect your website and keep customers safe. Your comprehensive Website Security solution. Get peace of mind by securing your websites.

cPanel Hosting

Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate
Copyright © 2005 - 2024.  All rights reserved.  Privacy Policy