{"id":4,"date":"2008-02-05T21:32:13","date_gmt":"2008-02-05T20:32:13","guid":{"rendered":"http:\/\/platyna.platinum.linux.pl\/blog\/?p=4"},"modified":"2008-11-15T14:11:44","modified_gmt":"2008-11-15T13:11:44","slug":"sendmail-dovecot-and-passwd-like-file","status":"publish","type":"post","link":"https:\/\/platyna.info\/blog\/2008\/02\/05\/sendmail-dovecot-and-passwd-like-file\/","title":{"rendered":"Sendmail, Dovecot and passwd-like file."},"content":{"rendered":"<p>Programming: Klupek<br \/>\nEvil plan: Platyna<\/p>\n<p>How to use Sendmail and passwd like file (like \/etc\/passwd-mail)? Here it is: <a href='http:\/\/platyna.platinum.linux.pl\/blog\/wp-content\/uploads\/2008\/09\/sendmail-pwlike-maildb.patch' title='sendmail-pwlike-maildb.patch'>sendmail-pwlike-maildb.patch<\/a><\/p>\n<p>Next we are h4x0ring sendmail.mc:<\/p>\n<p>Before MAILER(local)dnl:<\/p>\n<p>define(`LOCAL_MAILER_PATH&#8217;,`\/usr\/libexec\/dovecot\/deliver&#8217;)<br \/>\ndefine(`LOCAL_MAILER_FLAGS&#8217;,`DFMPhfnu9&#8242;)<br \/>\ndefine(`LOCAL_MAILER_ARGS&#8217;,`deliver -d $u&#8217;)<\/p>\n<p>define(`confMAILBOX_DATABASE&#8217;, `pwlike&#8217;)<\/p>\n<p># sendmail -Am -bv test@example.net<br \/>\ntest@example.net&#8230; deliverable: mailer local, user test<\/p>\n<p>Hooray!<\/p>\n<p>I tried to use mail.local and it&#8217;s -D option but that program seems to be braindead (-D pwlike gives &#8220;service unavailable&#8221; error and even in the strace output there are no hints why, do we have to hack mbdb AND mail.local code?).<\/p>\n<p>I am using Dovecot&#8217;s local mailer (named deliver), which works nicely after configuring Dovecot with passwd-like file (the same as we have coded in sendmail &#8211; \/etc\/passwd-mail).<\/p>\n<p>Anyway the documentation of the Dovecot&#8217;s LDA + Sendmail on their Wiki is bad, very very bad.<\/p>\n<p>About the passwd file itself&#8230;we have to use the same password encryption sheme as the \/etc\/shadow (the same that getpwnam() supports, since patch features the modified version of getpwnam()), we can accomplish this using Cracklib, I will post the adduser script later on.<\/p>\n<p>Now we only need to hack the the darn SASL&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Programming: Klupek Evil plan: Platyna How to use Sendmail and passwd like file (like \/etc\/passwd-mail)? Here it is: sendmail-pwlike-maildb.patch Next we are h4x0ring sendmail.mc: Before MAILER(local)dnl: define(`LOCAL_MAILER_PATH&#8217;,`\/usr\/libexec\/dovecot\/deliver&#8217;) define(`LOCAL_MAILER_FLAGS&#8217;,`DFMPhfnu9&#8242;) define(`LOCAL_MAILER_ARGS&#8217;,`deliver -d $u&#8217;) define(`confMAILBOX_DATABASE&#8217;, `pwlike&#8217;) # sendmail -Am -bv test@example.net test@example.net&#8230; deliverable: mailer local, user test Hooray! I tried to use mail.local and it&#8217;s -D option but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[4,3],"tags":[24,32,27,25,26,23],"class_list":["post-4","post","type-post","status-publish","format-standard","hentry","category-administrativia","category-english","tag-cyrus-sasl","tag-dovecot","tag-passwd-like","tag-sasl","tag-saslauthd","tag-sendmail"],"_links":{"self":[{"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":0,"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"wp:attachment":[{"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/platyna.info\/blog\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}