[null, null, null, null, null, null, null, null, null, null, null, null, null, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/Selection-1172x967-99-60x60.png", "src": "https://smyl.es/wurdp/assets/Selection-1172x967-99-60x60.png", "formatted_filename": "Selection", "alt_text": "Ubuntu End of Life Package Repository", "rendered_width": 60, "rendered_height": 60}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/ajentiv-60x60.png", "src": "https://smyl.es/wurdp/assets/ajentiv-60x60.png", "formatted_filename": "ajentiv", "alt_text": "Ajenti V", "rendered_width": 60, "rendered_height": 60}, null, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/flash-drives.png", "src": "https://smyl.es/wurdp/assets/flash-drives.png", "formatted_filename": "flash drives", "alt_text": "Bunch of Flash Drives", "rendered_width": 45, "rendered_height": 60}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/boxeebox_full.jpg", "src": "https://smyl.es/wurdp/assets/boxeebox_full.jpg", "formatted_filename": "boxeebox full", "alt_text": "D-Link Boxee Box", "rendered_width": 60, "rendered_height": 37}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/g3open-e1350408485159.jpg", "src": "https://smyl.es/wurdp/assets/g3open-e1350408485159.jpg", "formatted_filename": "g open e", "rendered_width": 57, "rendered_height": 60}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/whmdns1-150x150.png", "src": "https://smyl.es/wurdp/assets/whmdns1-150x150.png", "formatted_filename": "whmdns", "rendered_width": 150, "rendered_height": 150}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "http://smyl.es/assets/mxtoolbox_thumb.png", "src": "http://smyl.es/assets/mxtoolbox_thumb.png", "formatted_filename": "mxtoolbox thumb", "alt_text": "mxtoolbox", "rendered_width": 240, "rendered_height": 181}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "http://smyl.es/assets/whmdns_thumb1.png", "src": "http://smyl.es/assets/whmdns_thumb1.png", "formatted_filename": "whmdns thumb", "alt_text": "whmdns", "rendered_width": 260, "rendered_height": 188}, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "http://smyl.es/assets/emailtrace_thumb.png", "src": "http://smyl.es/assets/emailtrace_thumb.png", "formatted_filename": "emailtrace thumb", "alt_text": "emailtrace", "rendered_width": 244, "rendered_height": 140}, null, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/arduinojson-350x150.png", "src": "https://smyl.es/wurdp/assets/arduinojson-350x150.png", "formatted_filename": "arduinojson", "rendered_width": 350, "rendered_height": 150}, null, null, {"document_url": "https://smyl.es/how-to-solve-email-problems-using-exim-and-cpanel-command-line/", "unformatted_src": "https://smyl.es/wurdp/assets/login_form-350x150.png", "src": "https://smyl.es/wurdp/assets/login_form-350x150.png", "formatted_filename": "login form", "alt_text": "WordPress Login Form wp-login.php", "rendered_width": 350, "rendered_height": 150}, null, null]


How to solve email problems using exim and cPanel command line

19 May , 2012 No Comments Standard Post 

The first thing to do is to check your DNS and MX records to make sure they are all setup correctly.  You can use the website http://www.mxtoolbox.com which I have had good results with. Check MX records from MX Toolbox

As you can see in the image to the right, smyl.es is only showing one MX record which is set at 0.  If you were using multiple mail servers you would normally have something similar to the first server using 10, second server using 20, and so on.  Since I’m only using one mail server there is no need for anything higher than 0.  If my mail server was hosted on a server different than the one the website is hosted on the hostname should be the hostname of the mail server.

Check DNS and MX records from WHM Now that we have verified our MX records are correct from another server we need to check inside WHM for cPanel to make sure everything else is correct.  If you found any errors above you can correct them through WHM.  If you’re using exim separately from cPanel you will need to manually edit these records via SSH or use something like webmin.

Inside WHM go to DNS Functions >> Edit DNS Zone
(for just MX DNS Functions >> Edit MX Entry)

As you can see from the image on the left we have verified that the MX record is as it showed from MX toolbox, this is where you can change it if you had the wrong details above.

Make sure you put a trailing period after the domain, view the image on the left to see what I’m talking about.  You should also verify the A record for whatever hostname your using for your MX record is setup correct as well.  You may see a CNAME record for the mail subdomain if you’re using the same server for hosting and email.

Also check to make sure cPanel has "Email Routing for.." set at either Automatically Detect Configuration: Local, or Local Mail Exchanger. If the account is set as Automatically Detect Configuration but does not say Local change it to Local Mail Exchanger.

Email Trace Test from cPanel You can also try running a trace from inside cPanel itself.  Login to the cPanel account that is having email problems and click on the "Email Trace" icon.  This will bring you to a page similar to the image on the right, as you can see the trace shows a success as "virtual_user to local delivery" … you can use this page as another tool in diagnosing the email problem.

Run Exim test via SSH

After checking to make sure DNS and MX settings are setup correctly lets run a test via SSH using Exim and some debug arguments to see if we can find any errors.


As you can see above we’re running exim with the -d and -bt arguments to test email for [email protected]

You can see the full linux man page on Exim here: http://linux.die.net/man/8/exim

-bt is for running exim in address testing mode for recipient address deliverability.

-d is for debug information…you can filter this information but I prefer to output everything to track down the problem.

Due to the amount of debug information that is output I wont post the entire debug information from this example but I did run the test and changed the Y to an I in the email to simulate an error and this is what I found in the debug output:


If you look in the small debug info above we can determine that the problem is in fact a domain problem. Now this will always be different depending on the problem but use this to track it down.

If you’re still having problems you can try some of these commands below:

Add allow_mx_to_ip to Exim configuration

You can add "allow_mx_to_ip = yes" configuration to the /etc/exim.conf file in the off chance that the MX record has an IP set instead of the hostname. This is not recommend by Exim but will allow you to specify an IP in the MX record instead of a hostname. More information: http://www.exim.org/exim-html-3.30/doc/html/spec_11.html#SEC190


The following is specific for cPanel scripts:

Update cPanel User Domains


Update cPanel User Mail Permissions


Guided Mail Troubleshooting


Fix Common Problems and Quotas


Force Exim Update and Default Settings

#DNS #email #Errors #exim #how to check exim mail issues in linux server and cpanel #linux #mxtoolbox #the account or domain may not exist, they may be blacklisted, or > missing the proper dns entries. #undeliverable #virtual_user to local delivery cpanel