{"id":93,"date":"2014-10-19T05:08:28","date_gmt":"2014-10-18T21:08:28","guid":{"rendered":"http:\/\/www.scriptsmy.com\/?p=93"},"modified":"2023-04-28T09:47:26","modified_gmt":"2023-04-28T09:47:26","slug":"how-to-perfom-smtp-test-command-in-linux","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-perfom-smtp-test-command-in-linux\/","title":{"rendered":"How to Perfom SMTP Test Command in Linux"},"content":{"rendered":"<p>SMTP (Simple Mail Transfer Protocol) is a protocol used for sending email messages between servers. SMTP is widely used by email clients and servers to send and receive email messages. SMTP testing is important to ensure that email servers are properly configured and functioning correctly. In this guide, we will show you how to perform an SMTP test command in Linux.<\/p>\n<h2>Step 1: Install telnet<\/h2>\n<p>The first step is to install telnet if it is not already installed on your Linux system. Telnet is a command-line tool used for connecting to remote servers using the Telnet protocol. To install telnet on Ubuntu\/Debian, run the following command:<\/p>\n<pre>\r\nsudo apt-get install telnet\r\n<\/pre>\n<p>To install telnet on CentOS\/Fedora, run the following command:<\/p>\n<pre>\r\nsudo yum install telnet\r\n<\/pre>\n<h2>Step 2: Connect to SMTP server<\/h2>\n<p>To perform an SMTP test command, we need to connect to the SMTP server using telnet. To connect to the SMTP server, open a terminal and run the following command:<\/p>\n<pre>\r\ntelnet mail.example.com 25\r\n<\/pre>\n<p>Replace &#8220;mail.example.com&#8221; with the hostname or IP address of the SMTP server. &#8220;25&#8221; is the default SMTP port.<\/p>\n<h2>Step 3: Send a test email<\/h2>\n<p>Once you have connected to the SMTP server, you can send a test email by entering the following commands:<\/p>\n<pre>\r\nEHLO example.com\r\nMAIL FROM: &lt;you@example.com&gt;\r\nRCPT TO: &lt;recipient@example.com&gt;\r\nDATA\r\nSubject: Test email\r\nHello,\r\nThis is a test email.\r\n.\r\nQUIT\r\n<\/pre>\n<p>The first command &#8220;EHLO example.com&#8221; identifies the sending host and initiates the SMTP session. Replace &#8220;example.com&#8221; with your domain name.<\/p>\n<p>The second command &#8220;MAIL FROM: <you@example.com>&#8221; specifies the sender&#8217;s email address.<\/p>\n<p>The third command &#8220;RCPT TO: <recipient@example.com>&#8221; specifies the recipient&#8217;s email address.<\/p>\n<p>The fourth command &#8220;DATA&#8221; initiates the data transfer for the message body.<\/p>\n<p>The fifth command is the actual message body. Replace the subject and message with your own.<\/p>\n<p>The sixth command &#8220;.&#8221; indicates the end of the message body.<\/p>\n<p>The seventh command &#8220;QUIT&#8221; terminates the SMTP session.<\/p>\n<h2>Step 4: Check the email inbox<\/h2>\n<p>After sending the test email, check the recipient&#8217;s email inbox to verify that the email was received. If the email was received, the SMTP test command was successful.<\/p>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">telnet<\/span> &#8211; a command-line tool for connecting to remote servers using the Telnet protocol<\/li>\n<\/ul>\n<h2>Conclusion:<\/h2>\n<p>In this guide, we have shown you how to perform an SMTP test command in Linux. SMTP testing is important to ensure that email servers are properly configured and functioning correctly. Remember to replace &#8220;mail.example.com&#8221;, &#8220;you@example.com&#8221;, and &#8220;recipient@example.com&#8221; with the actual values in the commands.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SMTP (Simple Mail Transfer Protocol) is a protocol used for sending email messages between servers. SMTP is widely used by email clients and servers to send and receive email messages&#8230;.<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[996,2065,1028,1100],"tags":[1536,1664,1786],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-linux","category-mail","category-postfix","category-zimbra","tag-linux","tag-postfix","tag-smtp"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}