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 : \
lsearch;/etc/secondarymx

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 1.2.3.4, in the first text box, you would put the following:

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

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 1.2.3.4, an example would be:

trusted_neteworks 127.0.0.1 1.2.3.4

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

/etc/privaterelay

i.e

192.168.0.2
192.168.3.4

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

hostlist relay_hosts = lsearch;/etc/relayhosts :
localhost

and change it to this:

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

6) spamd failed
/scripts/fixspamassassinfailedupdate

Advertisements

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