{"id":255678,"date":"2016-11-01T13:41:58","date_gmt":"2016-11-01T05:41:58","guid":{"rendered":"http:\/\/blog.zhenglei.net\/?p=255678"},"modified":"2016-11-01T17:00:19","modified_gmt":"2016-11-01T09:00:19","slug":"godaddy-email-config","status":"publish","type":"post","link":"https:\/\/blog.zhenglei.net\/?p=255678","title":{"rendered":"Config Godaddy Smtp Realy"},"content":{"rendered":"<h1><span style=\"color: #ff0000\">Config 3rd (Godaddy)\u00a0 SMTP server as the relay of your smtp server<\/span><\/h1>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #800000\">Godaddy<\/span>:<\/p>\n<p><span style=\"color: #0000ff\"><strong><span id=\"componentServerSettingsMXError\" class=\"error\">MX records<\/span>:<\/strong><\/span><\/p>\n<table id=\"componentServerSettingsCorrect\" class=\"settings-table\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>0<\/td>\n<td>smtp.secureserver.net<\/td>\n<\/tr>\n<tr class=\"odd\">\n<td>10<\/td>\n<td>mailstore1.secureserver.net<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h1><span style=\"color: #0000ff\">Host Names (CNAME)<\/span><\/h1>\n<table id=\"componentServerSettingsHosts\" class=\"settings-table\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>POP<\/td>\n<td>pop.secureserver.net<\/td>\n<\/tr>\n<tr class=\"odd\">\n<td>IMAP<\/td>\n<td>imap.secureserver.net<\/td>\n<\/tr>\n<tr>\n<td>SMTP<\/td>\n<td>smtpout.secureserver.net<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"color: #0000ff\">Port:<\/span><\/strong><\/p>\n<ul>\n<li><strong>Without SSL<\/strong>\n<ul>\n<li>Incoming Port\n<dl>\n<dt><\/dt>\n<dd>IMAP &#8211; <strong>143<\/strong><br \/>\nPOP &#8211; <strong>110<\/strong><\/dd>\n<\/dl>\n<\/li>\n<li>Outgoing (SMTP) port\n<dl>\n<dt><\/dt>\n<dd>One of the following: <strong>25, <span style=\"color: #333300\">80<\/span>, 3535<\/strong><\/dd>\n<\/dl>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>With SSL<\/strong>\n<ul>\n<li>Incoming Port\n<dl>\n<dt><\/dt>\n<dd>IMAP &#8211; <strong>993<\/strong><br \/>\nPOP &#8211; <strong>995<\/strong><\/dd>\n<\/dl>\n<\/li>\n<li>Outgoing (SMTP) port\n<dl>\n<dt><\/dt>\n<dd><strong>465<\/strong><\/dd>\n<\/dl>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"step-1-\u2014-install-postfix\"><span style=\"color: #0000ff\">Install Postfix<\/span><\/h2>\n<pre class=\"code-pre \">sudo apt-get install mailutils<\/pre>\n<pre class=\"code-pre \">sudo apt-get install postfix<\/pre>\n<h2><\/h2>\n<h2 id=\"step-1-\u2014-install-postfix\"><span style=\"color: #0000ff\">Config Postfix<\/span><\/h2>\n<pre class=\"code-pre \">sudo nano \/etc\/postfix\/main.cf<\/pre>\n<h2><\/h2>\n<h2 id=\"step-3-\u2014-test-that-the-smtp-server-can-send-emails\"><span style=\"color: #0000ff\">Test Postfix SMTP Server Can Send Email<\/span><\/h2>\n<pre class=\"code-pre \"><code>echo \"This is the body of the email\" | \r\nmail -s \"This is the subject line\" xxx@gmail.com<\/code><\/pre>\n<h2><\/h2>\n<h2 id=\"step-3-\u2014-test-that-the-smtp-server-can-send-emails\"><span style=\"color: #0000ff\">Forward System Mail via the Postfix SMTP Server<br \/>\n<\/span><\/h2>\n<pre class=\"code-pre \"><code><strong>cat \/etc\/aliases<\/strong>\r\n\r\n# \/etc\/aliases\r\nmailer-daemon: postmaster\r\npostmaster: root\r\nnobody: root\r\nhostmaster: root\r\nusenet: root\r\nnews: root\r\nwebmaster: root\r\nwww: root\r\nftp: root\r\nabuse: root\r\nnoc: root\r\nsecurity: root\r\n<span style=\"color: #ff0000\">root:  account@yourdomain\r\n<\/span><\/code><\/pre>\n<h2><\/h2>\n<h2 id=\"step-3-\u2014-test-that-the-smtp-server-can-send-emails\"><span style=\"color: #0000ff\">Send\u00a0 Mail via external (Godaddy<\/span>) <span style=\"color: #0000ff\">smtp server<\/span><\/h2>\n<h2><\/h2>\n<h2 id=\"configuring-smtp-usernames-and-passwords\">Configuring\u00a0 Usernames and Passwords<\/h2>\n<pre>sudo nano    \/etc\/postfix\/sasl\/passwd\r\n<span style=\"color: #ff0000\">[smtpout.secureserver.net]<\/span>:<span style=\"color: #333300\">80<\/span> <span style=\"color: #003366\">account@yourdomain<\/span>:passwd<\/pre>\n<pre>sudo postmap \/etc\/postfix\/sasl\/passwd<\/pre>\n<h2><\/h2>\n<h2 id=\"configuring-the-relay-server\">Configuring Relay<\/h2>\n<pre>sudo nano    \/etc\/postfix\/main.cf\r\n\r\n<\/pre>\n<pre># specify SMTP relay host \r\nrelayhost = <span style=\"color: #ff0000\">[smtpout.secureserver.net]:80\r\n\r\n<\/span><\/pre>\n<h2 id=\"configuring-the-relay-server\">At the end of the file, add the following parameters to enable authentication:<\/h2>\n<p>cat \/etc\/postfix\/main.cf<\/p>\n<pre>smtp_sasl_auth_enable = yes\r\nsmtp_sasl_security_options = noanonymous\r\nsmtp_sasl_password_maps = hash:\/etc\/postfix\/sasl\/passwd\r\n<\/pre>\n<h2 id=\"step-3-\u2014-test-that-the-smtp-server-can-send-emails\"><span style=\"color: #0000ff\">Test Postfix SMTP Relay<br \/>\n<\/span><\/h2>\n<pre class=\"code-pre \"><code>echo \"email via godaddy smtp\" | \r\nmail -s \"smtp relay\" \"From: <span style=\"color: #003366\">account@yourdomain<\/span>\" xxx@dest\r\n\r\n<\/code><\/pre>\n<h2 id=\"step-3-\u2014-test-that-the-smtp-server-can-send-emails\"><span style=\"color: #0000ff\">Config email\u00a0 alias From header in Postfix<br \/>\n<\/span><\/h2>\n<p><strong>\u00a0Add the line into \/etc\/postfix\/main.cf<\/strong><\/p>\n<pre>smtp_generic_maps = hash:\/etc\/postfix\/generic<\/pre>\n<p><strong>cat \/etc\/postfix\/generic<\/strong><\/p>\n<p><em>other-email\u00a0 account@yourdomain<\/em><\/p>\n<p><strong>sudo postmap \/etc\/postfix\/generic<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Config 3rd (Godaddy)\u00a0 SMTP server as the &hellip; <a href=\"https:\/\/blog.zhenglei.net\/?p=255678\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193,6,4],"tags":[339,67],"class_list":["post-255678","post","type-post","status-publish","format-standard","hentry","category-cloud-2","category-internet","category-lfs","tag-email","tag-godaddy"],"_links":{"self":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=255678"}],"version-history":[{"count":11,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255678\/revisions"}],"predecessor-version":[{"id":255689,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255678\/revisions\/255689"}],"wp:attachment":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=255678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=255678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=255678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}