{"id":162,"date":"2008-01-24T10:36:34","date_gmt":"2008-01-23T18:36:34","guid":{"rendered":"http:\/\/blog.longwin.com.tw\/?p=162"},"modified":"2008-01-24T10:36:34","modified_gmt":"2008-01-23T18:36:34","slug":"fedora-linux-milter-greylist","status":"publish","type":"post","link":"https:\/\/blog.fhl.net\/?p=162","title":{"rendered":"fedora linux \u4e0a\u5b89\u88dd milter-greylist \u7684\u6b65\u9a5f"},"content":{"rendered":"<p>\nmilter-greylist \u662f\u5229\u7528\u5ee3\u544a\u4fe1\u767c\u4fe1\u7a0b\u5f0f\u70ba\u4e86\u76e1\u91cf\u5feb\u9ede\u767c\u4fe1\uff0c\u6240\u4ee5\u4e0d\u6703\u91cd\u9001\u9019\u500b\u539f\u7406\u4f86\u904b\u4f5c\u7684\u3002\u7576\u4ed6\u4e0d\u78ba\u5b9a\u5c0d\u662f\u5426\u662f\u53ef\u4fe1\u8cf4\u7684\u90f5\u4ef6\u4e3b\u6a5f\u6642\uff0c\u5c31\u8acb\u5c0d\u65b9\u7b49\u4e00\u4e0b\u518d\u9001\uff0c\u6703\u81ea\u52d5\u91cd\u9001\u7684\uff0c\u5c31\u662f\u53ef\u4fe1\u8cf4\u7684\u4e3b\u6a5f\u3002\u6211\u5011\u88dd\u8d77\u4f86\u6e2c\u8a66\u5f8c\uff0c\u679c\u7136\u597d\u7528\u3002\u9019\u500b\u7cfb\u7d71\u8207MailScanner\u4e0d\u76f8\u885d\u7a81\uff0c\u6240\u4ee5\u9817\u6709\u5b89\u88dd\u7684\u50f9\u503c\u3002&nbsp;\n<\/p>\n<p>\n\u672c\u4f86\u5e0c\u671b\u6309\u7167joshua\u63d0\u4f9b\u7684\u65b9\u6cd5\u5b89\u88dd 4.0 \u7248\u7684 milter-greylist\uff0c\u4e0d\u904e\u6211\u5011\u5be6\u5728\u6c92\u6709\u6642\u9593\u4e00\u4e00\u8ffd\u8e64\u65b0\u7248\u672c\u7684\u66f4\u65b0\uff0c\u6240\u4ee5\u6700\u5f8c\u9084\u662f\u5148\u7528 yum search milter-greylist \u627e\u5230\u76f4\u63a5 fedora 7 \u7684 milter-greylist \u5957\u4ef6\u3002\u4ee5\u4e0b\u5c31\u7d00\u9304\u5982\u4f55\u5b89\u88dd\u4e4b\uff1a\n<\/p>\n<p>\n\u8b8a\u8eab\u6210 root&nbsp;\n<\/p>\n<p>\n1.\u5148\u5b89\u88dd\u5957\u4ef6&nbsp; yum install milter-greylist\n<\/p>\n<p>\n2.\u4fee\u6539\u63a7\u5236\u6a94 vi \/etc\/mail\/greylist.conf\n<\/p>\n<p>\n&nbsp; a.\u4fe1\u671b\u611b\u6709\u591a\u53f0MX peer mail server\uff0c\u6240\u4ee5\u8981\u6539\u5e95\u4e0b\u9019\u6bb5\n<\/p>\n<p>\n&nbsp; # MX peering<br \/>\n&nbsp; peer \u4e3b\u6a5fIP1<br \/>\n&nbsp; peer \u4e3b\u6a5fIP2\n<\/p>\n<p>\n&nbsp;b.\u6539\u7db2\u8def\u5340\u6bb5\n<\/p>\n<p>\n&nbsp;list &quot;my network&quot; addr { 127.0.0.1\/8 10.0.0.0\/8 192.0.2.0\/24 }&nbsp;&nbsp;\n<\/p>\n<p>\nc.\u628a grey user \u62ff\u6389\uff0c\u7167\u8aaa\u660e\u66f8\u662f\u8981\u5229\u7528\u9019\u88e1\u6162\u6162\u6e2c\u8a66\uff0c\u4e0d\u904e\u9019\u662f\u5c0f\u6284\uff0c\u5df2\u7d93\u90fd\u6e2c\u8a66\u904e\uff0c\u76f4\u63a5\u8655\u7406\u6389\u5c31\u662f\u4e86\n<\/p>\n<p>\n&nbsp;list &quot;grey users&quot; rcpt {&nbsp; \\<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user1@example.com \\<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user2@example.com \\<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user3@example.com \\<br \/>\n}\n<\/p>\n<p>\nd.\u4fee\u6539\u6700\u5e95\u4e0b\n<\/p>\n<p>\nacl greylist list &quot;grey users&quot; delay 30m autowhite 3d<br \/>\nacl whitelist default\n<\/p>\n<p>\n\u6539\u6210\n<\/p>\n<p>\nacl greylist default&nbsp; delay 5m autowhite 3d<br \/>\n#acl whitelist default<br \/>\n\u610f\u601d\u5c31\u662f\u6240\u6709\u7684\u4fe1\u4ef6\u90fd\u7576\u6210 greylist \uff0c\u8981\u5c0d\u65b9\u5ef6\u9072\u4e94\u5206\u9418\u518d\u9001\uff0c\u5982\u679c\u5c0d\u65b9\u771f\u7684\u807d\u8a71\uff0c\u5c31\u5c07\u4ed6\u653e\u5165\u767d\u540d\u55ae\u4e09\u5929\n<\/p>\n<p>\n&nbsp;3.\u8a2d\u5b9a\u958b\u6a5f\u81ea\u52d5\u555f\u52d5\uff0c\u9806\u4fbf\u6e2c\u8a66\u770b\u770b\uff0c\u6211\u5011\u7684\u4f3a\u670d\u5668\u662f\u8dd1 runlevel 3\n<\/p>\n<p>\n&nbsp;\/sbin\/chkconfig &#8211;level 3 milter-greylist on\n<\/p>\n<p>\n\/etc\/init.d\/milter-greylist start\n<\/p>\n<p>\n4.\u4fee\u6539 sendmail.mc \u4ee5\u4fee\u6539 sendmail.cf (\u8acb\u6ce8\u610f\uff0c\u4f60\u7684sendmail.cf\u5fc5\u9808\u662f\u7531 sendmail.mc\u7522\u751f\u7684\uff0c\u4e0d\u7136\u5c31\u6158\u4e86\uff09\n<\/p>\n<p>\n&nbsp; cd \/etc\/mail<\/p>\n<p>\n&nbsp;&nbsp; \u5728&nbsp; define(`confDEF_USER_ID&#8217;,&#8220;8:12&#8221;)dnl\u4e4b\u524d\u63d2\u5165\n<\/p>\n<p>\n&nbsp; INPUT_MAIL_FILTER(`greylist&#8217;, `S=local:\/var\/run\/milter-greylist\/milter-greylist.sock&#8217;)<br \/>\ndefine(`confMILTER_MACROS_CONNECT&#8217;, `j, {if_addr}&#8217;)<br \/>\ndefine(`confMILTER_MACROS_HELO&#8217;, `{verify}, {cert_subject}&#8217;)<br \/>\ndefine(`confMILTER_MACROS_ENVFROM&#8217;, `i, {auth_authen}&#8217;)<br \/>\ndefine(`confMILTER_MACROS_ENVRCPT&#8217;, `{greylist}&#8217;)\n<\/p>\n<p>\n\u7136\u5f8c m4 sendmail.mc &gt; sendmail.cf&nbsp;\n<\/p>\n<p>\n5.\u91cd\u65b0\u8dd1 sendmail\n<\/p>\n<p>\n&nbsp;\u4ee5\u4fe1\u671b\u611b\u7ad9\u4f86\u8aaa\u662f&nbsp; \/etc\/init.d\/MailScanner restart\n<\/p>\n<p>\n\u4e00\u822c\u53ef\u80fd\u662f \/etc\/init.d\/sendmail restart&nbsp;\n<\/p>\n<p>\n6.\u6aa2\u9a57\u6210\u679c\n<\/p>\n<p>\n&nbsp;&nbsp;&nbsp; \u7576\u7136\uff0c\u6536\u767c\u4fe1\u4ef6\u5fc5\u9808\u5148\u6b63\u5e38\uff0c\u7136\u5f8c\u53ef\u4ee5\u53bb&nbsp; \/var\/lib\/milter-greylist\/db \u6aa2\u67e5 greylist.db \u9019\u500b\u6a94\u6848\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u7070\u540d\u55ae\u662f\u5426\u6b63\u5e38\u904b\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>milter-greylist \u662f\u5229\u7528\u5ee3\u544a\u4fe1\u767c\u4fe1\u7a0b\u5f0f\u70ba\u4e86\u76e1\u91cf\u5feb\u9ede\u767c\u4fe1\uff0c\u6240\u4ee5\u4e0d\u6703\u91cd\u9001\u9019\u500b\u539f\u7406\u4f86\u904b\u4f5c\u7684\u3002\u7576\u4ed6\u4e0d\u78ba\u5b9a &hellip; <a href=\"https:\/\/blog.fhl.net\/?p=162\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">fedora linux \u4e0a\u5b89\u88dd milter-greylist \u7684\u6b65\u9a5f<\/span> <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":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-e"],"_links":{"self":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162"}],"version-history":[{"count":0,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/162\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}