{"id":57009,"date":"2020-09-03T17:23:32","date_gmt":"2020-09-03T22:23:32","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=57009"},"modified":"2020-09-03T17:23:32","modified_gmt":"2020-09-03T22:23:32","slug":"setting-up-and-troubleshooting-smtp-in-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/setting-up-and-troubleshooting-smtp-in-cpanel\/","title":{"rendered":"Setting Up and Troubleshooting SMTP in cPanel"},"content":{"rendered":"\n
When you host your email on your domain with an SMTP server, you are in control. You can choose an email address to suit your business or personal brand. All the data is stored privately on a server or hosting account only you can access. If you want to move to a different hosting provider, there’s nothing to stop you because you aren’t locked-in to a hosted service.<\/p>\n\n\n\n
So why don’t more people host their own email? It\u2019s often because setting up an email server without help is fiendishly complicated. You have to learn all about SMTP, IMAP, Exim, mail routing, and more. However, if you use cPanel & WHM, you will have the tools you need to quickly set up and connect to email accounts over SMTP. For most cPanel users, sending mail via their server is as simple as creating an email account and configuring their favorite app.<\/p>\n\n\n\n
In this article, we’re going to show you how to do just that. We’ll walk you through the process of setting up an email account and show you how to configure your apps with cPanel’s SMTP settings. We’ll also take a look at some of the most common errors and how to fix them. <\/p>\n\n\n\n
SMTP is the Simple Mail Transfer Protocol, the communication protocol that applications use to send email over the internet to servers. When you hit \u201csend\u201d in your email app\u2014whether it\u2019s Apple Mail\u00ae, MicrosoftOutlook\u00ae, Thunderbird\u00ae, or any other email client\u2014it contacts a server, authenticates, and attempts to deliver the contents of its outbox. The server the app sends mail to is called the outgoing mail server, and the software it connects to is called a mail transfer agent (MTA). <\/p>\n\n\n\n
The MTA on the server takes the messages from the app, puts them in a queue, and then sends them to the recipient\u2019s MTA, which delivers it to their inbox. cPanel has an integrated mail transfer agent called Exim, and, like all MTAs, it uses SMTP to communicate with mail clients and other MTAs. That\u2019s why MTAs are sometimes called SMTP servers. <\/p>\n\n\n\n
For the most part, cPanel users don\u2019t have to configure Exim or worry about SMTP\u2019s intricacies because cPanel takes care of the nitty-gritty details. However, you may have to tweak configuration settings if you or your users experience email errors.<\/p>\n\n\n\n
Before we get to troubleshooting, let\u2019s take a look at the basics of setting up an email account on your server and configuring your email client to send messages to the MTA over SMTP. <\/p>\n\n\n\n
The cPanel SMTP set-up process involves two steps:<\/p>\n\n\n\n
First, let\u2019s create a new email account. In cPanel, navigate to the Email Accounts <\/em>interface, which you will find in the main page menu\u2019s Email<\/em> section. <\/p>\n\n\n\n Click the \u201cCreate\u201d button. <\/p>\n\n\n\n On the next page, select a domain, a username, and a password. Click Create<\/em> at the bottom of the page, and cPanel will generate a new account. <\/p>\n\n\n\n The next job is to configure your client so it knows which server to connect to and how to authenticate. The cPanel SMTP settings you need are available in the Connect Devices<\/em> interface. <\/p>\n\n\n\n On this page, you will find the username and the URL and SMTP port number of the outgoing server. These are the details you will need to give to your app. <\/p>\n\n\n\n We strongly recommend using the more secure SSL\/TLS details rather than the insecure Non-SSL settings.<\/p>\n\n\n\n There are many mail clients out there, but the process of configuring them to send via your server is usually straightforward. For example, here are links to the set-up documentation for Apple Mail on macOS<\/a> and Thunderbird<\/a>. <\/p>\n\n\n\n All being well, you can now send messages from your personalized address via your server. However, email is complicated, and it\u2019s not unusual for misconfiguration to cause authentication or mail delivery issues. <\/p>\n\n\n\n SMTP errors often present themselves as undelivered messages. You try to send an email and get a quick response with an inscrutable error message and a number. In the remainder of this article, we\u2019re going to look at how you or your hosting provider can fix a couple of the most common errors.<\/p>\n\n\n\n Exim limits the number of SMTP connections it allows at the same time to stop the server being overwhelmed, but on a busy server, the default cPanel setting of 100 concurrent connections might be too low. <\/p>\n\n\n\n The limit is controlled by the \u201csmtp_accept_max\u201d directive in Exim\u2019s configuration file. You can change this value in WHM by navigating to the Exim Configuration Manager <\/em>under Service Configuration <\/em>in the sidebar menu. <\/p>\n\n\n\n Select the Advanced Editor <\/em>tab and search for \u201csmtp_accept_max.\u201d Adjust the value upwards, but be aware that too many SMTP connections can cause the mail server to run out of memory and crash. <\/p>\n\n\n\n When your mail client wants to send messages, it has to supply authentication credentials over a secure connection. If anyone could connect and send messages, your server would quickly become a haven for spammers, so the client has to prove that it is a legitimate sender for that account. <\/p>\n\n\n\n You get an Error 550 message when something goes wrong with the authentication process. There are a few potential causes of this error. <\/p>\n\n\n\n Most commonly, Error 550 is caused by either a misconfiguration in the email client or a client so old it doesn\u2019t know how to establish a secure SMTP connection. This is the likely culprit if only one or a handful of users experience the error. <\/p>\n\n\n\n The best way to fix it is to use a modern client with correct authentication details. If that\u2019s not possible, WHM includes a settings tweak to allow SMTP connections from users who have previously authenticated with POP or IMAP, the protocols used to collect messages from the server. <\/p>\n\n\n\n Navigate to the Tweak Settings <\/em>interface, which is under Server Configuration<\/em> in the WHM sidebar menu. Search for \u201cPop-before-SMTP\u201d and activate the tweak. <\/p>\n\n\n\n If someone gets a 550 error when they try to send a message to an account hosted on your server, there is probably something wrong with the domain\u2019s routing configuration. Typically, this is because the domain is configured to use a remote mail exchanger instead of the one on your server. <\/p>\n\n\n\n To make sure emails for the domain use the local mail exchanger, navigate to Edit MX Entry<\/em> in DNS Functions <\/em>in the WHM sidebar menu. Choose the relevant domain and click Edit. <\/em>Verify that Local Mail Exchanger <\/em>is selected. <\/p>\n\n\n\n Another potential cause is misconfigured MX records for the domain. These are the DNS records that indicate where mail for a domain should be delivered. You can use the \u201cdig\u201d command-line tool to check if they point to the right IP address. <\/p>\n\n\n\n In this example, we use dig to see where the MX records for our domain point, and then to verify that the domain name record includes the expected IP address. <\/p>\n\n\n\n We have covered the most common causes of 550 errors, but there are a couple of less likely culprits, which you can read about in our SMTP authentication error troubleshooting tutorial<\/a>. <\/p>\n\n\n\n Email is essential to your brand identity and a vital link to your customers and colleagues. When you host your own email, you are in control of your brand and your data. With cPanel & WHM, setting up and managing a private email account couldn\u2019t be easier. <\/p>\n\n\n\n As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You\u2019ll find us on Discord<\/a>, the cPanel forums<\/a>, and Reddit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" When you host your email on your domain with an SMTP server, you are in control. You can choose an email address to suit your business or personal brand. All the data is stored privately on a server or hosting account only you can access. If you want to move to a different hosting provider, […]<\/p>\n","protected":false},"author":77,"featured_media":65501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[61],"tags":[],"class_list":["post-57009","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-and-tricks"],"acf":[],"yoast_head":"\n<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Troubleshooting Common SMTP Errors in cPanel<\/strong><\/h2>\n\n\n\n
Error 421 – Too Many Concurrent SMTP Connections<\/strong><\/h3>\n\n\n\n
<\/figure>\n\n\n\n
Error 550 – Please Turn on SMTP Authentication in Your Mail Client<\/strong><\/h3>\n\n\n\n
Misconfigured SMTP Client Authentication<\/strong><\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Incorrect Email Routing for the Domain<\/strong><\/h4>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Take Control of Your Email with cPanel<\/strong><\/h2>\n\n\n\n