{"id":5124,"date":"2017-02-02T17:05:52","date_gmt":"2017-02-02T15:05:52","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=5124"},"modified":"2017-02-02T17:06:41","modified_gmt":"2017-02-02T15:06:41","slug":"postfix-%d0%bf%d1%80%d0%be%d0%b2%d0%b5%d1%80%d0%ba%d0%b0-%d0%bd%d0%b0-%d1%81%d0%bf%d0%b0%d0%bc-%d0%be%d0%bf%d1%80%d0%b5%d0%b4%d0%b5%d0%bb%d1%91%d0%bd%d0%bd%d1%8b%d1%85-%d0%bf%d0%be%d0%bb%d1%83%d1%87","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5124","title":{"rendered":"[postfix] \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u043f\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439"},"content":{"rendered":"<p>\u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430: \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0441\u043f\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432.<\/p>\n<p>\u041e\u0431\u0449\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u0430\u043a\u043e\u0432\u0430: \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0438\u0441\u044c\u043c\u0430 \u0432 <strong>postfix<\/strong>, \u043e\u043d\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0432 \u0444\u0430\u0439\u043b\u0435\u00a0<strong>\/etc\/postfix\/transport_spam<\/strong>, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 &#8211; \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 <strong>spamassassin<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 <strong>master.cf<\/strong>. \u041e\u043d \u0436\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0441\u043f\u0430\u043c \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0435 \u0432 <strong>postfix<\/strong>, \u0430 \u0432 <strong>procmail<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u043c\u044b \u043e\u0442\u0434\u0430\u0451\u0442 \u0435\u0451 <strong>dovecot devivery<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0431\u043e \u0432 <strong>INBOX<\/strong>, \u043b\u0438\u0431\u043e \u0432 <strong>JUNK<\/strong> \u043f\u0430\u043f\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>dovecot-sieve<\/strong> \u0438 \u0442\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d <strong>procmail<\/strong>.<\/p>\n<p><!--more--><\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c: \u0441\u043e\u0437\u0434\u0430\u0451\u043c (\u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c, \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c) \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 <strong>main.cf<\/strong>:<\/p>\n<p><code>transport_maps = \/etc\/postfix\/transport_spam<\/code><\/p>\n<p>\u0424\u0430\u0439\u043b\u00a0<strong>\/etc\/postfix\/transport_spam<\/strong> \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 (<span style=\"color: #ff0000;\"><em>\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e!<\/em><\/span>):<\/p>\n<p><code>&lt;email&gt; \u00a0 \u00a0 &lt;filter&gt;:<\/code><\/p>\n<p>\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u043c:<\/p>\n<p><code>user@domain.com \u00a0 \u00a0spamassassin:<\/code><\/p>\n<p>\u0433\u0434\u0435 <strong>spamassassin<\/strong> &#8211; \u044d\u0442\u043e \u043d\u0430\u0448 \u0444\u0438\u043b\u044c\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u0437\u0436\u0435 \u043e\u043f\u0438\u0448\u0435\u043c \u0432 <strong>master.cf<\/strong>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0445\u0435\u0448:<\/p>\n<p><code># cd \/etc\/postfix &amp;&amp; postmap hash:transport_spam<\/code><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0430\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 <strong>master.cf<\/strong>:<\/p>\n<p><code>spamassassin unix \u00a0- \u00a0 n \u00a0 \u00a0 \u00a0 n \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 pipe flags=FR user=nobody:mail argv=\/usr\/bin\/spamc -d 127.0.0.1 -e \/usr\/bin\/procmail -m from=${sender} to=${recipient} \/etc\/procmailrc<\/code><\/p>\n<p>\u0413\u0434\u0435\u00a0<strong>127.0.0.1<\/strong> \u0430\u0434\u0440\u0435\u0441, \u0433\u0434\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d <strong>spamassassin<\/strong><\/p>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <strong>\/etc\/procmailrc<\/strong><\/p>\n<p><code>SHELL=\"\/bin\/bash\"<br \/>\nSENDMAIL=\"\/usr\/lib\/sendmail -oi -t\"<br \/>\nLOGFILE=\"\/var\/log\/procmail.log\"<br \/>\nDELIVER=\"\/usr\/libexec\/dovecot\/dovecot-lda -f ${from} -d ${to} \"<br \/>\n# fallback:<br \/>\nDEFAULT=\"$HOME\/Maildir\/\"<br \/>\nMAILDIR=\"$HOME\/Maildir\/\"<br \/>\n:0 w<br \/>\n* ^X-Spam-Status: YES<br \/>\n| $DELIVER -m Junk<br \/>\n:0 w<br \/>\n| $DELIVER<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451:<\/p>\n<p><code># postfix reload<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430: \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0441\u043f\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432. \u041e\u0431\u0449\u0430\u044f \u0438\u0434\u0435\u044f \u0442\u0430\u043a\u043e\u0432\u0430: \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0438\u0441\u044c\u043c\u0430 \u0432 postfix, \u043e\u043d\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0432 \u0444\u0430\u0439\u043b\u0435\u00a0\/etc\/postfix\/transport_spam, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 &#8211; \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 spamassassin, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 master.cf. \u041e\u043d \u0436\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0441\u043f\u0430\u043c \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0435 \u0432 postfix, \u0430 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-5124","post","type-post","status-publish","format-standard","hentry","category-mail"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5124"}],"version-history":[{"count":2,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5124\/revisions"}],"predecessor-version":[{"id":5126,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5124\/revisions\/5126"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}