{"id":1241,"date":"2016-05-17T15:34:59","date_gmt":"2016-05-17T06:34:59","guid":{"rendered":"http:\/\/www.kinryo.net\/?p=1241"},"modified":"2023-05-10T17:50:16","modified_gmt":"2023-05-10T08:50:16","slug":"%ef%bc%93%ef%bc%94%ef%bc%9a%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e8%a8%ad%e5%ae%9a%ef%bc%9atargrey%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97spam%e3%82%92%e9%98%b2%e6%ad%a2","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=1241","title":{"rendered":"\uff13\uff14\uff1a\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\uff1atargrey\u3092\u4f7f\u7528\u3057spam\u3092\u9632\u6b62"},"content":{"rendered":"<div class=\"itemBody\">\n<p class=\"itemText\">\u53c2\u8003URL\uff1a<a href=\"http:\/\/www.kinryokai.net\/modules\/news\/article.php?storyid=162\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.kinryokai.net\/modules\/news\/article.php?storyid=162<\/a><br \/>\n<a href=\"http:\/\/centossrv.com\/postfix-targrey.shtml\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/centossrv.com\/postfix-targrey.shtml<\/a><br \/>\n\u73fe\u6642\u70b9\uff082014-06-12)\u3067\u306fpostfix\u3068postgrey\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u53c2\u8003URL\u306e\u524d\u8005\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<p class=\"itemText\"><span style=\"color: #ff6600;\"># <span style=\"color: #008000;\">postconf|grep mail_version<\/span><\/span><br \/>\n<span style=\"color: #ff6600;\">mail_version = 2.6.6<\/span><br \/>\n<span style=\"color: #ff6600;\"># <span style=\"color: #008000;\">postgrey &#8211;version<\/span><\/span><br \/>\n<span style=\"color: #ff6600;\">postgrey 1.34<\/span><\/p>\n<p>\uff12\uff10\uff11\uff14\u5e74\uff19\u6708\uff18\u65e5\u306b\u3084\u3063\u3068\u672c\u904b\u7528\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u4eca\u306e\u6240\u4e0d\u5177\u5408\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4f55\u304b\u3042\u308a\u307e\u3057\u305f\u3089\u3053\u3053\u3067\u767a\u8868\u3057\u307e\u3059\u3002<br \/>\nsleep\u30d1\u30c3\u30c1\u3092\u3042\u3066\u305fpostfix\uff08\u9045\u5ef6\u5fdc\u7b54\u3057\u305f\u3089\u5373\u5ea7\u306bSMTP\u30d7\u30ed\u30bb\u30b9\u3092\u7d42\u4e86\uff09 (rpm)\uff1a<a href=\"https:\/\/www.kinryo.net\/?wpdmpro=sleep%e3%83%91%e3%83%83%e3%83%81%e3%82%92%e3%81%82%e3%81%a6%e3%81%9fpostfix\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3053\u3092\u30af\u30ea\u30c3\u30af<\/a><br \/>\ntargrey\u30d1\u30c3\u30c1\u3092\u3042\u3066\u305fpostgrey (rpm): <a href=\"https:\/\/www.kinryo.net\/?wpdmpro=targrey%e3%83%91%e3%83%83%e3%83%81%e3%82%92%e3%81%82%e3%81%a6%e3%81%9fpostgrey\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3053\u3092\u30af\u30ea\u30c3\u30af<\/a><br \/>\n\u3053\u3053\u304b\u3089\u306f\u3001\u4e0a\u306e\u4e8c\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092root\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u524d\u63d0\u3067\u9032\u3081\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306fpostfix\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">rpm -Uvh &#8211;force \/\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fdirectory\/postfix-2.6.6-2.2.el6_1.x86_64.rpm<\/span><br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u78ba\u8a8d<br \/>\n<span style=\"color: #ff6600;\">#<\/span><span style=\"color: #008000;\"> rpm -qa|grep postfix<\/span><br \/>\n<span style=\"color: #ff6600;\">postfix-2.6.6-2.2.el6_1.x86_64<\/span> \u3068\u8868\u793a\u3055\u308c\u308c\u3070OK<br \/>\n\u6b21\u306bpostgrey\u3067\u3059\u304c\u305d\u306e\u524d\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">yum -y install postgrey &amp;&amp; rpm -e postgrey<\/span><br \/>\n\u300c\u6ce8\uff1a2014-08-02\uff1a\u4eca\u65e5\u30c6\u30b9\u30c8\u3057\u305f\u3089\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u3002\u672c\u6765\u306fEPEL\u306e\u30df\u30e9\u30fc\u306b\u5728\u308b\u7b48\u3060\u304c\u3001\u7121\u304f\u306a\u3063\u3066\u3044\u308b\u307f\u305f\u3044\u3002\u79c1\u306e\u5834\u5408\u306fEPEL\u306e\u30df\u30e9\u30fc\u306fftp,iij.ad.jp\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u3053\u3053\u306b\u306f\u7121\u304f\u306a\u3063\u3066\u3044\u308b\u3002\u8a66\u3057\u306bftp,riken.jp\u3082\u30c1\u30a7\u30c3\u30af\u3057\u305f\u304c\u3084\u306f\u308a\u7121\u3044\u3002\u3067\u3082\u672c\u5bb6\u306ehttp:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/repoview\/postgrey.html\u306b\u306f\u7f6e\u3044\u3066\u3042\u308b\u3002\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u3093\u3060\uff01\uff01\u3068\u3082\u304b\u304f\u3053\u308c\u306f\u4ed8\u968f\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u306a\u306e\u3067\u3001\u7121\u8996\u3057\u3066\u76f4\u63a5\u6b21\u306b\u9032\u3093\u3067\u3082\u3088\u3044\u3002\u4f46\u3057\u74b0\u5883\u306b\u3088\u3063\u3066\u306f\u3001\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u308d\u3068\u8a00\u308f\u308c\u308b\u304b\u3082\uff1f\u5fc5\u8981\u306a\u306e\u306f\u8272\u3005\u306a\u4e0b\u8a18\u306eperl\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3069\u300d<br \/>\n\u3053\u308c\u306f perl-BerkeleyDB perl-IO-Multiplex perl-Net-DNS perl-Net-Server \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081<br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> wget apt.sw.be\/redhat\/el6\/en\/i386\/rpmforge\/RPMS\/perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rpm -ivh perl-Parse-Syslog-1.10-1.el6.rf.noarch.rpm<\/span><br \/>\n<span style=\"color: #000000;\"> \u3067postgrey\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rpm -Uvh \/\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fdirectory\/postgrey-1.34-1.rf.noarch.rpm<\/span><br \/>\n\/etc\/postfix\/main.cf\u306e\u8a2d\u5b9a<\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">smtpd_recipient_restrictions = \r\n    permit_mynetworks,\r\n    permit_sasl_authenticated,\r\n    permit_auth_destination,\r\n    reject_unauth_destination,\r\n<span style=\"color: #000000;\">\uff0d\uff0d\u8ffd\u52a0(\u3053\u3053\u304b\u3089)\uff0d\uff0d<\/span>\r\n    check_recipient_access hash:$config_directory\/whitelist_recipient\r\n    check_client_access    hash:$config_directory\/whitelist_client\r\n    check_client_access    regexp:$config_directory\/permit_client_nots25r\r\n    check_policy_service   inet:60000\r\n    permit\r\n\r\nsmtpd_data_restrictions =\r\n    permit_mynetworks\r\n    permit_sasl_authenticated\r\n    reject_unauth_destination\r\n    check_recipient_access hash:$config_directory\/whitelist_recipient\r\n    check_client_access    hash:$config_directory\/whitelist_client\r\n    check_client_access    regexp:$config_directory\/permit_client_nots25r\r\n    check_policy_service   inet:60000\r\n    permit<\/span>\r\n<span style=\"color: #000000;\">\uff0d\uff0d\u8ffd\u52a0(\u3053\u3053\u307e\u3067)\uff0d\uff0d<\/span><\/code><\/pre>\n<\/div>\n<p>taRgrey\u7528Postfix\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">wget <a style=\"color: #008000;\" href=\"http:\/\/k2net.hakuba.jp\/spam\/postfix.conf.2.tar.gz\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/k2net.hakuba.jp\/spam\/postfix.conf.2.tar.gz<\/a><\/span><br \/>\n\u89e3\u51cd<br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> tar zxvf postfix.conf.2.tar.gz<\/span><br \/>\n<span style=\"color: #000000;\"> \u5404\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> cp postfix.conf.2\/whitelist_recipient \/etc\/postfix\/<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> cp postfix.conf.2\/whitelist_client \/etc\/postfix\/<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> cp postfix.conf.2\/permit_client_nots25r \/etc\/postfix\/<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rm -fr postfix.conf.2\/<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rm -f postfix.conf.2.tar.gz<\/span><br \/>\n<span style=\"color: #000000;\"> whitelist_recipient\u306eDB\u5316<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> postmap \/etc\/postfix\/whitelist_recipient<\/span><br \/>\n<span style=\"color: #000000;\"> whitelist_client\u306eDB\u5316<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> postmap \/etc\/postfix\/whitelist_client<\/span><br \/>\n\/etc\/rc.d\/init.d\/postgrey\u306e\u8a2d\u5b9a<\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">#OPTIONS=\"--unix=$SOCKET\"\u3000\u2190\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\nOPTIONS=\"--dbdir=$DBPATH --inet=127.0.0.1:60000 --tarpit=125 --targrey --retry-count=2 --delay=3600\"<\/span>\u3000\u2190\u8ffd\u8a18<\/code><\/pre>\n<\/div>\n<p>postgrey\u306e\u8d77\u52d5\u3001postfix\u518d\u8d77\u52d5\u306a\u3069<br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\">#<\/span> service postgrey start<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> chkconfig postgrey on<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> service postfix restart<\/span><br \/>\n\u305d\u306e\u5f8c\u30e1\u30fc\u30eb\u306e\u30c6\u30b9\u30c8\u3092\u3059\u308b<br \/>\npostfix\u306b\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u3066\u3044\u308b\u305f\u3081\u3001\u81ea\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u7121\u52b9\u306b\u3059\u308b\u3002<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">yum -y install yum-versionlock<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> sed -i &#8216;s\/enabled = 0\/enabled = 1\/g&#8217; \/etc\/yum\/pluginconf.d\/versionlock.conf<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> touch \/etc\/yum\/pluginconf.d\/versionlock.list<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rpm -q postfix &gt;&gt; \/etc\/yum\/pluginconf.d\/versionlock.list<\/span><br \/>\n<span style=\"color: #008000;\"><span style=\"color: #ff6600;\"> #<\/span> rpm -q postgrey &gt;&gt; \/etc\/yum\/pluginconf.d\/versionlock.list<\/span><br \/>\npostfix\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u3042\u3063\u305f\u3089\u30e1\u30fc\u30eb\u3067\u77e5\u3089\u305b\u3066\u304f\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f5c\u6210\u3002\u3082\u3063\u3068\u3082\u30bd\u30fc\u30b9\u3082\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3051\u3070\u51fa\u6765\u306a\u3044\u304c<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/cron.daily\/yum-check-update<\/span><\/p>\n<div class=\"xoopsCode\">\n<pre><code><span style=\"color: #0000ff;\">#!\/bin\/bash\r\n\r\n# versionlock\u30d1\u30c3\u30b1\u30fc\u30b8\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u30c1\u30a7\u30c3\u30af\u30b9\u30af\u30ea\u30d7\u30c8\r\n\r\nYUMTMP=$(mktemp)\r\nfor pkg in `cat \/etc\/yum\/pluginconf.d\/versionlock.list`\r\ndo\r\n    chkname=\"$chkname `rpm -qi $pkg|grep Name|awk '{print $3}'`\"\r\ndone\r\nyum --noplugins check-update $chkname &gt; $YUMTMP\r\n[ $? -eq 100 ] &amp;&amp; cat $YUMTMP<\/span>\r\n<span style=\"color: #0000ff;\">rm -f $YUMTMP<\/span><\/code><\/pre>\n<\/div>\n<p><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">chmod +x \/etc\/cron.daily\/yum-check-update<\/span><br \/>\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u691c\u77e5\u6642\u306froot\u5b9b\u306b\u30e1\u30fc\u30eb\u901a\u77e5\u3055\u308c\u308b\u306e\u3067\u3001\u6700\u65b0\u7248\u3067\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<\/div>\n<div class=\"itemFoot\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003URL\uff1ahttp:\/\/www.kinryokai.net\/modules\/news\/article.php?storyid=162 http:\/\/centossrv.com\/postfix-targrey.shtml &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=1241\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-1241","post","type-post","status-publish","format-standard","hentry","category-server"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1241"}],"version-history":[{"count":11,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1241\/revisions"}],"predecessor-version":[{"id":3324,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/1241\/revisions\/3324"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}