<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://wlair.us.to/feed.xml" rel="self" type="application/atom+xml" /><link href="https://wlair.us.to/" rel="alternate" type="text/html" /><updated>2026-04-16T20:34:56-07:00</updated><id>https://wlair.us.to/feed.xml</id><title type="html">xoddf2’s Blog</title><subtitle>xoddf2&apos;s personal blog</subtitle><author><name>xoddf2</name></author><entry><title type="html">Operating System Thoughts</title><link href="https://wlair.us.to/blog/2025/11/30/os-thoughts/index.html" rel="alternate" type="text/html" title="Operating System Thoughts" /><published>2025-11-30T16:34:00-08:00</published><updated>2025-11-30T16:34:00-08:00</updated><id>https://wlair.us.to/blog/2025/11/30/os-thoughts/os-thoughts</id><content type="html" xml:base="https://wlair.us.to/blog/2025/11/30/os-thoughts/index.html"><![CDATA[<p>A few months ago, I switched from Debian Bookworm with Xfce to <a href="https://fedoraproject.org/workstation/">Fedora Workstation</a> 42.  I have not been entirely satisfied with it.  I also have concerns about some changes in GNU/Linux in general.  (A regular in the BSDs’ subreddits has <a href="https://blog.thechases.com/posts/why-bsds/">complained about this</a>.)</p>

<p>I am considering switching to <a href="https://www.openbsd.org/">OpenBSD</a>.  It has its own issues, but it is improving.  Its performance should be good enough for me by 7.9.</p>

<h3 id="video-acceleration">Video Acceleration</h3>

<p>OpenBSD is slower than GNU/Linux and FreeBSD.  It got <abbr title="Video Acceleration API">VA-API</abbr> support <a href="https://www.undeadly.org/cgi?action=article;sid=20240721165445">just last year</a>.  Chromium and ungoogled-chromium <a href="https://www.undeadly.org/cgi?action=article;sid=20251104063040">recently got VA-API support in -current</a>.  I upgraded a throwaway OpenBSD installation to -current to test this.  Video acceleration worked well under Chromium, even with 1080p60 YouTube videos.  Playback of some videos in mpv also worked with hardware acceleration with <code>hwdec</code> set to <code>auto</code> and <code>profile</code> set to <code>fast</code>.  Even unaccelerated 4K video playback seemed to work better under -current than under 7.8.</p>

<h3 id="hardware-compatibility">Hardware Compatibility</h3>

<p>My <a href="https://bennvenn.myshopify.com/products/usb-gb-c-cart-dumper-the-joey-jr">Joey Jr V2++ Game Boy/Game Boy Color/Game Boy Advance cartridge dumper</a> works under OpenBSD despite it not being officially supported.  <del>(It did not work under FreeBSD when I tried it.)</del>  My <a href="https://hauppauge.com/pages/products/data_usblive2.html">Hauppauge USB-Live2 video capture device</a> does not, but I can probably install Alpine Linux on a USB flash drive or something for that.  Network printing and scanning with a Brother inkjet network printer worked with some configuration.</p>

<h3 id="filesystem">Filesystem</h3>

<p>That leaves OpenBSD’s filesystem (<abbr title="Unix File System">UFS</abbr>/<abbr title="Fast File System">FFS</abbr>2).  I have heard <a href="https://dataswamp.org/~solene/2024-11-15-why-i-stopped-using-openbsd.html#_Reliability">horror</a> <a href="https://old.reddit.com/r/openbsd/comments/1l5yptj/two_questions_about_openbsd/">stories</a> about its reliability, and <a href="https://old.reddit.com/r/openbsd/comments/1hudwhs/future_file_system_for_openbsd/m5ky7gn/?context=3">an OpenBSD developer admitted</a> that UFS/FFS2 was “garbage”.  A <abbr title="Uninterruptible Power Supply">UPS</abbr> would help, but I do not have one.  Frequent backups (which I should do anyway) should help.  (I would store most data on a fileserver running FreeBSD with ZFS if I could, but I have no hardware to use for that.)</p>

<p>[2025-12-09T17:59-0800] <b>Update:</b> The Joey Jr V2++ appears to work under FreeBSD 15.0, according to some bare-minimum testing I did.</p>]]></content><author><name>xoddf2</name></author><category term="computing" /><category term="fedora" /><category term="openbsd" /><summary type="html"><![CDATA[A few months ago, I switched from Debian Bookworm with Xfce to Fedora Workstation 42. I have not been entirely satisfied with it. I also have concerns about some changes in GNU/Linux in general. (A regular in the BSDs’ subreddits has complained about this.)]]></summary></entry><entry><title type="html">You Need a Weather Radio</title><link href="https://wlair.us.to/blog/2024/03/26/need-weather-radio/index.html" rel="alternate" type="text/html" title="You Need a Weather Radio" /><published>2024-03-26T03:41:00-07:00</published><updated>2024-03-26T03:41:00-07:00</updated><id>https://wlair.us.to/blog/2024/03/26/need-weather-radio/need-weather-radio</id><content type="html" xml:base="https://wlair.us.to/blog/2024/03/26/need-weather-radio/index.html"><![CDATA[<p>Almost every home, school, and business in the United States needs a <a href="https://www.weather.gov/nwr/">weather radio</a>.  It is an important piece of safety equipment on par with a smoke detector.</p>

