{"id":3086,"date":"2018-04-17T15:00:54","date_gmt":"2018-04-17T20:00:54","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=3086"},"modified":"2018-04-17T15:00:54","modified_gmt":"2018-04-17T20:00:54","slug":"sendmail-in-chroot-jail","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=3086","title":{"rendered":"Sendmail In CHROOT Jail"},"content":{"rendered":"<p>Running our <a href=\"http:\/\/lisa.rushworth.us\/?p=3042\" target=\"_blank\" rel=\"noopener\">sendmail mail relay in a chroot jail<\/a>, &#8216;make&#8217; does not update sendmail config files with changes. While I&#8217;m certain there&#8217;s a way to sort that, it&#8217;s a\u00a0<em>lot<\/em> easier to go back to the old-school way of updating sendmail.cf and sendmail&#8217;s hash files.<\/p>\n<p><strong>Modifying Sendmail Configuration (sendmail.mc) on Servers with CHROOT Jailed Sendmail<\/strong><\/p>\n<ol>\n<li>SSH to server using your ID<\/li>\n<li>Change to the sendmail service account (e.g. sudo \/bin\/su \u2013 sendmail)<\/li>\n<li>Change directory to the jailed sendmail \/etc\/mail locatio (e.g. cd \/smt00p20\/sendmail\/etc\/mail)<\/li>\n<li>vi sendmail.mc<\/li>\n<li>Make requisite changes and save file<\/li>\n<li>m4 sendmail.mc &gt; sendmail.cf<\/li>\n<li>Under your ID, restart sendmail using \u201csudo systemctl stop sendmail stop;sudo systemctl start sendmail\u201d<\/li>\n<li>Validate changes<\/li>\n<\/ol>\n<p><strong>Modifying Sendmail Data Files on Servers with CHROOT Jailed Sendmail<\/strong><\/p>\n<ol>\n<li>SSH to server using your ID<\/li>\n<li>Change to the sendmail service account (e.g. sudo \/bin\/su \u2013 sendmail)<\/li>\n<li>Change directory to the jailed sendmail \/etc\/mail locatio (e.g. cd \/smt00p20\/sendmail\/etc\/mail)<\/li>\n<li>vi <em>filetoedit<\/em><\/li>\n<li>Make requisite changes and save file<\/li>\n<li>makemap hash .\/<em>filetoedit<\/em>.db &lt; .\/<em>filetoedit<\/em><\/li>\n<li>Under your ID, restart sendmail using\u00a0 \u201csudo systemctl stop sendmail stop;sudo systemctl start sendmail\u201d<\/li>\n<li>Validate changes<\/li>\n<\/ol>\n<p>Where <em>filetoedit <\/em>is the name of the data file. For example, run \u201cmakemap hash .\/access.db &lt; .\/access\u201d to update the changes to the access file into access.db<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running our sendmail mail relay in a chroot jail, &#8216;make&#8217; does not update sendmail config files with changes. While I&#8217;m certain there&#8217;s a way to sort that, it&#8217;s a\u00a0lot easier to go back to the old-school way of updating sendmail.cf and sendmail&#8217;s hash files. Modifying Sendmail Configuration (sendmail.mc) on Servers with CHROOT Jailed Sendmail SSH &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[259],"class_list":["post-3086","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-sendmail"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/3086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3086"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/3086\/revisions"}],"predecessor-version":[{"id":3087,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/3086\/revisions\/3087"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}