{"id":294725,"date":"2019-11-17T15:02:02","date_gmt":"2019-11-17T15:02:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=294725"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=294725","title":{"rendered":"postfix+dovecot+mysql \u0432 FreeBSD"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0445\u043e\u0442\u0435\u043b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e, \u043d\u043e \u0440\u0443\u043a\u0438 \u0434\u043e\u0448\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0434\u0430 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043c\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e postfix, dovecot, mysql, postfixadmin, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438 \u043e spamassassin, clamav-milter(\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f clamav \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432), postgrey, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u043f\u0430\u043c\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \u00ab\u0421\u043f\u0430\u043c\u00bb(dovecot-pigeonhole).<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b (postfix, dovecot \u0438 dovecot-pigeonhole \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u043f\u043e\u0440\u0442\u043e\u0432, dovecot-sieve \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043d\u043e \u0432 \u043f\u043e\u0440\u0442\u0430\u0445 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u044b\u0435 \u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c dovecot \u0441 dovecot-sieve). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<pre><code class=\"plaintext\">pkg install apache24 php73 mod_php73 php73-extensions php73-mysqli php73-mbstring php73-openssl clamav-milter postgrey spamassassin mysql57-server openssl wget <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"plaintext\">#postfix \u0438 dovecot \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0437\u0436\u0435 sysrc postfix_enable=\"YES\" sysrc dovecot_enable=\"YES\"  sysrc mysql_enable=\"YES\" sysrc apache24_enable=\"YES\"  sysrc spamd_flags=\"-u spamd -H \/var\/spool\/spamd\" sysrc spamd_enable=\"YES\"  sysrc postgrey_enable=\"YES\"  sysrc clamav_clamd_enable=\"YES\" sysrc clamav_milter_enable=\"YES\" sysrc clamav_freshclam_enable=\"YES\" #freshclam \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u043b\u0443\u0436\u0431\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f 12 \u0440\u0430\u0437 sysrc clamav_freshclam_flags=\"--daemon --checks=12\" <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code class=\"plaintext\">service apache24 start service mysql-server start #\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c spamassassin \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u044b \u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 sa-update sa-compile service sa-spamd start #\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437 clamav \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c freshclam service clamav-clamd start service clamav-freshclam start service clamav-milter start #\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c postgrey \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438(\/usr\/local\/etc\/rc.d\/postgrey), \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438\u0441\u044c \u0432 \"\u0431\u0435\u043b\u044b\u0439\" \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u043b\u0435 4-\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0438\u0441\u0435\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 : ${postgrey_flags:=--inet=10023} \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0451 \u043a \u0432\u0438\u0434\u0443: : ${postgrey_flags:=--inet=10023 --auto-whitelist-clients=4} service postgrey start <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 httpd.conf \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b php \u0432 apache \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b postfixadmin:<\/p>\n<pre><code class=\"plaintext\">&lt;FilesMatch \"\\.php$\"&gt;     SetHandler application\/x-httpd-php &lt;\/FilesMatch&gt; &lt;FilesMatch \"\\.phps$\"&gt;     SetHandler application\/x-httpd-php-source &lt;\/FilesMatch&gt;  &lt;IfModule dir_module&gt;     DirectoryIndex index.php &lt;\/IfModule&gt;  #\u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b postfixadmin  DocumentRoot \"\/usr\/local\/www\/apache24\/data\/postfixadmin-3.2\/public\" <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c postfixadmin<\/p>\n<pre><code class=\"plaintext\">cd \/usr\/local\/www\/apache24\/data <\/code><\/pre>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0435\u043c postfixadmin (\u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 3.2)<\/p>\n<pre><code class=\"plaintext\">wget --no-check-certificate https:\/\/sourceforge.net\/projects\/postfixadmin\/files\/postfixadmin\/postfixadmin-3.2\/postfixadmin-3.2.tar.gz <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430:<\/p>\n<pre><code class=\"plaintext\">gzip -d postfixadmin-3.2.tar.gz tar -xvf postfixadmin-3.2.tar chown -R www:www \/usr\/local\/www\/apache24\/data service apache24 restart <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f postfixadmin, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 mysql-secure-installation(\u0442\u043e\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0432 mysql \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 alter user), \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 mysql, \u0434\u0430\u043b\u0435\u0435 \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 mysql, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u043d\u0435\u0451:<\/p>\n<pre><code class=\"plaintext\">mysql -p -r alter user 'root'@'localhost' identified by 'password123'; create database postfix; grant all privileges on postfix.* to 'postfix'@'localhost' identified by 'password123'; exit <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b config.inc.php, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/usr\/local\/www\/apache24\/data\/postfixadmin-3.2\/, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0438\u0445 \u043a \u0432\u0438\u0434\u0443, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 apache, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 templates_c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/usr\/local\/www\/apache24\/data\/postfixadmin-3.2 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 www:<\/p>\n<pre><code class=\"plaintext\">mkdir \/usr\/local\/www\/apache24\/data\/postfixadmin-3.2\/templates_c chown -R www:www \/usr\/local\/www\/apache24\/data\/postfixadmin-3.2\/templates_c  $CONF['configured'] = true #\u0434\u0430\u043d\u043d\u044b\u0439 \u0445\u044d\u0448 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u044d\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 postfixadmin \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. $CONF['setup_password'] = 'dd28fb2139a3bca426f02f60e6877fd5:13d2703c477b0ab85858e3ac5e076a0a7a477315'; $CONF['default_language'] = 'ru' $CONF['database_type'] = 'mysqli'; $CONF['database_host'] = 'localhost'; $CONF['database_user'] = 'postfix'; #\u041f\u0430\u0440\u043e\u043b\u044c \u0438 \u0438\u043c\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u043b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 $CONF['database_password'] = 'password123'; $CONF['database_name'] = 'postfix';  service apache24 restart <\/code><\/pre>\n<p>  <\/p>\n<h4>SSL<\/h4>\n<p>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 postfix.org, \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \/etc\/ssl \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"plaintext\">cd \/etc\/ssl \/usr\/local\/openssl\/misc\/CA.pl -newca <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u043c\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u043d\u0435 \u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0435, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter, \u0434\u0430\u043b\u0435\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447(\u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f) \u0438 \u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430(Organizational Unit Name (eg, section) [] \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435):<\/p>\n<pre><code class=\"plaintext\">openssl req -new -newkey rsa:4096 -nodes -keyout foo-key.pem -out foo-req.pem <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043f\u0438\u0448\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043d\u0435\u0439 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e):<\/p>\n<pre><code class=\"plaintext\">openssl ca -out foo-cert.pem -days 365 -infiles foo-req.pem <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0438\u0445 \u0432 \u0442\u043e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0412\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u0435\u043d, \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u0438\u00bb postfix \u0438 dovecote \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<h4>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c vmail<\/h4>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 postfix, dovecot \u0438 dovecot-pigeonhole, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u0443(\u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438) vmail, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0442\u0430. <\/p>\n<pre><code class=\"plaintext\">pw useradd -n vmail -s \/usr\/sbin\/nologin -u 1000 -d \/var\/vmail <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u044b \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f vmail:<\/p>\n<pre><code class=\"plaintext\">mkdir \/var\/vmail chown -R vmail:vmail \/var\/vmail chmod -R 744 \/var\/vmail <\/code><\/pre>\n<p>  <\/p>\n<h2>Postfix, dovecot, dovecot-pigeonhole<\/h2>\n<p>  \u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0440\u0430\u043d\u0435\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043c \u0438\u0437 \u043f\u043e\u0440\u0442\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043f\u043e\u0440\u0442\u043e\u0432:<\/p>\n<pre><code class=\"plaintext\">portsnap fetch extract <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043f\u043e\u0440\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 dovecot, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u043e\u0440\u0442\u0430 (\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 mysql) \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443(BATCH=yes \u0443\u043a\u0430\u0436\u0435\u0442 make \u043d\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435):<\/p>\n<pre><code class=\"plaintext\">cd \/usr\/ports\/mail\/dovecot make config make BATCH=yes install clean <\/code><\/pre>\n<p>  \u0422\u0435 \u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0441 postfix \u0438 dovecot-pigeonhole<\/p>\n<p>  dovecot-pigeonhole:<\/p>\n<pre><code class=\"plaintext\">cd \/usr\/ports\/mail\/dovecot-pigeonhole make BATCH=yes install clean <\/code><\/pre>\n<p>  postfix: \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043c\u0435\u0442\u044c\u0442\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u043e\u0440\u0442\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 mysql<\/p>\n<pre><code class=\"plaintext\">cd  \/usr\/ports\/mail\/postfix-sasl make config make BATCH=yes install clean <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c dovecot \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u0438\u00bb:<\/p>\n<pre><code class=\"plaintext\"> cp -R \/usr\/local\/etc\/dovecot\/example-config\/*  \/usr\/local\/etc\/dovecot <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 postfix \u0438 dovecot \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code class=\"plaintext\">service postfix start service dovecot start <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u0441\u043f\u0430\u043c\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u043f\u0430\u043c, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 \/usr\/local\/etc\/dovecot\/conf.d, \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 def, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f vmail:<\/p>\n<pre><code class=\"plaintext\">mkdir \/usr\/local\/etc\/dovecot\/conf.d\/def touch \/usr\/local\/etc\/dovecot\/conf.d\/def\/default.sieve chown -R vmail:vmail \/usr\/local\/etc\/dovecot\/conf.d\/def chmod -R 744 \/usr\/local\/etc\/dovecot\/conf.d\/def <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"plaintext\">require \"fileinto\"; if header :contains \"X-Spam-Flag\" \"YES\" {     fileinto \"Junk\"; } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u00ab\u041a\u043e\u043d\u0444\u0438\u0433\u0438\u00bb<\/h3>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432\u00bb \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0432 \u043d\u0438\u0445, \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u044e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u0435\u00bb spamassassin, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u0432 \u0441\u0435\u0442\u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b(\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u00bb \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), \u043f\u0440\u043e\u0441\u044c\u0431\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a\u0430\u043a \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c spamassassin.<\/p>\n<h4>Postfix<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043a\u0432\u043e\u0442 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"plaintext\">mkdir \/usr\/local\/etc\/postfix\/mysql touch \/usr\/local\/etc\/postfix\/mysql\/relay_domains.cf touch \/usr\/local\/etc\/postfix\/mysql\/virtual_alias_maps.cf touch \/usr\/local\/etc\/postfix\/mysql\/virtual_alias_domain_maps.cf touch \/usr\/local\/etc\/postfix\/mysql\/virtual_mailbox_maps.cf <\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<br \/>  relay_domains.cf<\/p>\n<pre><code class=\"plaintext\">hosts = 127.0.0.1 user = postfix password = password123 dbname = postfix query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1' <\/code><\/pre>\n<p>  virtual_alias_maps.cf<\/p>\n<pre><code class=\"plaintext\">hosts = 127.0.0.1 user = postfix password = password123 dbname = postfix query = SELECT goto FROM alias WHERE address='%s' AND active ='1' <\/code><\/pre>\n<p>  virtual_alias_domain_maps.cf<\/p>\n<pre><code class=\"plaintext\">hosts = 127.0.0.1 user = postfix password = password123 dbname = postfix query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = '1' <\/code><\/pre>\n<p>  virtual_mailbox_maps.cf<\/p>\n<pre><code class=\"plaintext\">hosts = 127.0.0.1 user = postfix password = password123 dbname = postfix query = SELECT maildir FROM mailbox WHERE username='%s' AND  active = '1' <\/code><\/pre>\n<p>  master.cf<\/p>\n<pre><code class=\"plaintext\">#\u0423\u043a\u0430\u0437\u0430\u0442\u044c postfix \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dovecot \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b dovecot unix - n n - - pipe     flags=DRhu user=vmail:vmail argv=\/usr\/local\/libexec\/dovecot\/deliver -f ${sender} -d ${recipient}  #\u0423\u043a\u0430\u0436\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0435 smtpd \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 sasl, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e spamassassin \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 smtp      inet  n       -       n       -       -       smtpd   -o content_filter=spamassassin   -o smtpd_sasl_auth_enable=yes  #\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 587 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 sasl submission inet n       -       n       -       -       smtpd  -o smtpd_sasl_auth_enable=yes  #\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0435 smtp \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 SASL smtps     inet  n       -       n       -       -       smtpd   -o smtpd_sasl_auth_enable=yes   -o smtpd_tls_wrappermode=yes  #\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Spamassassin spamassassin   unix  -       n       n       -       -       pipe    flags=DROhu user=vmail:vmail argv=\/usr\/local\/bin\/spamc -f -e    \/usr\/local\/libexec\/dovecot\/deliver -f ${sender} -d ${user}@${nexthop}  #628       inet  n       -       n       -       -       qmqpd pickup    unix  n       -       n       60      1       pickup cleanup   unix  n       -       n       -       0       cleanup qmgr      unix  n       -       n       300     1       qmgr #qmgr     unix  n       -       n       300     1       oqmgr tlsmgr    unix  -       -       n       1000?   1       tlsmgr rewrite   unix  -       -       n       -       -       trivial-rewrite bounce    unix  -       -       n       -       0       bounce defer     unix  -       -       n       -       0       bounce trace     unix  -       -       n       -       0       bounce verify    unix  -       -       n       -       1       verify flush     unix  n       -       n       1000?   0       flush proxymap  unix  -       -       n       -       -       proxymap proxywrite unix -       -       n       -       1       proxymap smtp      unix  -       -       n       -       -       smtp relay     unix  -       -       n       -       -       smtp         -o syslog_name=postfix\/$service_name #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq     unix  n       -       n       -       -       showq error     unix  -       -       n       -       -       error retry     unix  -       -       n       -       -       error discard   unix  -       -       n       -       -       discard local     unix  -       n       n       -       -       local virtual   unix  -       n       n       -       -       virtual lmtp      unix  -       -       n       -       -       lmtp anvil     unix  -       -       n       -       1       anvil scache    unix  -       -       n       -       1       scache postlog   unix-dgram n  -       n       -       1       postlogd <\/code><\/pre>\n<p>  main.cf<\/p>\n<pre><code class=\"plaintext\">#\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 dovecot, \u0442\u043e \u043f\u043e\u0447\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c local_transport = dovecot  #\u041d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 SMTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 EHLO \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u043c\u0443 SMTP \u043a\u043b\u0438\u0435\u043d\u0442\u0443 smtpd_discard_ehlo_keywords = CONNECT GET POST  #\u041f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c \u043f\u043e\u043a\u0430 \u043f\u0440\u0438\u0434\u0451\u0442 \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f smtpd_delay_reject = yes  #\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u044e \u0441 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f smtpd_helo_required = yes  #\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u044f\u0449\u0438\u043a, \u0438\u043b\u0438 \u043d\u0435\u0442 disable_vrfy_command = yes  #\u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 broken_sasl_auth_clients = yes  #\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e smtpd_sasl_security_options = noanonymous noactive nodictionary smtp_sasl_security_options = noanonymous noactive nodictionary  #\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dovecot \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438(\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e cyrus) smtpd_sasl_type = dovecot smtp_sasl_type = dovecot  #\u043f\u0443\u0442\u044c \u0434\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 smtpd_sasl_path = private\/auth  #\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 local_recipient_maps = $virtual_mailbox_maps $virtual_alias_maps  #\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e\u0433\u0434\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u0443 smtpd_reject_unlisted_recipient = yes  #\u041b\u0438\u043c\u0438\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u0438\u0441\u0435\u043c message_size_limit = 10485760  #\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 spamassassin spamassassin_destination_recipient_limit = 1  #\u0410\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441 milter_default_action = accept milter_protocol = 2 #\u041f\u0443\u0442\u044c \u0434\u043e \u0441\u043e\u043a\u0435\u0442\u0430 clamav smtpd_milters = unix:\/var\/run\/clamav\/clmilter.sock non_smtpd_milters = unix:\/var\/run\/clamav\/clmilter.sock   #MYSQL relay_domains = mysql:\/usr\/local\/etc\/postfix\/mysql\/relay_domains.cf virtual_alias_maps = mysql:\/usr\/local\/etc\/postfix\/mysql\/virtual_alias_maps.cf, mysql:\/usr\/local\/etc\/postfix\/mysql\/virtual_alias_domain_maps.cf virtual_mailbox_maps = mysql:\/usr\/local\/etc\/postfix\/mysql\/virtual_mailbox_maps.cf  #\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 HELO smtpd_helo_restrictions = permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_hostname  #\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043f\u0438\u0441\u0435\u043c smtpd_data_restrictions = permit_sasl_authenticated reject_unauth_pipelining, reject_multi_recipient_bounce  #\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b smtpd_sender_restrictions = permit_sasl_authenticated reject_sender_login_mismatch,reject_unauthenticated_sender_login_mismatch, reject_non_fqdn_sender, reject_unknown_sender_domain  #\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u0451\u043c\u0430 \u043f\u043e\u0447\u0442\u044b(check_policy_service inet:127.0.0.1:10023 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 postgrey - \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u0451\u043c \u043f\u043e\u0447\u0442\u044b \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430) smtpd_recipient_restrictions = permit_sasl_authenticated reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_multi_recipient_bounce, reject_unknown_client_hostname, reject_unauth_destination, check_policy_service inet:127.0.0.1:10023   #\u041f\u0430\u043f\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u044b virtual_mailbox_base = \/var\/vmail  #uid \u0438 gid vmail virtual_minimum_uid = 1000 virtual_uid_maps = static:1000 virtual_gid_maps = static:1000  #\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 virtual_transport = devecot dovecot_destination_recipient_limit = 1   #\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f smtp_use_tls=yes smtp_tls_note_starttls_offer=yes #\u0441\u0442\u0440\u043e\u043a\u0430 smtp_tls_security_level=encrypt \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u0447\u0442\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 ssl, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0451\u043c \u043f\u043e\u0447\u0442\u044b \u0447\u0435\u0440\u0435\u0437 ssl, \u0442\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c smtp_tls_security_level=may(\u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ssl, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435) smtp_tls_security_level=encrypt smtp_tls_session_cache_database=btree:$data_directory\/smtp_tls_session_cache smtp_tls_CAfile=\/etc\/ssl\/demoCA\/cacert.pem smtp_tls_key_file=\/etc\/ssl\/foo-key.pem smtp_tls_cert_file=\/etc\/ssl\/foo-cert.pem smtp_tls_session_cache_timeout=3600s smtp_tls_protocols=!TLSv1.2 smtp_tls_loglevel=1  #\u0441\u0442\u0440\u043e\u043a\u0430 smtpd_tls_security_level=encrypt \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u043e\u0447\u0442\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 ssl, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0451\u043c \u043f\u043e\u0447\u0442\u044b \u0447\u0435\u0440\u0435\u0437 ssl, \u0442\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c smtpd_tls_security_level=may(\u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ssl, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435) smtpd_tls_security_level=encrypt smtpd_use_tls=yes smtpd_tls_auth_only=yes smtpd_tls_loglevel=1 smtpd_tls_received_header=yes smtpd_tls_session_cache_timeout=3600s smtpd_tls_session_cache_database=btree:$data_directory\/smtpd_tls_session_cache smtpd_tls_key_file=\/etc\/ssl\/foo-key.pem smtpd_tls_cert_file=\/etc\/ssl\/foo-cert.pem smtpd_tls_CAfile= \/etc\/ssl\/demoCA\/cacert.pem smtpd_tls_protocols=!TLSv1.2  #\u041f\u0443\u0442\u044c \u0434\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b tls_random_source=dev:\/dev\/urandom  #\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c compatibility_level = 2  #\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0430 \u043d\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0430, \u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0435\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437, \u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435 soft_bounce = no  #\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0443\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c UNIX \u0438\u0437 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 postfix mail_owner = postfix  #\u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 postfix(\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442) myhostname = $mydomain  #\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 mydomain = virusslayer.su myorigin = $myhostname  #\u041a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c inet_interfaces = all  #\u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u043e\u0447\u0442\u044b mydestination = $mydomain, localhost, localhost.$mydomain  #\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 550 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e unknown_local_recipient_reject_code = 550  #\u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 localhost mynetworks_style = host  #\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0447\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0442\u0430\u043a-\u043a\u0430\u043a \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 mynetworks =  #\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 ip inet_protocols = ipv4  #\u0410\u043b\u0438\u0430\u0441\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439(\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e) alias_maps = hash:\/etc\/mail\/aliases alias_database = dbm:\/etc\/mail\/aliases.db  #\u0414\u0430\u043d\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u0447\u0442\u044b smtpd_banner = $myhostname ESMTP $mail_name  #\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442\u0447\u0451\u0442 debug_peer_level = 2  #\u0423\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u043a\u0438\u043c\u0438 \u0434\u043e\u043c\u0435\u043d\u0430\u043c\u0438 \u043e\u0442\u0441\u043b\u043a\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 (\u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043b\u043e\u0433, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 yandex.ru gmail.ru mail.ru \u0438 \u0442.\u0434.) debug_peer_list = 127.0.0.1  #\u041f\u0443\u0442\u044c \u0434\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 debugger_command =          PATH=\/bin:\/usr\/bin:\/usr\/local\/bin:\/usr\/X11R6\/bin          ddd $daemon_directory\/$process_name $process_id &amp; sleep 5  #\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 sendmail sendmail_path = \/usr\/local\/sbin\/sendmail mailq_path = \/usr\/local\/bin\/mailq   setgid_group = maildrop  #\u041f\u0443\u0442\u0438 \u0434\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 html_directory = \/usr\/local\/share\/doc\/postfix manpage_directory = \/usr\/local\/man sample_directory = \/usr\/local\/etc\/postfix readme_directory = \/usr\/local\/share\/doc\/postfix meta_directory = \/usr\/local\/libexec\/postfix shlib_directory = \/usr\/local\/lib\/postfix queue_directory = \/var\/spool\/postfix command_directory = \/usr\/local\/sbin daemon_directory = \/usr\/local\/libexec\/postfix data_directory = \/var\/db\/postfix <\/code><\/pre>\n<p>  <\/p>\n<h4>Dovecot<\/h4>\n<p>  dovecot.conf<\/p>\n<pre><code class=\"plaintext\">#\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c dovecot protocols = imap pop3  #\u041a\u0430\u043a\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043b\u0443\u0448\u0430\u0442\u044c listen = *, ::  #\u041f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0442 \u0438\u0437 mysql dict {     quota = mysql:\/usr\/local\/etc\/dovecot\/dovecot-dict-sql.conf.ext }  #\u0418\u0437\u0432\u043b\u0435\u0447\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438 !include conf.d\/*.conf !include_try local.conf <\/code><\/pre>\n<p>  dovecot-dict-sql.conf.ext<\/p>\n<pre><code class=\"plaintext\">connect = host=127.0.0.1 dbname=postfix user=postfix password=password123  map {   pattern = priv\/quota\/storage   table = quota2   username_field = username   value_field = bytes } map {   pattern = priv\/quota\/messages   table = quota2   username_field = username   value_field = messages } <\/code><\/pre>\n<p>  dovecot-sql.conf.ext<\/p>\n<pre><code class=\"plaintext\">#\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 MYSQL driver = mysql connect = host=127.0.0.1 dbname=postfix user=postfix password=password123  #\u041a\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439 default_pass_scheme = MD5  #\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u043a\u0432\u043e\u0442 user_query = SELECT '\/var\/mail\/%d\/%n\/' AS  home, 'maildir:\/var\/vmail\/%d\/%n' AS mail, 1000 AS uid, 1000 AS gid, concat('*:bytes=',quota) as quota_rule FROM mailbox \\     WHERE username ='%u' AND active = '1'  password_query = SELECT username as user, password, '\/var\/vmail\/%d\/%n' as userdb_home, 'maildir:\/var\/vmail\/%d\/%n' as userdb_mail, 1000 as userdb_uid, \\  1000 as userdb_gid, concat('*:bytes=',quota) AS userdb_quota_rule FROM mailbox WHERE username ='%u' AND active ='1' <\/code><\/pre>\n<p>  10-auth.conf<\/p>\n<pre><code class=\"plaintext\">#\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0435\u0437 SSL disable_plaintext_auth = yes  #\u0418\u043c\u044f \u0412\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 auth_realms = virusslayer.su auth_default_realm = virusslayer.su  #\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435(\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ssl) auth_mechanisms = plain login  #\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u0440\u043e\u043c\u0435 !include auth-sql.conf.ext, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b mysql #!include auth-deny.conf.ext #!include auth-master.conf.ext  #!include auth-system.conf.ext !include auth-sql.conf.ext #!include auth-ldap.conf.ext #!include auth-passwdfile.conf.ext #!include auth-checkpassword.conf.ext #!include auth-vpopmail.conf.ext #!include auth-static.conf.ext <\/code><\/pre>\n<p>  10-mail.conf<\/p>\n<pre><code class=\"plaintext\">#\u041f\u0443\u0442\u044c \u0434\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432 mail_location = maildir:\/var\/vmail\/%d\/%n  #\u0412\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u044f\u0449\u0438\u043a \u0434\u043b\u044f \u043f\u0440\u0438\u0451\u043c\u0430 \u043f\u0438\u0441\u0435\u043c namespace inbox {   inbox = yes }  #uid \u0438 gid vmail mail_uid = 1000 mail_gid = 1000  #\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0438 quota mail_plugins = quota <\/code><\/pre>\n<p>  10-master.conf<\/p>\n<pre><code class=\"plaintext\">#\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ssl service imap-login {   inet_listener imap {     port = 143   }   inet_listener imaps {     port = 993     ssl = yes   } }  service pop3-login {   inet_listener pop3 {     port = 110   }   inet_listener pop3s {     port = 995     ssl = yes   } }  service submission-login {   inet_listener submission {     port = 587   } }  #\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043b, \u043d\u043e \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f \u043f\u043e\u043d\u044f\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a) service auth {   unix_listener auth-userdb {     mode = 0600     user = vmail     group = vmail   }   # Postfix smtp-auth   unix_listener \/var\/spool\/postfix\/private\/auth {     mode = 0666     user = postfix     group = postfix   } }  #\u041f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f vmail \u043a \u043a\u0432\u043e\u0442\u0430\u043c service dict {   unix_listener dict {     mode = 0660     user =  vmail     group = vmail     }   } <\/code><\/pre>\n<p>  10-ssl.conf<\/p>\n<pre><code class=\"plaintext\">#\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ssl \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0435\u0437 sll \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b) ssl = required  #\u041f\u0443\u0442\u0438 \u0434\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 ssl_cert = &lt;\/etc\/ssl\/foo-cert.pem ssl_key = &lt;\/etc\/ssl\/foo-key.pem ssl_ca = &lt;\/etc\/ssl\/demoCA\/cacert.pem  #\u041a\u0430\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b ssl_min_protocol = TLSv1.2 <\/code><\/pre>\n<p>  15-lda.conf<\/p>\n<pre><code class=\"plaintext\">quota_full_tempfail = no lda_mailbox_autosubscribe = yes protocol lda {  # \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043c\u043e\u0434\u0443\u043b\u044c sieve, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0430\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u043f\u0430\u043c   mail_plugins = $mail_plugins sieve quota } <\/code><\/pre>\n<p>  90-plugin.conf<\/p>\n<pre><code class=\"plaintext\">#\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u043f\u0430\u043c \u043f\u0438\u0441\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \"\u0421\u041f\u0410\u041c\", \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 chown -R vmail:vmail #\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0431\u0440\u043e\u0441\u0430 \u0441\u043f\u0430\u043c\u0430 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \"\u0421\u041f\u0410\u041c\" plugin {   #setting_name = value   sieve = \/usr\/local\/etc\/dovecot\/conf.d\/def\/default.sieve } <\/code><\/pre>\n<p>  auth-sql.conf.ext<\/p>\n<pre><code class=\"plaintext\">#\u0424\u0430\u0439\u043b\u044b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 MYSQL passdb {   driver = sql    # Path for SQL configuration file, see example-config\/dovecot-sql.conf.ext   args = \/usr\/local\/etc\/dovecot\/dovecot-sql.conf.ext }  userdb {   driver = sql   args = \/usr\/local\/etc\/dovecot\/dovecot-sql.conf.ext } <\/code><\/pre>\n<p>  <\/p>\n<h3>Spamassassin<\/h3>\n<p>  \u00ab\u041a\u043e\u043d\u0444\u0438\u0433\u00bb spamassassin \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434, \u043d\u043e \u0447\u0442\u043e \u0442\u043e \u043c\u043d\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043f\u0440\u043e\u0441\u044c\u0431\u0430 \u043f\u043e\u043c\u043e\u0447\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u00ab\u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c\u00bb:<\/p>\n<p>  local.cf<\/p>\n<pre><code class=\"plaintext\">rewrite_header Subject *****SPAM***** report_safe 0 required_score 5.0 use_bayes 1 bayes_auto_learn 1 ifplugin Mail::SpamAssassin::Plugin::Shortcircuit endif # Mail::SpamAssassin::Plugin::Shortcircuit <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0438\u0441\u044c\u043c\u0430\u0445 \u0441 \u0441\u043f\u0430\u043c\u043e\u043c \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"plaintext\">sa-learn --spam \/path\/spam\/folder sa-learn --ham \/path\/ham\/folder <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/h2>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0443\u043a\u0430\u0436\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 firewall \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 pf, \u0434\u043e\u0431\u0430\u0432\u0438\u043c pf \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0443\u043a\u0430\u0436\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<pre><code class=\"plaintext\">sysrc pf_enable=\"YES\" sysrc pf_rules=\"\/etc\/0.pf\" <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<pre><code class=\"plaintext\">ee \/etc\/0.pf <\/code><\/pre>\n<p>  \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code class=\"plaintext\">#\u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440(\u043d\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 lo0) \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c, \u0438\u043b\u0438 \u043e\u043d \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 set skip on lo0  #\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u043f\u043e\u0440\u0442\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c deovecot, postfix, root pass in quick proto { tcp, udp } from any to any port {53,25,465,587,110,143,993,995} user {dovecot,postfix,root} flags S\/SA modulate state pass out quick proto { tcp, udp } from any to any port {53,25,465,587,110,143,993,995} user {dovecot,postfix,root}  #\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root pass out quick proto {tcp,udp} from any to any user root  #\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0432\u044d\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 pass in quick proto tcp from any to any port 80 flags S\/SA modulate state  #SSH pass in quick proto tcp from any to any port 22 flags S\/SA modulate state  #\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0441\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c clamav \u0438 spamd  pass out quick proto {tcp,udp} from any to any user {clamav,spamd}  #DNS \u0438 ICMP pass out quick proto {tcp,udp} from any to any port=53 keep state pass out quick proto icmp from any to any  block from any to any fragment block from any to any block all <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c pf \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"plaintext\">service pf start <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439(STARTTLS, SLL) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432(\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u0434\u043b\u044f ios) \u00ab\u041c\u043e\u0439\u041e\u0444\u0438\u0441 \u041f\u043e\u0447\u0442\u0430\u00bb, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f spaassasin \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 GTUBE, \u0432 \u043f\u0438\u0441\u044c\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"plaintext\">XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0442\u043e \u043f\u0438\u0441\u044c\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043e \u0441\u043f\u0430\u043c\u043e\u043c \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u043f\u0430\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c EICAR:<\/p>\n<pre><code class=\"plaintext\">X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* <\/code><\/pre>\n<p>  \u041f\u0438\u0441\u044c\u043c\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u044f\u0449\u0438\u043a\u043e\u0432.<br \/>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043b\u043e\u0433\u043e\u0432 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<pre><code class=\"plaintext\">tail -f \/var\/log\/maillog <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0435 \u044f\u0449\u0438\u043a\u0438(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 yandex.ru, mail.ru, gmail.com \u0438 \u0442.\u0434.) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0437\u043e\u043d\u0443 DNS(PTR \u0437\u0430\u043f\u0438\u0441\u044c), \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0442\u0451\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432 \u0412\u0430\u0448 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440(\u0435\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 DNS \u0441\u0435\u0440\u0432\u0435\u0440).<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u0430\u043a, \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 \u0441\u043f\u0430\u043c\u0430 \u0438 \u0432\u0438\u0440\u0443\u0441\u043e\u0432.<\/p>\n<p>  P.S. \u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u00ab\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c\u00bb \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root(\u0438 \u0442\u0435\u043c \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e) \u0432 \u043b\u043e\u0433\u0438 \u043a\u043b\u0430\u0441\u0441 russian:<\/p>\n<pre><code class=\"plaintext\">pw usermod root -L russian <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/476148\/\"> https:\/\/habr.com\/ru\/post\/476148\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0445\u043e\u0442\u0435\u043b \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e, \u043d\u043e \u0440\u0443\u043a\u0438 \u0434\u043e\u0448\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0434\u0430 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043c\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e postfix, dovecot, mysql, postfixadmin, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438 \u043e spamassassin, clamav-milter(\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f clamav \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432), postgrey, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u043f\u0430\u043c\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \u00ab\u0421\u043f\u0430\u043c\u00bb(dovecot-pigeonhole).  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-294725","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/294725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=294725"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/294725\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=294725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=294725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=294725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}