<p><a href="https://www.weather.gov/nwr/">NOAA Weather Radio</a> is a government-run radio network that broadcasts weather information and emergency alerts continuously on a dedicated band of 7 frequencies (162.4–162.55 MHz).  Many weather radio receivers are equipped with alert functionality triggered by the <a href="https://en.wikipedia.org/wiki/Specific_Area_Message_Encoding"><abbr title="Specific Area Message Encoding">SAME</abbr> data bursts</a> or 1050 Hz Warning Alarm Tone.</p>

<p>There are multiple types of weather radios, including nightstand models with SAME alert capability, and emergency models with built-in flashlights, power banks, and the ability to charge the battery from a solar panel or hand crank.</p>

<p><abbr title="Specific Area Message Encoding">SAME</abbr> functionality allows the user to exclude alerts for other counties and/or of certain types.</p>

<p>A weather radio provides alerts when you are asleep and/or not near a television, AM/FM radio, PC, or mobile device.  (Television and AM/FM radio require actively watching or listening to the broadcast.)</p>

<p>I recommend getting a SAME-capable desktop weather radio and then putting it on your nightstand or somewhere else you can hear it.  Configure the SAME-capable weather radio for your county, enable relevant alerts, disable irrelevant alerts (e.g., the flood ones if your home is too high for floodwater to reach), and change the battery annually.  (I prefer to change mine when Daylight Saving Time starts, to give it a fresh battery just before severe weather season.)</p>

<p>I also recommend getting an emergency radio with a solar panel and hand crank for your storm shelter or downstairs closet.</p>

<h3 id="other-methods">Other Methods</h3>

<p>You should also have at least 2 other ways to receive weather alerts in addition to a weather radio, in case one of them fails.</p>

<h4 id="wireless-emergency-alerts">Wireless Emergency Alerts</h4>

<p>Most modern smartphones are capable of receiving <a href="https://en.wikipedia.org/wiki/Wireless_Emergency_Alerts">Wireless Emergency Alerts</a>.  The mobile telephone network is less reliable than NOAA Weather Radio, but you should use WEA anyway as a fallback.  Check your smartphone’s settings.</p>

<h4 id="local-broadcast-media">Local Broadcast Media</h4>

<p>During severe weather, local, news-producing over-the-air television stations interrupt regular programming to cover it.  The coverage includes radar imagery and reports from the station’s storm chasers.  A normal radio station that carries a news or news/talk format may also cover severe weather, which is useful during a power failure.</p>

<p>It is important that the station has a news department, though — music stations on the FM radio band and over-the-air television stations without news departments (usually those not affiliated with the 4 major networks) will often air only the bare-minimum <abbr title="Emergency Alert System">EAS</abbr> relay of an alert, which originates from — you guessed it — NOAA Weather Radio!  Some <a href="https://en.wikipedia.org/wiki/Low-power_broadcasting">low-power stations</a> don’t even <em>have</em> EAS equipment.</p>

<h4 id="weather-web-sites-and-mobile-apps">Weather Web Sites and Mobile Apps</h4>

<p>Trusted weather Web sites and mobile apps can also give alerts.  Internet connectivity often fails during severe weather, though.  Personally, I simply use <a href="https://www.weather.gov/">the National Weather Service’s Web site</a>.</p>

<h4 id="outdoor-warning-sirens">Outdoor Warning Sirens</h4>

<p>This is the absolute worst method.  Sirens are for outdoor use only.  They are not intended to be heard indoors, and the storm itself may make them difficult to hear.  It also provides no additional information.</p>

<h3 id="when-you-receive-a-warning">When You Receive a Warning</h3>

<p>What to do when you receive a warning is outside of the scope of this blog post.  <a href="https://www.weather.gov/safety/">weather.gov’s Safety Tips section</a> should help.</p>

<h3 id="external-links">External Links</h3>

<ul>
  <li><a href="https://web.archive.org/web/20230209031432/http://thevane.gawker.com/you-need-to-buy-a-weather-radio-1718320723">You Need to Buy a Weather Radio</a></li>
  <li><a href="https://www.alabamawx.com/?p=35771">The Siren Mentality</a></li>
  <li><a href="https://ksstorm.info/aware-2021-siren-mentality/">Siren Mentality — It may be more dangerous than the storms</a></li>
</ul>

<p>[2026-04-16T20:30-0700] <b>Update:</b> I removed the Weatheradio Canada information because <a href="https://web.archive.org/web/20260315134337/https://www.ctvnews.ca/sci-tech/article/weatheradio-going-off-the-air-as-environment-canada-moves-emphasis-to-online-and-apps/">Environment and Climate Change Canada discontinued it</a> (RIP 1976–2026).  This post is now applicable only to the US.</p>]]></content><author><name>xoddf2</name></author><category term="other" /><category term="weather" /><summary type="html"><![CDATA[Almost every home, school, and business in the United States needs a weather radio. It is an important piece of safety equipment on par with a smoke detector.]]></summary></entry><entry><title type="html">20 Years of GNU/Linux</title><link href="https://wlair.us.to/blog/2024/02/13/linux-gnu-20/index.html" rel="alternate" type="text/html" title="20 Years of GNU/Linux" /><published>2024-02-13T16:57:00-08:00</published><updated>2024-02-13T16:57:00-08:00</updated><id>https://wlair.us.to/blog/2024/02/13/linux-gnu-20/linux-gnu-20</id><content type="html" xml:base="https://wlair.us.to/blog/2024/02/13/linux-gnu-20/index.html"><![CDATA[<p>20 years ago today, <time datetime="2004-02-13">Friday, 13 February 2004</time>, I finally installed <a href="https://web.archive.org/web/20031204195420/http://www.mandrakesoft.com/products/92/">Mandrake Linux 9.2</a> successfully after various failed attempts within the previous few months (I burned the CDs in late 2003).</p>

