{"id":3725,"date":"2015-07-02T17:04:03","date_gmt":"2015-07-02T08:04:03","guid":{"rendered":"http:\/\/blog.bitmeister.jp\/?p=3725"},"modified":"2015-07-03T12:01:15","modified_gmt":"2015-07-03T03:01:15","slug":"%e3%82%a8%e3%82%bbsmtp%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc","status":"publish","type":"post","link":"https:\/\/blog.bitmeister.jp\/?p=3725","title":{"rendered":"\u30a8\u30bbSMTP\u30b5\u30fc\u30d0\u30fc"},"content":{"rendered":"<p>\u30e1\u30fc\u30eb\u3092\u81ea\u52d5\u9001\u4fe1\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306e\u30c6\u30b9\u30c8\u3092\u3057\u305f\u3044\u3068\u304b\u3001\u30c9\u30e1\u30a4\u30f3\u8a2d\u5b9a\u3084SSL\u8a2d\u5b9a\u306b\u5fc5\u8981\u306a\u8a8d\u8a3c\u30e1\u30fc\u30eb\u3092\u53d7\u3051\u53d6\u308a\u305f\u3044\u3068\u304b\u3001\u3042\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u3053\u3093\u306a\u3068\u304d\u300c\u5c4a\u3044\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u78ba\u8a8d\u3082\u30e1\u30c3\u30bb\u30fc\u30b8\u8ee2\u9001\u3082\u884c\u308f\u305a\u3001\u3072\u305f\u3059\u3089OK\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8fd4\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5185\u5bb9\u3092\u51fa\u529b\u3059\u308b\u300d\u3068\u3044\u3046\u30a8\u30bbSMTP\u30b5\u30fc\u30d0\u30fc\u304c\u6b32\u3057\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Python\u306b\u4fbf\u5229\u306a\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\n$ sudo python -m smtpd -n -c DebuggingServer 0.0.0.0:25\r\n<\/pre>\n<p>\u305f\u3063\u305f\u3053\u308c\u3060\u3051\u3067\u30a8\u30bbSMTP\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306f\u3053\u3061\u3089\u3002<!--more--><\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\r\nUsage: smtpd.py &#x5B;options] &#x5B;localhost:localport &#x5B;remotehost:remoteport]]\r\n\r\nOptions:\r\n\r\n    --nosetuid\r\n    -n\r\n        This program generally tries to setuid `nobody', unless this flag is\r\n        set.  The setuid call will fail if this program is not run as root (in\r\n        which case, use this flag).\r\n\r\n    --version\r\n    -V\r\n        Print the version number and exit.\r\n\r\n    --class classname\r\n    -c classname\r\n        Use `classname' as the concrete SMTP proxy class.  Uses `PureProxy' by\r\n        default.\r\n\r\n    --debug\r\n    -d\r\n        Turn on debugging prints.\r\n\r\n    --help\r\n    -h\r\n        Print this message and exit.\r\n\r\nVersion: Python SMTP proxy version 0.2\r\n\r\nIf localhost is not given then `localhost' is used, and if localport is not\r\ngiven then 8025 is used.  If remotehost is not given then `localhost' is used,\r\nand if remoteport is not given, then 25 is used.\r\n<\/pre>\n<p><strong>-c classname<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u306f <strong>DebuggingServer<\/strong> \u3060\u3051\u3067\u306a\u304f\u3001\u4ee5\u4e0b\u306e\u30af\u30e9\u30b9\u540d\u3092\u6307\u5b9a\u3057\u3066\u7c21\u6613\u7684\u306aSMTP\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<li>SMTPServer<\/li>\n<li>DebuggingServer<\/li>\n<li>PureProxy<\/li>\n<li>MailmanProxy<\/li>\n<p>Python Documentation: <a href=\"http:\/\/docs.python.jp\/2\/library\/smtpd.html\"> 20.13. smtpd \u2014 SMTP \u30b5\u30fc\u30d0\u30fc<\/a><br \/>\nSource Code: <a href=\"https:\/\/hg.python.org\/cpython\/file\/2.7\/Lib\/smtpd.py\">cpython\/file\/2.7\/Lib\/smtpd.py<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e1\u30fc\u30eb\u3092\u81ea\u52d5\u9001\u4fe1\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306e\u30c6\u30b9\u30c8\u3092\u3057\u305f\u3044\u3068\u304b\u3001\u30c9\u30e1\u30a4\u30f3\u8a2d\u5b9a\u3084SSL\u8a2d\u5b9a\u306b\u5fc5\u8981\u306a\u8a8d\u8a3c\u30e1\u30fc\u30eb\u3092\u53d7\u3051\u53d6\u308a\u305f\u3044\u3068\u304b\u3001\u3042\u308a\u307e\u3059\u3088\u306d\u3002 \u3053\u3093\u306a\u3068\u304d\u300c\u5c4a\u3044\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u78ba\u8a8d\u3082\u30e1\u30c3\u30bb\u30fc\u30b8\u8ee2\u9001\u3082\u884c\u308f\u305a\u3001\u3072\u305f\u3059\u3089OK\u30b9\u30c6\u30fc\u30bf\u30b9 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3725","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3725"}],"version-history":[{"count":14,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3725\/revisions"}],"predecessor-version":[{"id":3739,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3725\/revisions\/3739"}],"wp:attachment":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}