Exim troubleshooting

Following are useful commands in order to troubleshoot email issue in case you’re using Exim.

1)How can I block certain domains from relaying via exim?
To disallow certain local domains from relaying through your server, you will want to ssh into the server and create the file /etc/norelay. In that file, you may can put a list of domains that you do not wish to relay through. This should be one domain per line without any spaces. After that, log into WHM, click on the Exim Configuration Editor, and then select the advanced configuration button. In the first check box, put the following:
domainlist relay_domains = !lsearch;/etc/norelay : lsearch;/etc/localdomains : \

Click on Save.

2)How can I manually kill the exim queue?
/usr/local/cpanel/whostmgr/bin/whostmgr2 killeximq

3)How can I put an IP on the allow relay host on exim via cpanel?
To allow relaying from a particular IP in exim, you would log into WHM, click on “Exim Configuration Editor”, and then click on “Switch to Advanced Mode”. If you wished to allow relaying from the IP of, in the first text box, you would put the following:

hostlist relay_hosts = lsearch;/etc/relayhosts : \
localhost :

The scroll down to the bottom and click on “Save”.

4)How can I stop our Spamassassin from marking all internal emails as spam (sent from a domain on the server to another domain on the server)
The easiest way to do this, would be to modify /etc/mail/spamassassin and set the trusted_networks setting. You should include localhost, and either your servers IP, or the entire range of IP’s that are on your server. If your servers IP address was, an example would be:


5)How do I authorize an IP to relay through my cPanel/exim server?
Create a file with your host IP or IPs and named it something like



Next, located the following entry at the top of the /etc/exim.conf file:

hostlist relay_hosts = lsearch;/etc/relayhosts :

and change it to this:

hostlist relay_hosts = lsearch;/etc/relayhosts :
localhost : lsearch;/etc/privaterelay

6) spamd failed


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s