<p>I dual-booted between it and an illegitimate Windows XP Professional installation (with a certain infamous volume licensing key), which I was using previously.  For the desktop environment, I used the default KDE 3.1.  I initially expected it to be difficult to connect to the Internet, but it detected my Ethernet card’s settings automatically.  (I initially (falsely) believed it had detected the settings from the Windows XP installation.)  Hardware at this time consisted of a 400 MHz Celeron Mendocino (cf Pentium II) and 128 or 256 MB (I forget which) of RAM, the same PC I had been using since circa 2002.</p>

<p>I have run various other GNU/Linux distributions since then, off-and-on with the BSDs (specifically <a href="https://wlair.us.to/blog/2019/01/09/i-feel-slower-now/index.html">OpenBSD</a> and <a href="https://wlair.us.to/blog/2016/05/16/freebsd-vs-debian-on-nomad/index.html">FreeBSD</a>) starting in 2013.  Those distributions included Fedora (then known as Fedora Core), Ubuntu (including Kubuntu and Xubuntu), Gentoo, Arch, and Slackware.  I am currently a Debian user, having switched back to GNU/Linux from the BSDs because of hardware and software compatibility issues.</p>]]></content><author><name>xoddf2</name></author><category term="computing" /><category term="mandrake" /><summary type="html"><![CDATA[20 years ago today, Friday, 13 February 2004, I finally installed Mandrake Linux 9.2 successfully after various failed attempts within the previous few months (I burned the CDs in late 2003).]]></summary></entry><entry><title type="html">Watch Lost Signal</title><link href="https://wlair.us.to/blog/2023/11/02/watch-lost-signal/index.html" rel="alternate" type="text/html" title="Watch Lost Signal" /><published>2023-11-02T15:47:00-07:00</published><updated>2023-11-02T15:47:00-07:00</updated><id>https://wlair.us.to/blog/2023/11/02/watch-lost-signal/watch-lost-signal</id><content type="html" xml:base="https://wlair.us.to/blog/2023/11/02/watch-lost-signal/index.html"><![CDATA[<p>My <a href="https://en.wikipedia.org/wiki/Casio_Wave_Ceptor">Casio WV-M60 watch</a> has not received a reliable signal from <a href="https://www.nist.gov/pml/time-and-frequency-division/time-distribution/radio-station-wwvb">WWVB</a> in a few months.</p>

<p>Most recent successful sync was at 2023-10-06T03:05-0700, and it displayed the Level 0 receiving indicator that time (3 being the strongest).  At one point, in August, I used the manual receiving feature outdoors, during the day, and it worked fine.  (I even had a shortwave radio tuned to <a href="https://www.nist.gov/pml/time-and-frequency-division/time-distribution/radio-station-wwv">WWV</a>’s 15 MHz signal, and I received a good signal from it.)</p>

<p>I have kept it in my bedroom window the entire time per the manual, and it previously worked properly.  Did atmospheric conditions change?</p>]]></content><author><name>xoddf2</name></author><category term="journal" /><category term="watch" /><category term="wwv" /><summary type="html"><![CDATA[My Casio WV-M60 watch has not received a reliable signal from WWVB in a few months.]]></summary></entry><entry><title type="html">Trackball Button Fixed</title><link href="https://wlair.us.to/blog/2022/09/22/trackball-button-fixed/index.html" rel="alternate" type="text/html" title="Trackball Button Fixed" /><published>2022-09-22T19:00:00-07:00</published><updated>2022-09-22T19:00:00-07:00</updated><id>https://wlair.us.to/blog/2022/09/22/trackball-button-fixed/trackball-button-fixed</id><content type="html" xml:base="https://wlair.us.to/blog/2022/09/22/trackball-button-fixed/index.html"><![CDATA[<p>I just fixed my Logitech TrackMan Marble’s left button.</p>

<p>The button developed an issue where a single-click would register as a double-click, and click-and-drag was unreliable.  I opened the trackball, determined the model number of the button to be D2FC-F-7N, and obtained replacement buttons of that type.</p>

<p>I removed the old button and then soldered in the new one.  A quick check with <a href="https://manpage.me/?q=xev">xev</a> confirmed that the new button worked.</p>

<p>The left button is now reliable again.</p>]]></content><author><name>xoddf2</name></author><category term="computing" /><category term="repair" /><summary type="html"><![CDATA[I just fixed my Logitech TrackMan Marble’s left button.]]></summary></entry><entry><title type="html">xoddf2’s Blog 14.2</title><link href="https://wlair.us.to/blog/2022/04/10/wlair142/index.html" rel="alternate" type="text/html" title="xoddf2’s Blog 14.2" /><published>2022-04-10T19:28:00-07:00</published><updated>2022-04-10T19:28:00-07:00</updated><id>https://wlair.us.to/blog/2022/04/10/wlair142/wlair142</id><content type="html" xml:base="https://wlair.us.to/blog/2022/04/10/wlair142/index.html"><![CDATA[<p>Welcome to xoddf2’s Blog 14.2!</p>

