12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <!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>Reading my email on the Hurd — 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="business-ideas.html">Business-ideas</a></li><li><a href="about.html">About</a></li></ul></nav></header><h1>Reading my email on the Hurd</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — July 11, 2022</h3><div><p>;tldr The video of all of this blog post is available here:</p><p><a href="https://video.hardlimit.com/w/18NHmZA5sNEgVrZhoq7xna">https://video.hardlimit.com/w/18NHmZA5sNEgVrZhoq7xna</a></p><p>So recently I re-set up my Emacs to send email. I usually use Emacs’ Gnus
- mode for reading mailing lists. I have yet to find a better tool to process the
- sheer amount of email that mailing lists through at you. Gnus is cool, but
- it’s also a Turing tarpit (that’s another blog post).</p><p>So, if you dear reader want to check your mailing lists via Emacs’ Gnus in a
- Hurd vm, here’s what you want to do:</p><pre><code>$ wget https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/debian-hurd.img.tar.gz
- $ tar -xz < debian-hurd.img.tar.gz</code></pre><p>Modify my command to start your Hurd vm to your liking:</p><pre><code>qemu-system-i386 -m 4G \
- -drive format=raw,cache=writeback,file=./debian-hurd-20220331.img \
- -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000 \
- -no-reboot --enable-kvm</code></pre><p>Now that you have the Hurd running in a vm, install emacs and msmtp!</p><pre><code>sudo apt-get install emacs msmtp</code></pre><p>Configure msmtp: <a href="https://wiki.archlinux.org/title/Msmtp">https://wiki.archlinux.org/title/Msmtp</a></p><p>That means put in this inside your ~/.msmtprc. Change the values to what you
- need. Check the wiki link above. The arch wiki is awesome!</p><pre><code># Example for a user configuration file ~/.msmtprc
- #
- # Set default values for all following accounts.
- defaults
- # Use the mail submission port 587 instead of the SMTP port 25.
- port 587
- # Always use TLS.
- tls on
- # Set a list of trusted CAs for TLS. The default is to use system settings, but
- # you can select your own file.
- tls_trust_file /etc/ssl/certs/ca-certificates.crt
- logfile ~/.msmtp.log
- # A dismail account
- account dismail.de
- # Host name of the SMTP server
- host smtp.dismail.de
- # Envelope-from address
- from jbranso@dismail.de
- # Authentication. The password is given using one of five methods, see below.
- auth on
- user jbranso@dismail.de
- # Password method 3: Store the password directly in this file. Usually it is not
- # a good idea to store passwords in plain text files. If you do it anyway, at
- # least make sure that this file can only be read by yourself.
- password ReallyAwesomePassword!
- # Set a default account
- account default : dismail.de
- sudo chmod og-rwx ~/.msmtprc</code></pre><p>Now you can test make sure that you can send email via msmtp. Check the
- archlinux wiki page for how to test to see if msmtp works.</p><p>Now decide where you want your emacs init file: “~/.emacs” or
- “~/.emacs.d/init.el”.</p><pre><code>mkdir ~/.emacs.d
- emacs ~/.emacs.d/init.el</code></pre><p>And you will put this into your emacs:</p><pre><code>;; Some functionality uses this to identify you, e.g. GPG configuration, email
- ;; clients, file templates and snippets.
- (setq user-full-name "Joshua Branson"
- user-mail-address "jbranso@dismail.de")
- ;; gmail is "imap.dismail.de"
- ;; fastmail.com is a great paid email solution!
- (setq gnus-select-method '(nnimap "imap.dismail.de"))
- ;; use msmtp
- ;; from the emacs wiki: https://www.emacswiki.org/emacs/GnusMSMTP
- (setq message-send-mail-function 'message-send-mail-with-sendmail)
- ;; we substitute sendmail with msmtp
- (setq sendmail-program "/usr/bin/msmtp")
- ;; This is needed to allow msmtp to do its magic:
- (setq message-sendmail-f-is-evil 't)
- ;;need to tell msmtp which account we're using
- (setq message-sendmail-extra-arguments '("--read-envelope-from"))
- ;; This is optional, but highly reccommended.
- ;; save email replies to my Sent folder
- (setq gnus-posting-styles
- `((".*"
- ;; between the "+" and the ":" put the string for
- ;; gnus-select-method
- (gcc "\"nnimap+imap.dismail.de:Sent\"")
- ;; I use this next line for my dismail filter to mark as read archived messages
- ;; that gnus sends to my Sent folder.
- ;; this next line is optional. You may delete it.
- ("X-Gnus-Sucks" "I know man")
- )))</code></pre><p>Restart Emacs, and <code>M-x m</code> your first email!</p><p><code>M-x Gnus</code> starts Gnus for the first time. You might need to read the manual or
- check out a youtube video online to help you set up Gnus for the first time.</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>
|