{"id":510,"date":"2015-06-11T10:59:16","date_gmt":"2015-06-11T01:59:16","guid":{"rendered":"https:\/\/jg7sfr.mydns.jp\/?p=510"},"modified":"2016-06-26T12:32:37","modified_gmt":"2016-06-26T03:32:37","slug":"ssmtpsendmail%e3%81%ae%e4%bb%a3%e3%82%8f%e3%82%8a","status":"publish","type":"post","link":"https:\/\/jg7sfr.mydns.jp\/?p=510","title":{"rendered":"sSMTP(sendmail\u306e\u4ee3\u308f\u308a)"},"content":{"rendered":"<p>ssmtp\u306a\u306e\u304bsSMTP\u306a\u306e\u304b\u306f\u3063\u304d\u308a\u3068\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001sendmail\u3067\u82e6\u52b4\u3059\u308b\u306e\u3092\u6b62\u3081\u3001sSMTP\u3092\u4f7f\u3046\u3002\u305d\u3082\u305d\u3082\u3001\/etc\/rc.conf\u3067\u8d77\u52d5\u3055\u305b\u308b\u3079\u304d\u30b5\u30fc\u30d3\u30b9\u304c\u8db3\u308a\u306a\u304b\u3063\u305f\u306e\u3082\u539f\u56e0\u306e\u4e00\u3064\u304b\u3082\u3057\u308c\u306a\u3044\u3068\u5f8c\u3067\u6c17\u4ed8\u304f\u3002<\/p>\n<p>\u5148\u305a\u306fsendmail\u95a2\u9023\u3092\u6b62\u3081\u308b\u3002<br \/>\n# \/etc\/rc.d\/sendmail stop<br \/>\n#vi \/etc\/rc.conf<br \/>\nsendmail_enable=&#8221;NO&#8221;<br \/>\nsendmail_submit_enable=&#8221;NO&#8221;<br \/>\nsendmail_outbound_enable=&#8221;NO&#8221;<br \/>\nsendmail_msp_queue_enable=&#8221;NO&#8221;<\/p>\n<p>sSMTP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# cd \/usr\/ports\/mail\/ssmtp<br \/>\n# make install clean<br \/>\n# make replace<\/p>\n<p>\/etc\/mail\/mailer.conf\u78ba\u8a8d\u3002<br \/>\nreplace\u30b3\u30de\u30f3\u30c9\u3067sendmail\u304b\u3089\u7f6e\u304d\u63db\u3048\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308b\u3002<br \/>\n#sendmail       \/usr\/libexec\/sendmail\/sendmail<br \/>\n#send-mail      \/usr\/libexec\/sendmail\/sendmail<br \/>\n#mailq          \/usr\/libexec\/sendmail\/sendmail<br \/>\n#newaliases     \/usr\/libexec\/sendmail\/sendmail<br \/>\n#hoststat       \/usr\/libexec\/sendmail\/sendmail<br \/>\n#purgestat      \/usr\/libexec\/sendmail\/sendmail<br \/>\nsendmail        \/usr\/local\/sbin\/ssmtp<br \/>\nsend-mail       \/usr\/local\/sbin\/ssmtp<br \/>\nmailq           \/usr\/local\/sbin\/ssmtp<br \/>\nnewaliases      \/usr\/local\/sbin\/ssmtp<br \/>\nhoststat        \/usr\/bin\/true<br \/>\npurgestat       \/usr\/bin\/true<\/p>\n<p>&#8212;&#8212;&#8212;&#8211;\u4ee5\u4e0b\u306f\u30b5\u30f3\u30d7\u30eb\u304b\u3089\u30b3\u30d4\u30fc\u304c\u5fc5\u8981\u306a\u5834\u5408<br \/>\n# cp -pv \/usr\/local\/etc\/ssmtp\/revaliases.sample \/usr\/local\/etc\/ssmtp\/revaliases<br \/>\n\/usr\/local\/etc\/ssmtp\/revaliases.sample -> \/usr\/local\/etc\/ssmtp\/revaliases<br \/>\n# cp -pv \/usr\/local\/etc\/ssmtp\/ssmtp.conf.sample \/usr\/local\/etc\/ssmtp\/ssmtp.conf<br \/>\n\/usr\/local\/etc\/ssmtp\/ssmtp.conf.sample -> \/usr\/local\/etc\/ssmtp\/ssmtp.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\u3053\u3053\u307e\u3067<br \/>\n# vi \/usr\/local\/etc\/ssmtp\/ssmtp.conf<br \/>\nroot=root\u3042\u3066\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<br \/>\nmailhub=smtp.gmail.com:587<br \/>\nrewriteDomain=jg7sfr.mydns.jp<br \/>\nhostname=jg7sfr.mydns.jp<br \/>\nAuthUser=\u30e6\u30fc\u30b6\u30fc\u540d<br \/>\nAuthPass=\u30d1\u30b9\u30ef\u30fc\u30c9<br \/>\nAuthMethod=LOGIN<br \/>\nUseSTARTTLS=YES<br \/>\nUseTLS=YES<\/p>\n<p>root\u306e\u30d5\u30eb\u30cd\u30fc\u30e0\u304c\u300cCharlie &#038;\u300d\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u4fee\u6b63<br \/>\n# chpass root<br \/>\nCharlie &#038;\u306e\u7b87\u6240\u3092\u3001\u4fee\u6b63\u3059\u308b\u3002<\/p>\n<p>root\u3042\u3066\u3001\u9001\u4fe1\u30c6\u30b9\u30c8<br \/>\n# mail -v root<br \/>\nSubject: \u30c6\u30b9\u30c8<br \/>\n\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb<br \/>\nCtrl+D\u307e\u305f\u306f.\u3092\u5165\u529b\u3057enter<br \/>\nEOT<br \/>\n[<-] 220 mx.google.com ESMTP ************* - gsmtp\n[->] EHLO jg7sfr.mydns.jp<br \/>\n[<-] 250 SMTPUTF8\n[->] STARTTLS<br \/>\n[<-] 220 2.0.0 Ready to start TLS\n[->] EHLO jg7sfr.mydns.jp<br \/>\n[<-] 250 SMTPUTF8\n[->] AUTH LOGIN<br \/>\n[<-] 334 *************\n[->] **************<br \/>\n[<-] 334 ****************\n[<-] 235 2.7.0 Accepted\n[->] MAIL FROM:<root@jg7sfr.mydns.jp><br \/>\n[<-] 250 2.1.0 OK ************* - gsmtp\n[->] RCPT TO:<jg7sfr@jarl.com><br \/>\n[<-] 250 2.1.5 OK ************* - gsmtp\n[->] DATA<br \/>\n[<-] 354  Go ahead ************* - gsmtp\n[->] Received: by jg7sfr.mydns.jp (sSMTP sendmail emulation); Thu, 11 Jun 2015 10:50:08 +0900<br \/>\n[->] From: &#8220;root@jg7sfr.mydns.jp&#8221; <root@jg7sfr.mydns.jp><br \/>\n[->] Date: Thu, 11 Jun 2015 10:50:08 +0900<br \/>\n[->] To: root<br \/>\n[->] Subject: \u30c6\u30b9\u30c8<br \/>\n[->]<br \/>\n[->] \u30c6\u30b9\u30c8\u30e1\u30fc\u30eb<br \/>\n[->] .<br \/>\n[<-] 250 2.0.0 OK 1433987412 ************* - gsmtp\n[->] QUIT<br \/>\n[<-] 221 2.0.0 closing ************* - gsmtp\n#\n\nroot\u3042\u3066\u306e\u5916\u90e8\u304b\u3089\u306e\u30e1\u30fc\u30eb\u306f\u30fb\u30fb\u30fb\n\u73fe\u6bb5\u968e\u3067\u306f\u30eb\u30fc\u30bf\u30fc\u306e\u30dd\u30fc\u30c8\u8ee2\u9001\u3067\u9632\u3044\u3067\u3044\u308b\u30fb\u30fb\u30fb\u3068\u601d\u3046\u3002\njg7sfr.mydns.jp\u306b\u306f\u5c4a\u3044\u3066\u3044\u306a\u3044\u3002\n\nYahoo\u3067\u3082\u8a66\u3057\u307e\u3057\u305f\u3002\nYahoo\u306e\u5834\u5408\u3001SMTP\u30a2\u30af\u30bb\u30b9\u306e\u5229\u7528\u958b\u59cb\u30e1\u30fc\u30eb\u304c\u5c4a\u304d\u307e\u3059\u3002\u81ea\u52d5\u3067Yahoo\u30c7\u30ea\u30d0\u30fc\u306b\u767b\u9332\u3055\u308c\u307e\u3059\u3002SMTP-AUTH\u306e\u30ed\u30b0\u30a4\u30f3\u306f\u6210\u529f\u3057\u3066\u3044\u308b\u3088\u3046\u3060\u3051\u308c\u3069\u3082\u3001\u30e1\u30fc\u30eb\u304c\u5c4a\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u540c\u3058\u65b9\u6cd5\u3067gmail\u3067\u306f\u554f\u984c\u306a\u304f\u6b63\u5e38\u52d5\u4f5c\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001gmail\u3092\u5229\u7528\u3059\u308b\u4e8b\u3068\u3057\u307e\u3057\u305f\u3002\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ssmtp\u306a\u306e\u304bsSMTP\u306a\u306e\u304b\u306f\u3063\u304d\u308a\u3068\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001sendmail\u3067\u82e6\u52b4\u3059\u308b\u306e\u3092\u6b62\u3081\u3001sSMTP\u3092\u4f7f\u3046\u3002\u305d\u3082\u305d\u3082\u3001\/etc\/rc.conf\u3067\u8d77\u52d5\u3055\u305b\u308b\u3079\u304d\u30b5\u30fc\u30d3\u30b9\u304c\u8db3\u308a\u306a\u304b\u3063\u305f\u306e\u3082\u539f\u56e0\u306e\u4e00\u3064\u304b\u3082\u3057\u308c\u306a\u3044\u3068\u5f8c\u3067\u6c17&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[4],"tags":[130,129],"class_list":["post-510","post","type-post","status-publish","format-image","hentry","category-bsd","tag-bsd","tag-ssmtp","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=510"}],"version-history":[{"count":4,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/510\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/510\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jg7sfr.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}