<p>This new version of my Web site features a new name, light and dark themes, and an Archive page.  I also removed some pages.</p>]]></content><author><name>xoddf2</name></author><category term="meta" /><summary type="html"><![CDATA[Welcome to xoddf2’s Blog 14.2!]]></summary></entry><entry><title type="html">Spring Forward 2022</title><link href="https://wlair.us.to/blog/2022/03/13/spring-forward-2022/index.html" rel="alternate" type="text/html" title="Spring Forward 2022" /><published>2022-03-13T00:56:00-08:00</published><updated>2022-03-13T00:56:00-08:00</updated><id>https://wlair.us.to/blog/2022/03/13/spring-forward-2022/spring-forward-2022</id><content type="html" xml:base="https://wlair.us.to/blog/2022/03/13/spring-forward-2022/index.html"><![CDATA[<p>I just reset my clocks for Daylight Saving Time.  I also <a href="https://twitter.com/NWS/status/1502878298296180738">changed</a> the batteries in my <a href="https://midlandusa.com/collections/weather/products/wr-120-weather-radio">weather radio</a>.</p>

<p>As I was setting the clocks, I noticed that the save battery in my copy of <cite>Pokémon Gold Version</cite> was empty.  I soldered a new CR2025 battery into it.  I had installed the old one in October 2011 using the tape method.  (I even had <a href="https://bulbapedia.bulbagarden.net/wiki/Game_system">an NES and Super NES</a> in the old save file.  :-()  That battery lasted a few years longer than I expected, as did the original battery.</p>]]></content><author><name>xoddf2</name></author><category term="journal" /><category term="dst" /><summary type="html"><![CDATA[I just reset my clocks for Daylight Saving Time. I also changed the batteries in my weather radio.]]></summary></entry><entry><title type="html">Back to Irssi</title><link href="https://wlair.us.to/blog/2021/10/28/back-to-irssi/index.html" rel="alternate" type="text/html" title="Back to Irssi" /><published>2021-10-28T07:58:00-07:00</published><updated>2021-10-28T07:58:00-07:00</updated><id>https://wlair.us.to/blog/2021/10/28/back-to-irssi/back-to-irssi</id><content type="html" xml:base="https://wlair.us.to/blog/2021/10/28/back-to-irssi/index.html"><![CDATA[<p>For several years, I used <a href="https://irssi.org/">Irssi</a> in <a href="https://tmux.github.io/">tmux</a> on a <a href="https://en.wikipedia.org/wiki/Shell_account">shell server</a>.  A few months ago, I started using <a href="https://github.com/emacs-circe/circe">Circe</a> as my IRC client (connected to a <a href="https://wiki.znc.in/ZNC">ZNC</a> bouncer) after a brief stint with <a href="https://en.wikipedia.org/wiki/ERC_(software)">ERC</a>.  Circe had various issues:</p>

<ul>
  <li>Basic features, such as the display of my current nick, current channel modes, and <code class="language-plaintext highlighter-rouge">/LIST</code>, were not implemented.</li>
  <li>The tab completion omitted the colon after the nick, even with <code class="language-plaintext highlighter-rouge">circe-completion-suffix</code> set to the default <code class="language-plaintext highlighter-rouge">: </code>.  It also occasionally gave odd tab completion suggestions based on obscure substrings.</li>
  <li>The currently focused channel(s) still appeared in the tracker regardless of <code class="language-plaintext highlighter-rouge">lui-track-behavior</code>’s value.</li>
  <li>Even with <code class="language-plaintext highlighter-rouge">circe-lagmon-mode</code>, Circe did not reconnect to my bouncer after losing the network connection.</li>
  <li><code class="language-plaintext highlighter-rouge">circe-lagmon-mode</code> did not work with some servers.</li>
  <li><code class="language-plaintext highlighter-rouge">circe-lagmon-mode</code> would cause Circe to spam “<code class="language-plaintext highlighter-rouge">*** User away: &lt;current nick&gt;</code>” when I was set as away, at least with multiple instances of Circe running.</li>
  <li>Circe would set my away message to my nick instead of what I typed as an argument to <code class="language-plaintext highlighter-rouge">/[G]AWAY</code>.</li>
  <li>The topic was not always visible <em>à la</em> Irssi, WeeChat, or ERC’s top bar.  I would rather not type <code class="language-plaintext highlighter-rouge">/TOPIC</code> constantly.</li>
  <li>WHOIS output would appear in random buffers.</li>
</ul>

<p>Early this month, I switched back to Irssi (with ZNC this time) after getting tired of Circe’s bugs.  With multiple clients at least, it is not as good as bare Irssi in a terminal multiplexer, but it works better than Circe did.</p>]]></content><author><name>xoddf2</name></author><category term="computing" /><category term="rant" /><category term="irc" /><category term="irssi" /><category term="circe" /><category term="emacs" /><summary type="html"><![CDATA[For several years, I used Irssi in tmux on a shell server. A few months ago, I started using Circe as my IRC client (connected to a ZNC bouncer) after a brief stint with ERC. Circe had various issues:]]></summary></entry><entry><title type="html">Now with HTTPS Support (finally!)</title><link href="https://wlair.us.to/blog/2020/12/08/now-https-support/index.html" rel="alternate" type="text/html" title="Now with HTTPS Support (finally!)" /><published>2020-12-08T12:53:00-08:00</published><updated>2020-12-08T12:53:00-08:00</updated><id>https://wlair.us.to/blog/2020/12/08/now-https-support/now-https-support</id><content type="html" xml:base="https://wlair.us.to/blog/2020/12/08/now-https-support/index.html"><![CDATA[<p>wlair.us.to now supports HTTPS.  Insecure plain HTTP is still supported for compatibility with older software.</p>

<p>Implementing it was <a href="https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.html#enabling-lets-encrypt-integration-for-your-custom-domain">easier than I expected</a>.  I ran into <a href="https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.html#troubleshooting">a “Something went wrong” error</a> at first, but retrying worked.</p>

