{"id":32,"date":"2011-11-17T22:42:06","date_gmt":"2011-11-17T18:42:06","guid":{"rendered":"http:\/\/blog.mgvmi-hipl.ru\/?p=32"},"modified":"2011-11-17T22:42:06","modified_gmt":"2011-11-17T18:42:06","slug":"postgrey-%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-centos","status":"publish","type":"post","link":"https:\/\/blog.5flor.ru\/?p=32","title":{"rendered":"Postgrey \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CentOS"},"content":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Postgrey \u0432 Centos<\/p>\n<p>Postgrey \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043c\u043e\u043d \u0433\u0440\u0435\u0439\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 CentOS 5.2 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 postfix. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u0440\u0435\u0439\u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u0441\u0430\u0439\u0442\u0443, \u0438\u0431\u043e \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0447\u0442\u043e \u044d\u0442\u043e \u044f \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0439 RPMforge. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441 wiki CentOS<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442 rpmforge \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 uname -i:<\/p>\n<p>#i386<br \/>\nwget http:\/\/apt.sw.be\/redhat\/el5\/en\/i386\/RPMS.dag\/rpmforge-release-0.3.6-1.el5.rf.i386.rpm<br \/>\n#x86_64<br \/>\nwget http:\/\/apt.sw.be\/redhat\/el5\/en\/x86_64\/RPMS.dag\/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u044e\u0447 DAG GPG:<\/p>\n<p>rpm &#8212;import http:\/\/dag.wieers.com\/rpm\/packages\/RPM-GPG-KEY.dag.txt<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043a\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442:<\/p>\n<p>rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442:<\/p>\n<p>rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>yum check-update<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Postgrey \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0435\u0432<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443:<\/p>\n<p>yum install postgrey<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \/etc\/postfix\/main.cf \u0440\u0430\u0437\u0434\u0435\u043b<\/p>\n<p>smtpd_recipient_restrictions =<br \/>\npermit_mynetworks<br \/>\n&#8230;<br \/>\nreject_unauth_destination<br \/>\ncheck_policy_service inet:127.0.0.1:10023<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c postgrey \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430:<\/p>\n<p>\/usr\/sbin\/postgrey &#8212;inet=10023 -d<\/p>\n<p>\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u0442\u0433\u0440\u0435\u0439 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443.<br \/>\n\u0442\u0438\u043f\u0430 OPTIONS=&#187;&#8212;inet=127.0.0.1:10023&#8243; \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0435\u043c<\/p>\n<p>man postgrey<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Postgrey \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f 1.32:<\/p>\n<p>wget http:\/\/postgrey.schweikert.ch\/pub\/postgrey-1.32.tar.gz<\/p>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c:<\/p>\n<p>tar zxvf postgrey-1.30.tar.gz<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:<\/p>\n<p>cd postgrey-1.32<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f postgrey:<\/p>\n<p>useradd postgrey<\/p>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e postgrey \u0448\u0435\u043b\u043b \u043d\u0430 \/sbin\/nologin:<\/p>\n<p>vipw<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e<\/p>\n<p>mkdir \/var\/spool\/postfix\/postgrey<\/p>\n<p>\u0414\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e postgrey \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u044d\u0442\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:<\/p>\n<p>chown postgrey \/var\/spool\/postfix\/postgrey<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0434\u0435\u043c\u043e\u043d\u0430<\/p>\n<p>mv postgrey \/usr\/local\/sbin\/<\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c postfix, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0443 check_policy_service inet:127.0.0.1:10023 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u0435\u043a\u0446\u0438\u0438 smtpd_recipient_restrictions. \u0414\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0438 \u0432\u044b\u0448\u0435 \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<p>vi \/etc\/postfix\/main.cf<br \/>\nsmtpd_recipient_restrictions =<br \/>\npermit_mynetworks<br \/>\n&#8230;<br \/>\nreject_unauth_destination<br \/>\ncheck_policy_service inet:127.0.0.1:10023<\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u0438\u043a\u0438 \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e:<\/p>\n<p>mv postgrey_whitelist_clients \/etc\/postfix<br \/>\nmv postgrey_whitelist_recipients \/etc\/postfix<\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c postgrey:<\/p>\n<p>\/usr\/sbin\/postgrey &#8212;inet=10023 -d<\/p>\n<p>\u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0435\u0441\u043b\u0438 postgrey \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u043f\u0443\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0442\u0430\u043c \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e \u0435\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c 4 \u043f\u0435\u0440\u043b\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 postgrey \u0440\u0443\u043a\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0435\u0432 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f 1.32 \u0432\u044b\u0448\u043b\u0430 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0438 \u044f \u0447\u0442\u043e \u0442\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f \u043d\u0435\u0451.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e \u043c\u0435\u0440 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f man postgrey \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Postgrey \u0432 Centos Postgrey \u044d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043c\u043e\u043d \u0433\u0440\u0435\u0439\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 CentOS 5.2 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 postfix. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u0440\u0435\u0439\u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u0441\u0430\u0439\u0442\u0443, \u0438\u0431\u043e \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e &hellip; <a href=\"https:\/\/blog.5flor.ru\/?p=32\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <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":[5],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-postfix"],"_links":{"self":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/32"}],"collection":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":0,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}