{"id":5862,"date":"2020-10-06T13:12:57","date_gmt":"2020-10-06T07:42:57","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=5862"},"modified":"2020-11-21T19:48:33","modified_gmt":"2020-11-21T14:18:33","slug":"sendmail-configuration-smtp-relay-with-port-587","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/sendmail-configuration-smtp-relay-with-port-587\/","title":{"rendered":"Sendmail Configuration &#8211; SMTP relay with port 587"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Please find the below steps of send mail configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1) Install Sendmail with the below command.<br><span class=\"has-inline-color has-vivid-green-cyan-color\">apt-get install sendmail sendmail-cf<\/span><br>2) Please check for saslauthd service, if it is not there on the server then install it with the below command.<br><span class=\"has-inline-color has-vivid-green-cyan-color\">apt-get install sasl2-bin<\/span><br>3) Go to vim \/etc\/default\/saslauthd and keep \u201cstart=yes\u201d(by default it will be no)<br>4) Set your authorization informations by putting the following line to \/etc\/mail\/authinfo file:<br><span class=\"has-inline-color has-vivid-green-cyan-color\">AuthInfo:abcd.com &#8220;U:abcd@gmail.com&#8221; &#8220;P:1234&#8221; &#8220;M:PLAIN&#8221;<\/span><br>5)Go to vi \/etc\/mail\/sendmail.mc and scroll down to the end of the line and paste the below lines dnl # SMTP Relay setup<br><span class=\"has-inline-color has-vivid-green-cyan-color\">define(`RELAY_MAILER_ARGS&#8217;, `TCP $h 587&#8242;)dnl<br>define(`ESMTP_MAILER_ARGS&#8217;, `TCP $h 587&#8242;)dnl<br>define(`SMART_HOST&#8217;, `mail.irsis.ph&#8217;)dnl<br>define(`confAUTH_MECHANISMS&#8217;, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#8217;)dnl<br>FEATURE(`authinfo&#8217;,`hash \/etc\/mail\/authinfo&#8217;)dnl<\/span><br>6)Update sendmail.cf and access.db files through the below commands<br><span class=\"has-inline-color has-vivid-green-cyan-color\">cd \/etc\/mail<br>m4 sendmail.mc &gt;sendmail.cf   makemap hash authinfo &lt; authinfo  <\/span><br>7) Now restart the send mail service by using the below command. <span class=\"has-inline-color has-vivid-green-cyan-color\">\/etc\/init.d\/sendmail restart<\/span><br>8) Try to send a testmail by using the below command<br><span class=\"has-inline-color has-vivid-green-cyan-color\">echo &#8220;mail&#8221; | mail -s &#8220;Hello&#8221; abcd@gmail.com<\/span><br>9)Wait for some time and check the mail.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Please find the below steps of send mail configuration. 1) Install Sendmail with the below command.apt-get install sendmail sendmail-cf2) Please [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[778,777,776],"class_list":["post-5862","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-external-server","tag-port-587","tag-sendmail-configuration","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1wy","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5862"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5862\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}