<p>I had wanted to support HTTPS <a href="https://wlair.us.to/blog/2019/01/09/wlair141/index.html">for a long while</a>, and it has finally happened.</p>]]></content><author><name>xoddf2</name></author><category term="meta" /><summary type="html"><![CDATA[wlair.us.to now supports HTTPS. Insecure plain HTTP is still supported for compatibility with older software.]]></summary></entry><entry><title type="html">My Email Setup</title><link href="https://wlair.us.to/blog/2020/01/09/my-email-setup/index.html" rel="alternate" type="text/html" title="My Email Setup" /><published>2020-01-09T04:10:00-08:00</published><updated>2020-01-09T04:10:00-08:00</updated><id>https://wlair.us.to/blog/2020/01/09/my-email-setup/my-email-setup</id><content type="html" xml:base="https://wlair.us.to/blog/2020/01/09/my-email-setup/index.html"><![CDATA[<p>For the past few months, I have used the following <a href="https://en.wikipedia.org/wiki/Email_agent_(infrastructure)">email setup</a>:</p>

<p>Incoming mail → <a href="http://isync.sourceforge.net/">mbsync</a> (<abbr title="Mail Retrieval Agent">MRA</abbr>) → <a href="http://www.djcbsoftware.nl/code/mu/">mu</a> (email indexer) → <a href="http://www.djcbsoftware.nl/code/mu/mu4e.html">mu4e</a> (<abbr title="Mail User Agent">MUA</abbr>) → <a href="https://marlam.de/msmtp/">msmtp</a> (<abbr title="Simple Mail Transfer Protocol">SMTP</abbr> client) → Outgoing mail</p>

<h3 id="summary">Summary</h3>

<ul>
  <li><strong>mbsync</strong> synchronises the local maildirs via <abbr title="Internet Message Access Protocol">IMAP</abbr> with the email accounts themselves.  <a href="https://twitter.com/woddfellow2/status/1174062483801300994">I found it to be faster</a> than OfflineIMAP.</li>
  <li><strong>mu</strong> indexes messages and makes them easier to search.</li>
  <li><strong>mu4e</strong> is the Emacs-based email client included with mu.</li>
  <li><strong>msmtp</strong> sends outgoing messages over SMTP.</li>
</ul>

<h3 id="setup">Setup</h3>

<h4 id="installation">Installation</h4>

<p>First, install the relevant tools.  Under Debian, one would install the following packages:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># apt install isync mu4e msmtp
</code></pre></div></div>

<h4 id="preparation">Preparation</h4>

<p>Next, create the directories that will contain your maildirs.  Change the path and account names to match your preferences:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mkdir -p ~/Mail/{Main,Personal,Work}
</code></pre></div></div>

<p>I also recommend creating your signature blocks at this point.  This tutorial uses files in <code class="language-plaintext highlighter-rouge">~/doc/signatures</code> as an example.  See the <code class="language-plaintext highlighter-rouge">message-signature-file</code> variables in the below mu4e config for examples.</p>

<h4 id="configuring-mbsync">Configuring mbsync</h4>

<p>Write your <code class="language-plaintext highlighter-rouge">~/.mbsyncrc</code>.  Here is an example for 3 accounts:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>IMAPAccount Main
Host imap.example.net
User foo@example.net
Pass hunter2
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

IMAPStore Main-remote
Account Main

MaildirStore Main-local
Path ~/Mail/Main/
Inbox ~/Mail/Main/inbox

Channel Main-default
Master :Main-remote:
Slave :Main-local:Inbox

Channel Main-sent
Master :Main-remote:"[Gmail]/Sent Mail"
slave :Main-local:Sent

Channel Main-trash
Master :Main-remote:"[Gmail]/Trash"
slave :Main-local:Trash

Channel Main-archive
Master :Main-remote:"[Gmail]/All Mail"
slave :Main-local:All

Channel Main-junk
Master :Main-remote:"[Gmail]/Spam"
slave :Main-local:Junk

Channel Main-drafts
Master :Main-remote:"[Gmail]/Drafts"
slave :Main-local:Drafts

Create Both
Expunge Both
SyncState *

Group Main
Channel Main-default
Channel Main-sent
Channel Main-trash
Channel Main-archive
Channel Main-junk

IMAPAccount Personal
Host imap.example.net
User bar@example.net
Pass hunter2
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

IMAPStore Personal-remote
Account Personal

MaildirStore Personal-local
Path ~/Mail/Personal/
Inbox ~/Mail/Personal/inbox

Channel Personal-default
Master :Personal-remote:
Slave :Personal-local:Inbox

Channel Personal-sent
Master :Personal-remote:"[Gmail]/Sent Mail"
slave :Personal-local:Sent

Channel Personal-trash
Master :Personal-remote:"[Gmail]/Trash"
slave :Personal-local:Trash

Channel Personal-archive
Master :Personal-remote:"[Gmail]/All Mail"
slave :Personal-local:All

Channel Personal-junk
Master :Personal-remote:"[Gmail]/Spam"
slave :Personal-local:Junk

Channel Personal-sent
Master :Personal-remote:"[Gmail]/Sent Mail"
slave :Personal-local:Sent

Create Both
Expunge Both
SyncState *

Group Personal
Channel Personal-default
Channel Personal-sent
Channel Personal-trash
Channel Personal-archive
Channel Personal-junk

IMAPAccount Work
Host imap.example.net
User baz@example.net
Pass hunter2
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt

IMAPStore Work-remote
Account Work

MaildirStore Work-local
Path ~/Mail/Work/
Inbox ~/Mail/Work/inbox

