{"id":2331,"date":"2018-11-02T22:18:01","date_gmt":"2018-11-02T13:18:01","guid":{"rendered":"https:\/\/uda2.com\/blog\/?p=2331"},"modified":"2023-07-07T16:06:14","modified_gmt":"2023-07-07T07:06:14","slug":"raspberry-pi-camera2","status":"publish","type":"post","link":"https:\/\/uda2.com\/blog\/raspberry-pi-camera2\/","title":{"rendered":"Raspberry Pi\u3067\u76e3\u8996\u30ab\u30e1\u30e92 \u30e1\u30fc\u30eb\u6e96\u5099\u7de8"},"content":{"rendered":"<p>\u6b21\u306b\u64ae\u5f71\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u70ba\u5fc5\u8981\u306a\u30bd\u30d5\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n\u30e1\u30fc\u30eb\u9001\u4fe1\u30bd\u30d5\u30c8\u306f\u65e2\u306b\u5165\u308c\u3066\u308b\u65b9\u3084\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u5fc5\u8981\u304c\u7121\u3051\u308c\u3070\u30b9\u30eb\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<!--more--><br \/>\n\u307e\u305a\u306f\u30e1\u30fc\u30eb\u9001\u4fe1\u30bd\u30d5\u30c8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<strong>$ sudo apt-get install ssmtp<\/strong><br \/>\n\u30e1\u30fc\u30eb\u30bd\u30d5\u30c8\u306e\u8a2d\u5b9a\uff08Gmail\u306e\u5834\u5408\u3067\u3059\u306e\u3067\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\uff5e@gmail.com\u3068\u3044\u3046\u30a2\u30c9\u30ec\u30b9\u306b\u306a\u308a\u307e\u3059\uff09<br \/>\n<strong>$ sudo vi \/etc\/ssmtp\/ssmtp.conf<\/strong><\/p>\n<pre><code>root=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\nmailhub=smtp.gmail.com:587\n#hostname=raspberrypi\nAuthUser=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\nAuthPass=\u30d1\u30b9\u30ef\u30fc\u30c9\nFromLineOverride=YES\nUseSTARTTLS=YES\nUseTLS=YES<\/code><\/pre>\n<p>\u6b21\u306b\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u30c6\u30b9\u30c8\u306e\u7528\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\uff08\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u30fc\u3082\u542b\u307f\u307e\u3059\uff09<br \/>\n<strong>$ vi testmail.txt<\/strong><\/p>\n<pre><code>to:\u9001\u4fe1\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\nsubject:\u30c6\u30b9\u30c8\n\n\u672c\u6587\u3067\u3059\u3002<\/code><\/pre>\n<p>\u9001\u4fe1\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n<strong>$ mail -t &lt; testmail.txt<\/strong><br \/>\n\u554f\u984c\u7121\u3051\u308c\u3070\u30c6\u30ad\u30b9\u30c8\u306f\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\n<strong>$ rm testmail.txt<\/strong><br \/>\n\u79c1\u306fGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u306b2\u6bb5\u968e\u8a8d\u8a3c\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u306e\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u306f<a href=\"https:\/\/support.google.com\/mail\/answer\/185833?hl=ja\" target=\"_blank\" rel=\"noopener\">\u30a2\u30d7\u30ea\u30d1\u30b9\u30ef\u30fc\u30c9<\/a>\u3068\u3044\u3046\u5c02\u7528\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u6dfb\u4ed8\u30e1\u30fc\u30eb\u3092\u7c21\u5358\u306b\u9001\u308b\u70ba\u306e\u30bd\u30d5\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<strong>$ sudo apt-get install mailutils<\/strong><br \/>\n<strong>$ sudo apt-get install mutt<\/strong><br \/>\n\u307e\u305a\u30e1\u30fc\u30eb\u306e\u672c\u6587\u3092\u9069\u5f53\u306b\u66f8\u3044\u3066\u4fdd\u5b58\u3057\u3066\u304a\u304d\u307e\u3059\u3002\uff08\u3053\u3061\u3089\u306f\u672c\u6587\u306e\u307f\u3067\u3059\uff09<br \/>\n<strong>$ vi \/var\/motion_setting\/message.txt<\/strong><\/p>\n<pre><code>\u691c\u77e5\u3057\u307e\u3057\u305f<\/code><\/pre>\n<p>\u5148\u307b\u3069\u8a66\u3057\u64ae\u308a\u3057\u305f\u753b\u50cf\u3092\u9001\u3063\u3066\u307f\u308b\u3002<br \/>\n<strong>$ mutt -s &#8220;test&#8221; &#8220;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9&#8221; -a &#8220;image.jpg&#8221; &lt; &#8220;\/var\/motion_setting\/message.txt&#8221;<\/strong><br \/>\n\u3046\u3061\u3067\u306f\u300cGPGME: CMS \u30d7\u30ed\u30c8\u30b3\u30eb\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u300d\u3068\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u306e\u3067gpgsm\u3068\u3084\u3089\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<br \/>\n<strong>$ sudo apt-get install gpgsm<\/strong><br \/>\n\u518d\u5ea6\u6311\u6226\u3059\u308b\u3068\u3061\u3083\u3093\u3068\u5c4a\u304d\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b21\u306b\u64ae\u5f71\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u70ba\u5fc5\u8981\u306a\u30bd\u30d5\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002 \u30e1\u30fc\u30eb\u9001\u4fe1\u30bd\u30d5\u30c8\u306f\u65e2\u306b\u5165\u308c\u3066\u308b\u65b9\u3084\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u5fc5\u8981\u304c\u7121\u3051\u308c\u3070\u30b9\u30eb\u30fc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"author":2,"featured_media":2322,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[206],"tags":[327,350],"class_list":["post-2331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-diary","tag-raspberry-pi","tag-350"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/posts\/2331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/comments?post=2331"}],"version-history":[{"count":4,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/posts\/2331\/revisions"}],"predecessor-version":[{"id":2623,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/posts\/2331\/revisions\/2623"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/media\/2322"}],"wp:attachment":[{"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/media?parent=2331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/categories?post=2331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uda2.com\/blog\/wp-json\/wp\/v2\/tags?post=2331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}