{"id":1114,"date":"2014-10-07T16:26:22","date_gmt":"2014-10-07T08:26:22","guid":{"rendered":"https:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=1114"},"modified":"2023-10-31T15:44:50","modified_gmt":"2023-10-31T07:44:50","slug":"%e4%bd%bf%e7%94%a8gmail-smtp%e5%af%84%e4%bf%a1-ssmtp-centos","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1114","title":{"rendered":"\u4f7f\u7528GMail SMTP\u5bc4\u4fe1 &#8211; ssmtp (CentOS)"},"content":{"rendered":"<ol>\n<li>\n<p>yum install ssmtp<\/p>\n<\/li>\n<li>\n<p>vim \/etc\/ssmtp\/ssmtp.conf<br \/>\n<code>root=username@gmail.com<br \/>\nmailhub=smtp.gmail.com:587<br \/>\nRewriteDomain=<br \/>\nHostname=username@gmail.com<br \/>\nUseSTARTTLS=yes<br \/>\nAuthUser=username@gmail.com<br \/>\nAuthPass=password<br \/>\nFromLineOverride=YES<br \/>\nTLS_CA_File=\/etc\/pki\/tls\/certs\/ca-bundle.crt<\/code><\/p>\n<\/li>\n<li>\n<p>alternatives &#8211;config mta<br \/>\n\u9078\u64c7 \/usr\/sbin\/sendmail.ssmtp<\/p>\n<\/li>\n<li>\n<p>\u6aa2\u67e5\u76ee\u524dsendmail\u65b9\u5f0f<br \/>\nsendmail -V<br \/>\nsSMTP 2.61 (Not sendmail at all)<\/p>\n<\/li>\n<li>\n<p>\u6e2c\u8a66<br \/>\necho &#8220;This is a test&#8221; | mail -s &#8220;Test&#8221; cowman.chiang@gmail.com<\/p>\n<\/li>\n<\/ol>\n<p>Reference<br \/>\n1. <a href=\"http:\/\/unix.stackexchange.com\/questions\/109473\/after-updating-ssmtp-to-version-2-61-i-cannot-send-mail-via-gmail\" title=\"After updating sSMTP to version 2.61 I cannot send mail via gmail\" target=\"_blank\" rel=\"noopener noreferrer\">After updating sSMTP to version 2.61 I cannot send mail via gmail<\/a><br \/>\n2. <a href=\"http:\/\/168gg.net\/?p=62\" title=\"How To Setup sSMTP on CentOS 5.9\" target=\"_blank\" rel=\"noopener noreferrer\">How To Setup sSMTP on CentOS 5.9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>yum install ssmtp vim \/etc\/ssmtp\/ssmtp.conf root=username@gmail.com mailhub=smtp.gmail.com:587 RewriteDomain= Hostname=username@gmail.com UseSTARTTLS=yes AuthUser=username@gmail.com AuthPass=password FromLineOverride=YES TLS_CA_File=\/etc\/pki\/tls\/certs\/ca-bundle.crt alternatives &#8211;config mta \u9078\u64c7 \/usr\/sbin\/sendmail.ssmtp \u6aa2\u67e5\u76ee\u524dsendmail\u65b9\u5f0f sendmail -V sSMTP 2.61 (Not sendmail at all) \u6e2c\u8a66 echo &#8220;This is a test&#8221; | mail -s &#8220;Test&#8221; cowman.chiang@gmail.com Reference &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=1114\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[],"class_list":["post-1114","post","type-post","status-publish","format-standard","hentry","category-centos"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1114"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1114\/revisions"}],"predecessor-version":[{"id":2000,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1114\/revisions\/2000"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}