Channel Work-default
Master :Work-remote:
Slave :Work-local:Inbox

Channel Work-sent
Master :Work-remote:"[Gmail]/Sent Mail"
slave :Work-local:Sent

Channel Work-trash
Master :Work-remote:"[Gmail]/Trash"
slave :Work-local:Trash

Channel Work-archive
Master :Work-remote:"[Gmail]/All Mail"
slave :Work-local:All

Channel Work-junk
Master :Work-remote:"[Gmail]/Spam"
slave :Work-local:Junk

Channel Work-drafts
Master :Work-remote:"[Gmail]/Drafts"
slave :Work-local:Drafts

Create Both
Expunge Both
SyncState *

Group Work
Channel Work-default
Channel Work-sent
Channel Work-trash
Channel Work-archive
Channel Work-junk
</code></pre></div></div>

<p>The location of <code class="language-plaintext highlighter-rouge">CertificateFile</code> may vary based on your system.</p>

<p>Finally, make <code class="language-plaintext highlighter-rouge">~/.mbsyncrc</code> readable and writable only by the owner, for privacy:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ chmod 600 ~/.mbsyncrc
</code></pre></div></div>

<h4 id="configuring-msmtp">Configuring msmtp</h4>

<p><code class="language-plaintext highlighter-rouge">~/.msmtprc</code> should look something like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log

# Main
account Main
host smtp.example.net
port 587
from foo@example.net
user foo@example.net
password hunter2

# Personal
account Personal
host smtp.example.net
port 587
from bar@example.net
user bar@example.net
password hunter2

# Work
account Work
host smtp.example.net
port 587
from baz@example.net
user baz@example.net
password hunter2

account default : Main
</code></pre></div></div>

<p>As with mbsync’s <code class="language-plaintext highlighter-rouge">CertificateFile</code>, the location of <code class="language-plaintext highlighter-rouge">tls_trust_file</code> may vary based on your system.</p>

<p>As with <code class="language-plaintext highlighter-rouge">~/.mbsyncrc</code> above, you should make <code class="language-plaintext highlighter-rouge">~/.msmtprc</code> readable and writable only by the owner.  <strong>This is especially important with msmtp, as it will refuse to run otherwise.</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ chmod 600 ~/.msmtprc
</code></pre></div></div>

<h5 id="msmtpqueue">msmtpqueue</h5>

<p><strong>msmtpqueue</strong> is a small collection of scripts to queue outgoing messages and then send them later.  Under Debian, it is available in <code class="language-plaintext highlighter-rouge">/usr/share/doc/msmtp/examples/msmtpqueue</code>.  I copied the scripts to my personal <code class="language-plaintext highlighter-rouge">~/local/bin</code> directory and then edited them for my own use.  See <code class="language-plaintext highlighter-rouge">/usr/share/doc/msmtp/examples/msmtpqueue/README</code> for more information.</p>

<p>There is also <code class="language-plaintext highlighter-rouge">msmtpq</code>, which I have not tried.</p>

<h4 id="configuring-mu4e">Configuring mu4e</h4>

<p>mu4e is configured in your Emacs init file.  Here is an example:</p>

<div class="language-emacs-lisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nb">require</span> <span class="ss">'mu4e</span><span class="p">)</span>

<span class="c1">;; Make mu4e Emacs's default email client</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">read-mail-command</span> <span class="ss">'mu4e</span>
      <span class="nv">mail-user-agent</span> <span class="ss">'mu4e-user-agent</span><span class="p">)</span>

<span class="c1">;; Where the messages are</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-maildir</span> <span class="s">"~/Mail"</span><span class="p">)</span>

<span class="c1">;; How to get mail</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-get-mail-command</span> <span class="s">"mbsync -a"</span>
      <span class="nv">mu4e-update-interval</span> <span class="mi">300</span><span class="p">)</span>

<span class="c1">;; How to send mail</span>
<span class="c1">;; (Be sure to point sendmail-program to the proper path for msmtp-enqueue.sh!)</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">message-send-mail-function</span> <span class="ss">'message-send-mail-with-sendmail</span>
      <span class="nv">sendmail-program</span> <span class="s">"/home/user/bin/msmtp-enqueue.sh"</span><span class="p">)</span>

<span class="c1">;; Gmail needs this</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-sent-messages-behavior</span> <span class="ss">'delete</span><span class="p">)</span>

<span class="c1">;; Display To: header in headers view</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-headers-fields</span> <span class="o">'</span><span class="p">((</span><span class="ss">:human-date</span> <span class="o">.</span> <span class="mi">12</span><span class="p">)</span>
                            <span class="p">(</span><span class="ss">:flags</span> <span class="o">.</span> <span class="mi">6</span><span class="p">)</span>
                            <span class="p">(</span><span class="ss">:from</span> <span class="o">.</span> <span class="mi">15</span><span class="p">)</span>
                            <span class="p">(</span><span class="ss">:to</span> <span class="o">.</span> <span class="mi">12</span><span class="p">)</span>
                            <span class="p">(</span><span class="ss">:subject</span><span class="p">)))</span>

