hosting-your-own-email-part-2.html 4.7 KB

1234567891011121314151617181920212223242526
  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>Hosting your Own Email Part 2 — 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>Hosting your Own Email Part 2</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — June 15, 2021</h3><div><h1>PROJECT My current plans for hosting email accounts</h1><h2>There are three basic vocab to know for setting up an email server</h2><ul><li>a mail transfer agent (MTA) receives and sends email (opensmtpd)</li><li>a mail delivery agent (MDA), which gets the email from the MTA,
  2. and stores it for a user. The easiest way is to use opensmtpd as
  3. the MDA. BUT dovecot is a better MDA, because dovecot can set up
  4. mail filtering and maybe better spam filtering.</li><li>Remote users can access the emails via an MUA (mail user agent),
  5. via an IMAP server. (dovecot)</li></ul><h2>My current <em>simple</em> strategy for hosting a few email accounts</h2><p>I plan on offering paid email accounts on gnucode.me, or your own domain.
  6. So your next email could be &quot;YourName@gnucode.me&quot; or
  7. &quot;wilycatperson@YourDomain.com&quot;. The following is an explanation of how it
  8. will all work together. It is intended for anyone else wanting to set up
  9. an email server for a <em>few email accounts.</em></p><p>Opensmtpd is my MTA (mail transfer agent), so it sends and receives email
  10. via smtp. Also, opensmtpd uses rspamd (or bogofilter) to limit spam.</p><p>Dovecot will serve my emails. For now I will set up emails in the maildir
  11. format, because this is easy to do. Eventually, I will store email in the
  12. <a href="https://doc.dovecot.org/admin_manual/mailbox_formats/dbox/">dbox format.</a></p><ul><li><code>imap.gnucode.me</code> will be where dovecot serves emails</li><li><code>smtp.gnucode.me</code> will be where opensmtp sends and receives email</li></ul><h3>The <em>simple</em> directory structure I will use to host <em>a few</em> email accounts</h3><p>I will have a few email accounts at gnucode.me <code>&lt;users&gt;@gnucode.me</code>.
  13. postmaster AT gnucode.me will point to my main user AT gnucode.me.</p><p>My email will be hosted at: <code>/home/&lt;user&gt;/Maildir</code></p><p>I will tell dovecot to serve emails from the above
  14. <a href="https://doc.dovecot.org/settings/core/?highlight=mail_location#setting-mail-location">directory</a>
  15. via a <a href="https://doc.dovecot.org/configuration_manual/config_file/config_variables/#variables-mail-user">config
  16. variable:</a></p><pre><code>(dovecot-service #:config
  17. (dovecot-configuration (mail-location &quot;maildir:~/%n/Maildir&quot;)))</code></pre><p>By default both opensmtpd and dovecot use regular login username
  18. authentication. So my username and password that I login via email is the
  19. same password that I use to login via ssh. So my email config for
  20. gnucode.me should look like this for gnus:</p><pre><code>(nnimap &quot;gnucode.me&quot;
  21. (nnimap-stream ssl)
  22. (nnimap-address &quot;imap.gnucode.me&quot;)
  23. (nnimap-user &quot;joshua&quot;))</code></pre><h2>Some difficulties</h2><ul><li><p>I login via &quot;joshua&quot; and &lt;password&gt;. I would prefer to login via joshua AT
  24. gnucode.me. That way I can distinguish joshua AT gnucode.me and joshua AT
  25. propernaming.org</p></li><li><p>The above explanation strategy delivers all emails to /home/joshua/Maildir,
  26. which essentially limits my total email accounts to one.</p></li><li><p>The above has no spam filtering or email filtering.</p></li></ul></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>