status-update-october-2021.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>Status Update October 2021 — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>Status Update October 2021</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — November 01, 2021</h3><div><p>The main thing that I have been working on this month is an
  2. <code>opensmtpd-service</code> that uses <code>(guix records)</code>. The code is <a href="https://notabug.org/jbranso/linode-guix-system-configuration/src/master/opensmtpd-records.scm">here.</a>
  3. It has been a real pleasure creating the various records to turn this:</p><pre><code>(service opensmtpd-service-type
  4. (opensmtpd-configuration
  5. (queue
  6. (opensmtpd-queue-configuration
  7. (compression #t)))
  8. (smtp
  9. (opensmtpd-smtp-configuration
  10. (max-message-size &quot;10M&quot;)))
  11. (srs
  12. (opensmtpd-srs-configuration
  13. (ttl-delay &quot;5d&quot;)))
  14. (pkis (list
  15. (opensmtpd-pki
  16. (domain &quot;smtpd.gnucode.me&quot;)
  17. (cert &quot;/etc/letsencrypt/live/gnucode.me/fullchain.pem&quot;)
  18. (key &quot;/etc/letsencrypt/live/gnucode.me/privkey.pem&quot;))))
  19. (tables (list
  20. (opensmtpd-table
  21. (name &quot;aliases&quot;)
  22. (values
  23. (list
  24. (cons &quot;webmaster&quot; &quot;root&quot;)
  25. (cons &quot;postmaster&quot; &quot;root&quot;)
  26. (cons &quot;abuse&quot; &quot;root&quot;))))
  27. (opensmtpd-table
  28. (name &quot;creds&quot;)
  29. (values
  30. (list
  31. (cons &quot;joshua&quot;
  32. &quot;$6$Ec4m8FgKjT2F/03Y$k66ABdse9TzCX6qaALB3WBL9GC1rmAWJmaoSjFMpbhzat7DOpFqpnOwpbZ34wwsQYIK8RQlqwM1I/v6vsRq86.&quot;))))
  33. (opensmtpd-table
  34. (name &quot;vdoms&quot;)
  35. (values (list &quot;gnucode.me&quot;
  36. &quot;gnu-hurd.com&quot;)))
  37. (opensmtpd-table
  38. (name &quot;vusers&quot;)
  39. (values (list (cons &quot;joshua@gnucode.me&quot; &quot;joshua&quot;)
  40. (cons &quot;jbranso@gnucode.me&quot; &quot;joshua&quot;)
  41. (cons &quot;postmaster@gnucode.me&quot; &quot;joshua&quot;))))))
  42. (listen-ons
  43. (list
  44. ;; this forum help suggests that I listen on 0.0.0.0 and NOT eth0
  45. ;; https://serverfault.com/questions/726795/opensmtpd-wont-work-at-reboot
  46. ;; this listens for email from the outside world
  47. (opensmtpd-listen-on
  48. (interface &quot;eth0&quot;)
  49. (port 25)
  50. (secure-connection &quot;tls&quot;)
  51. (pki &quot;smtp.gnucode.me&quot;))
  52. ;; this lets local users logged into the system via ssh send email
  53. (opensmtpd-listen-on
  54. (interface &quot;lo&quot;)
  55. (port 25)
  56. (secure-connection &quot;tls&quot;)
  57. (pki &quot;smtp.gnucode.me&quot;))
  58. (opensmtpd-listen-on
  59. (interface &quot;eth0&quot;)
  60. (port 465)
  61. (secure-connection &quot;smtps&quot;)
  62. (pki &quot;smtp.gnucode.me&quot;)
  63. (auth &quot;&lt;creds&gt;&quot;))
  64. (opensmtpd-listen-on
  65. (interface &quot;eth0&quot;)
  66. (port 587)
  67. (secure-connection &quot;tls-require&quot;)
  68. (pki &quot;smtp.gnucode.me&quot;)
  69. (auth &quot;&lt;creds&gt;&quot;))
  70. ))
  71. (actions
  72. (list
  73. (opensmtpd-action
  74. (name &quot;receive&quot;)
  75. (method
  76. (opensmtpd-local-delivery-configuration
  77. (method (opensmtpd-maildir-configuration
  78. (pathname &quot;/home/%{rcpt.user}/Maildir&quot;)
  79. (junk #t)))
  80. (virtual &quot;vusers&quot;))))
  81. (opensmtpd-action
  82. (name &quot;send&quot;)
  83. (method (opensmtpd-relay-configuration)))))
  84. (matches (list
  85. (opensmtpd-match
  86. (name &quot;send&quot;)
  87. (for &quot;for any&quot;)
  88. (from &quot;from any&quot;)
  89. (auth &quot;auth&quot;))
  90. (opensmtpd-match
  91. (name &quot;receive&quot;)
  92. (from &quot;from any&quot;)
  93. (for &quot;for domain &lt;vdoms&gt;&quot;))
  94. (opensmtpd-match
  95. (name &quot;receive&quot;)
  96. (for &quot;for local&quot;))))
  97. (filter-chains
  98. (list
  99. (opensmtpd-filter-chain
  100. (name &quot;dropDumbEmails&quot;)
  101. (filter-names (list &quot;nofcrdnsDisconnect&quot;
  102. &quot;nordnsDisconnect&quot;)))))
  103. (filter-phases
  104. (list (opensmtpd-filter-phase
  105. (name &quot;nofcrdnsDisconnect&quot;)
  106. (phase-name &quot;connect&quot;)
  107. (conditions (list &quot;!fcrdns&quot;))
  108. (decision &quot;disconnect&quot;)
  109. (message &quot;You have not set up forward confirmed DNS.&quot;))
  110. (opensmtpd-filter-phase
  111. (name &quot;nordnsDisconnect&quot;)
  112. (phase-name &quot;connect&quot;)
  113. (conditions (list &quot;!rdns&quot;))
  114. (decision &quot;reject&quot;)
  115. (message &quot;You have not set up reverse DNS.&quot;))))))</code></pre><p>into this:</p><pre><code>smtp max-message-size 10M
  116. srs ttl 5d
  117. queue compression
  118. table aliases { &quot;webmaster&quot; = &quot;root&quot;, &quot;postmaster&quot; = &quot;root&quot;, &quot;abuse&quot; = &quot;root&quot; }
  119. table creds { &quot;joshua&quot; = &quot;$6$Ec4m8FgKjT2F/03Y$k66ABdse9TzCX6qaALB3WBL9GC1rmAWJmaoSjFMpbhzat7DOpFqpnOwpbZ34wwsQYIK8RQlqwM1I/v6vsRq86.&quot; }
  120. table vdoms { &quot;gnucode.me&quot;, &quot;gnu-hurd.com&quot; }
  121. table vusers { &quot;joshua@gnucode.me&quot; = &quot;joshua&quot;, &quot;jbranso@gnucode.me&quot; = &quot;joshua&quot;, &quot;postmaster@gnucode.me&quot; = &quot;joshua&quot; }
  122. pki smtpd.gnucode.me cert &quot;/etc/letsencrypt/live/gnucode.me/fullchain.pem&quot;
  123. pki smtpd.gnucode.me key &quot;/etc/letsencrypt/live/gnucode.me/privkey.pem&quot;
  124. filter &quot;nofcrdnsDisconnect&quot; phase connect match !fcrdns disconnect &quot;You have not set up forward confirmed DNS.&quot;
  125. filter &quot;nordnsDisconnect&quot; phase connect match !rdns reject &quot;You have not set up reverse DNS.&quot;
  126. filter &quot;dropDumbEmails&quot; chain {nofcrdnsDisconnect, nordnsDisconnect}
  127. listen on eth0 tls port 25 pki smtp.gnucode.me
  128. listen on lo tls port 25 pki smtp.gnucode.me
  129. listen on eth0 smtps port 465 pki smtp.gnucode.me auth &lt;&lt;creds&gt;&gt;
  130. listen on eth0 tls-require port 587 pki smtp.gnucode.me auth &lt;&lt;creds&gt;&gt;
  131. action &quot;receive&quot; maildir &quot;/home/%{rcpt.user}/Maildir&quot; junk
  132. action &quot;send&quot; relay
  133. match from any for any auth tls action &quot;send&quot;
  134. match from any for domain &lt;vdoms&gt; tls action &quot;receive&quot;
  135. match for local tls action &quot;receive&quot;</code></pre><p>Looking at it now, one might almost prefer just to use the opensmtpd
  136. configuration syntax. Still it is nice to be able to use a schemey
  137. syntax and translate in into something that opensmtpd can parse.
  138. Perhaps someone could potentially configure a webserver via something
  139. like this:</p><pre><code>(service email-service-type
  140. (email-service-configuration
  141. (domains (list &quot;gnucode.me&quot;
  142. &quot;gnu-hurd.com&quot;))
  143. (use-letsencrypt-certs #t)))</code></pre><p>Perhaps the above would set up a DNS server at smtp.domain.name. And
  144. serve the emails via dovecot. Though that would be a task for someone else.</p><p>Future work for my opensmtpd-service via <code>(guix records)</code> includes
  145. writing figure out how to let <code>opensmtpd-filter-proc-exec</code> accept a
  146. list of strings and gexps. I currently could use my opensmtpd-service
  147. for my linode server via the <code>includes</code> directive, but I'd rather use
  148. the <code>opensmtpd-filter-proc-exec</code>. My current opensmtpd configuration
  149. can be found
  150. <a href="https://notabug.org/jbranso/linode-guix-system-configuration/src/master/opensmtpd.scm">here</a>.
  151. If you can think of anyway that I can improve the code, please reach
  152. out: jbranso AT dismail DOT de.</p><h2>I made a cookbook submission about auto logging into tty3</h2><p><a href="http://issues.guix.gnu.org/48974#13">http://issues.guix.gnu.org/48974#13</a></p><p>This was a while ago, but I did write an entry in the cookbook about
  153. how to autologin to a specific tty. So if you want to learn how to
  154. auto login to sway via guix system, this is part of that solution.</p><h2>I am now hosting an xmpp account on gnucode.me.</h2><p>My jmp.chat account delivers SMS text messages to my XMPP account at
  155. via dismail.de. Perhaps one day soon, I'll be able to host my own
  156. chats via gnucode.me. That would be pretty awesome!</p><h2>Guix's official libreboot cookbook guide</h2><p>I also need to finish Raghav's <a href="http://issues.guix.gnu.org/49654#1">libreboot
  157. cookbook</a> guide for inclusion to
  158. the guix cookbook.</p></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>