<span class="c1">;; Bookmarks</span>
<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-bookmarks</span>
      <span class="o">`</span><span class="p">(</span> <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Unread messages"</span>
           <span class="ss">:query</span> <span class="s">"flag:unread AND NOT \"maildir:/Main/Junk\" AND NOT \"maildir:/Personal/Junk\" AND NOT \"maildir:/Work/Junk\""</span>
           <span class="ss">:key</span> <span class="nv">?u</span><span class="p">)</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Today's messages"</span>
           <span class="ss">:query</span> <span class="s">"date:today..now AND NOT \"maildir:/Main/Junk\" AND NOT \"maildir:/Personal/Junk\" AND NOT \"maildir:/Work/Junk\""</span>
           <span class="ss">:key</span> <span class="nv">?t</span><span class="p">)</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Last 7 days"</span>
           <span class="ss">:query</span> <span class="s">"date:7d..now AND NOT \"maildir:/Main/Junk\" AND NOT \"maildir:/Personal/Junk\" AND NOT \"maildir:/Work/Junk\""</span>
           <span class="ss">:key</span> <span class="nv">?w</span><span class="p">)</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Inboxes"</span>
           <span class="ss">:query</span> <span class="s">"\"maildir:/Main/INBOX\" OR \"maildir:/Personal/INBOX\" OR \"maildir:/Work/INBOX\""</span>
           <span class="ss">:key</span> <span class="nv">?i</span><span class="p">)</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Sent messages"</span>
           <span class="ss">:query</span> <span class="s">"\"maildir:/Main/Sent\" OR \"maildir:/Personal/Sent\" OR \"maildir:/Work/Sent\""</span>
           <span class="ss">:key</span> <span class="nv">?s</span><span class="p">)</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-bookmark</span>
           <span class="ss">:name</span> <span class="s">"Spam"</span>
           <span class="ss">:query</span> <span class="s">"\"maildir:/Main/Junk\" OR \"maildir:/Personal/Junk\" OR \"maildir:/Work/Junk\""</span>
           <span class="ss">:key</span> <span class="nv">?j</span><span class="p">)))</span>
</code></pre></div></div>

<p>For multiple email accounts, we will use <a href="http://www.djcbsoftware.nl/code/mu/mu4e/Contexts.html">contexts</a>.  If you publish your Emacs config, e.g., in version control, <em>be aware that this section will contain passwords and other personally identifiable information</em>.</p>

<div class="language-emacs-lisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nb">require</span> <span class="ss">'mu4e-context</span><span class="p">)</span>

<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-contexts</span>
      <span class="o">`</span><span class="p">(</span> <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-context</span>
           <span class="ss">:name</span> <span class="s">"Main"</span>
           <span class="ss">:enter-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span> <span class="p">(</span><span class="nv">mu4e-message</span> <span class="s">"Entering Main context"</span><span class="p">))</span>
           <span class="ss">:leave-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span> <span class="p">(</span><span class="nv">mu4e-message</span> <span class="s">"Leaving Main context"</span><span class="p">))</span>
           <span class="ss">:match-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">(</span><span class="nv">msg</span><span class="p">)</span>
                         <span class="p">(</span><span class="nb">when</span> <span class="nv">msg</span>
                           <span class="p">(</span><span class="nv">mu4e-message-contact-field-matches</span> <span class="nv">msg</span> <span class="ss">:to</span> <span class="s">"foo@example.net"</span><span class="p">)))</span>
           <span class="ss">:vars</span> <span class="o">'</span><span class="p">((</span><span class="nv">user-email-address</span> <span class="o">.</span> <span class="s">"foo@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-mail-address</span> <span class="o">.</span> <span class="s">"foo@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-full-name</span> <span class="o">.</span> <span class="s">"Someone"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-sent-folder</span> <span class="o">.</span> <span class="s">"/Main/Sent"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-drafts-folder</span> <span class="o">.</span> <span class="s">"/Main/Drafts"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-trash-folder</span> <span class="o">.</span> <span class="s">"/Main/Trash"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-refile-folder</span> <span class="o">.</span> <span class="s">"/Main/All"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">message-sendmail-extra-arguments</span> <span class="o">.</span> <span class="s">"-a Main"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mail-host-address</span> <span class="o">.</span> <span class="s">"example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-compose-signature</span> <span class="o">.</span> <span class="p">(</span><span class="nv">with-temp-buffer</span> <span class="p">(</span><span class="nv">insert-file-contents</span> <span class="s">"~/doc/signatures/Main"</span><span class="p">)</span> <span class="p">(</span><span class="nv">buffer-string</span><span class="p">)))</span>
                   <span class="p">(</span><span class="nv">message-signature-file</span> <span class="o">.</span> <span class="s">"~/doc/signatures/Main"</span><span class="p">)))</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-context</span>
           <span class="ss">:name</span> <span class="s">"Personal"</span>
           <span class="ss">:enter-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span> <span class="p">(</span><span class="nv">mu4e-message</span> <span class="s">"Switch to the Personal context"</span><span class="p">))</span>
           <span class="ss">:match-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">(</span><span class="nv">msg</span><span class="p">)</span>
                         <span class="p">(</span><span class="nb">when</span> <span class="nv">msg</span>
                           <span class="p">(</span><span class="nv">mu4e-message-contact-field-matches</span> <span class="nv">msg</span> <span class="ss">:to</span> <span class="s">"bar@example.net"</span><span class="p">)))</span>
           <span class="ss">:vars</span> <span class="o">'</span><span class="p">((</span><span class="nv">user-email-address</span> <span class="o">.</span> <span class="s">"bar@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-mail-address</span> <span class="o">.</span> <span class="s">"bar@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-full-name</span> <span class="o">.</span> <span class="s">"John Smith"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-sent-folder</span> <span class="o">.</span> <span class="s">"/Personal/Sent"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-drafts-folder</span> <span class="o">.</span> <span class="s">"/Personal/Drafts"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-trash-folder</span> <span class="o">.</span> <span class="s">"/Personal/Trash"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-refile-folder</span> <span class="o">.</span> <span class="s">"/Personal/All"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">message-sendmail-extra-arguments</span> <span class="o">.</span> <span class="s">"-a Personal"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mail-host-address</span> <span class="o">.</span> <span class="s">"example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-compose-signature</span> <span class="o">.</span> <span class="p">(</span><span class="nv">with-temp-buffer</span> <span class="p">(</span><span class="nv">insert-file-contents</span> <span class="s">"~/doc/signatures/Personal"</span><span class="p">)</span> <span class="p">(</span><span class="nv">buffer-string</span><span class="p">)))</span>
                   <span class="p">(</span><span class="nv">message-signature-file</span> <span class="o">.</span> <span class="s">"~/doc/signatures/Personal"</span><span class="p">)))</span>
         <span class="o">,</span><span class="p">(</span><span class="nv">make-mu4e-context</span>
           <span class="ss">:name</span> <span class="s">"Work"</span>
           <span class="ss">:enter-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">()</span> <span class="p">(</span><span class="nv">mu4e-message</span> <span class="s">"Switch to the Work context"</span><span class="p">))</span>
           <span class="ss">:match-func</span> <span class="p">(</span><span class="k">lambda</span> <span class="p">(</span><span class="nv">msg</span><span class="p">)</span>
                         <span class="p">(</span><span class="nb">when</span> <span class="nv">msg</span>
                           <span class="p">(</span><span class="nv">mu4e-message-contact-field-matches</span> <span class="nv">msg</span> <span class="ss">:to</span> <span class="s">"baz@example.net"</span><span class="p">)))</span>
           <span class="ss">:vars</span> <span class="o">'</span><span class="p">((</span><span class="nv">user-email-address</span> <span class="o">.</span> <span class="s">"baz@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-mail-address</span> <span class="o">.</span> <span class="s">"baz@example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">user-full-name</span> <span class="o">.</span> <span class="s">"John Smith"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-sent-folder</span> <span class="o">.</span> <span class="s">"/Work/Sent"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-drafts-folder</span> <span class="o">.</span> <span class="s">"/Work/Drafts"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-trash-folder</span> <span class="o">.</span> <span class="s">"/Work/Trash"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-refile-folder</span> <span class="o">.</span> <span class="s">"/Work/All"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">message-sendmail-extra-arguments</span> <span class="o">.</span> <span class="s">"-a Work"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mail-host-address</span> <span class="o">.</span> <span class="s">"example.net"</span><span class="p">)</span>
                   <span class="p">(</span><span class="nv">mu4e-compose-signature</span> <span class="o">.</span> <span class="p">(</span><span class="nv">with-temp-buffer</span> <span class="p">(</span><span class="nv">insert-file-contents</span> <span class="s">"~/doc/signatures/Work"</span><span class="p">)</span> <span class="p">(</span><span class="nv">buffer-string</span><span class="p">)))</span>
                   <span class="p">(</span><span class="nv">message-signature-file</span> <span class="o">.</span> <span class="s">"~/doc/signatures/Work"</span><span class="p">)))))</span>

