{"id":5505,"date":"2018-09-04T17:09:18","date_gmt":"2018-09-04T14:09:18","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=5505"},"modified":"2023-03-30T13:55:38","modified_gmt":"2023-03-30T10:55:38","slug":"%d0%a0%d0%b0%d1%81%d1%81%d1%8b%d0%bb%d0%ba%d0%b0-%d0%bf%d0%b8%d1%81%d0%b5%d0%bc-%d1%87%d0%b5%d1%80%d0%b5%d0%b7-sendmail-%d0%b2-solaris","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5505","title":{"rendered":"\u0420\u0430\u0441\u0441\u044b\u043b\u043a\u0430 \u043f\u0438\u0441\u0435\u043c \u0447\u0435\u0440\u0435\u0437 sendmail \u0432 Solaris"},"content":{"rendered":"<p>\u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443\u0436\u0435 \u0441\u0442\u043e\u044f\u043b <strong>Sendmail<\/strong>, \u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>1. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438:<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435\u00a0<strong>\/etc\/mail\/sendmail.cf<\/strong> \u0432\u043d\u043e\u0441\u0438\u043c \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438:<\/p>\n<p><code># change sender domain<br \/>\nDjdomain.com<br \/>\nDwdomain<br \/>\nDkdomain.com<\/code><\/p>\n<p><!--more--><\/p>\n<p>2. \u041c\u0435\u043d\u044f\u0435\u043c \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e Sendmail&#8217;a:<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043c 2 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p><strong>\/etc\/mail\/sendmail.cf<\/strong>, <strong>\/etc\/mail\/submit.cf<\/strong><\/p>\n<p><code># change version<br \/>\nDZ45.39 SP8<\/code><\/p>\n<p><code># change Greeting Message<br \/>\nO SmtpGreetingMessage=$j Microsoft ESMTP MAIL Service ready at $b<\/code><\/p>\n<p># change Header Receive (change $v\/$Z -&gt; $Z)<\/p>\n<pre>HReceived: ...\n...\n        $.by $j ($Z)$?r with $r$. id $i$?{tls_version}\n<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430:<\/p>\n<pre># sendmail -d0.1 -bv root\nVersion 8.15.1+Sun\n Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8\n                MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS\n                PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB USE_LDAP_INIT\n                XDEBUG\n\n============ SYSTEM IDENTITY (after readcf) ============\n      (short domain name) $w = domain\n  (canonical domain name) $j = domain.com\n         (subdomain name) $m = com\n              (node name) $k = domain.com\n========================================================\n\nroot... deliverable: mailer local, user root\n<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c <strong>Sendmail&#8217;a<\/strong> \u043f\u043e\u0434 <strong>Solaris<\/strong>: \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b <strong>\/etc\/hosts<\/strong> \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <strong>mailhost<\/strong>:<\/p>\n<p><code>127.0.0.1 domain.com localhost loghost mailhost<\/code><\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e? \u041e\u0442\u0432\u0435\u0442 \u0446\u0438\u0442\u0430\u0442\u043e\u0439 \u043d\u0438\u0436\u0435:<\/p>\n<blockquote><p><span style=\"color: #993366;\">1) it is Sun&#8217;s tradition to ship a sendmail.cf with the relayhost set to mailhost.<\/span><br \/>\n<span style=\"color: #993366;\">Then you only need to define mailhost in the hosts file (or, even easier, in the naming service e.g. DNS).<\/span><br \/>\n<span style=\"color: #993366;\">1a) mailx, when delivering E-mail, spawns a sendmail that reads submit.cf.<\/span><br \/>\n<span style=\"color: #993366;\">The shipped submit.cf tells to deliver to port 25 on localhost.<\/span><br \/>\n<span style=\"color: #993366;\">2) there is also a sendmail daemon process that reads sendmail.cf and listens to port 25.<\/span><br \/>\n<span style=\"color: #993366;\">&#8212;<\/span><br \/>\n<span style=\"color: #993366;\">If you want mailx to deliver mail to mailhost without the sendmail daemon, you must define mailhost in submit.cf. Placing mailhost in the DS line should do it. (I would not go through the m4 hassle.)<\/span><\/p><\/blockquote>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c <strong>aliases<\/strong> \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442:<\/p>\n<p><code># newaliases ; svcadm restart svc:\/network\/sendmail-client:default ; svcadm restart svc:\/network\/smtp:sendmail<\/code><\/p>\n<p>\u041f\u0440\u043e\u0447\u0438\u0435 <a href=\"https:\/\/www.akadia.com\/services\/sendmail_relay.html\">\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a> \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443\u0436\u0435 \u0441\u0442\u043e\u044f\u043b Sendmail, \u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. 1. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438: \u0412 \u0444\u0430\u0439\u043b\u0435\u00a0\/etc\/mail\/sendmail.cf \u0432\u043d\u043e\u0441\u0438\u043c \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438: # change sender domain Djdomain.com Dwdomain Dkdomain.com<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,24],"tags":[],"class_list":["post-5505","post","type-post","status-publish","format-standard","hentry","category-mail","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5505","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=5505"}],"version-history":[{"count":6,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5505\/revisions"}],"predecessor-version":[{"id":6140,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5505\/revisions\/6140"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}