<span class="p">(</span><span class="k">setq</span> <span class="nv">mu4e-context-policy</span> <span class="ss">'pick-first</span>
      <span class="nv">mu4e-compose-context-policy</span> <span class="ss">'ask</span><span class="p">)</span>
</code></pre></div></div>

<h3 id="initialisation">Initialisation</h3>

<p>Synchronise the maildirs and then index the messages:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mbsync -a
$ mu index --maildir="$HOME/Mail"
</code></pre></div></div>

<h3 id="cronjobs">cronjobs</h3>

<p>You can have <code class="language-plaintext highlighter-rouge">cron</code> synchronise your maildirs and send pending messages automatically.  Put this shell script in <code class="language-plaintext highlighter-rouge">~/bin</code> or a similar directory, name it <code class="language-plaintext highlighter-rouge">get-send-mail</code> (or similar), and make it executable with <code class="language-plaintext highlighter-rouge">chmod +x</code>:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>

<span class="c"># Check if we are online; replace with something more appropriate for your setup</span>
ping <span class="nt">-c</span> 1 <span class="nt">-w</span> 2 example.net <span class="o">&gt;</span> /dev/null

<span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$?</span><span class="s2">"</span> <span class="nt">-eq</span> 0 <span class="o">]</span><span class="p">;</span> <span class="k">then
	</span>mbsync <span class="nt">-aq</span>
	/home/user/bin/msmtp-runqueue.sh <span class="o">&gt;</span> /dev/null
<span class="k">fi</span>
</code></pre></div></div>

<p>Be sure to point to the proper path for <code class="language-plaintext highlighter-rouge">msmtp-runqueue.sh</code>.  You can now put something like this in your crontab:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>@reboot /home/user/bin/get-send-mail
*/5 * * * * /home/user/bin/get-send-mail
</code></pre></div></div>

<p>It should run at boot and every 5 minutes.</p>

<h3 id="usage">Usage</h3>

<p>Simply restart Emacs, and then start mu4e with <kbd>M-x mu4e</kbd>.  For more information, see the <a href="http://www.djcbsoftware.nl/code/mu/mu4e/">mu4e manual</a>: <code class="language-plaintext highlighter-rouge">(info "(mu4e)")</code></p>]]></content><author><name>xoddf2</name></author><category term="computing" /><category term="email" /><category term="mu4e" /><summary type="html"><![CDATA[For the past few months, I have used the following email setup:]]></summary></entry></feed>