Michael-John TurnerJekyll2016-04-11T21:01:56+01:00https://mjturner.net/Michael-John Turnerhttps://mjturner.net/mj@mjturner.nethttps://mjturner.net/blog/2016/04/11/fixing-opensmtpd-queue-entries2016-04-11T19:33:10+01:002016-04-11T19:33:10+01:00Michael-John Turnerhttps://mjturner.netmj@mjturner.net
<p>I recently ran into a problem with OpenSMTPD on one of my OpenBSD systems. Due to a misconfiguration
there were a number of entries in the mail queue with the wrong smarthost defined - unfortunately
this information is stored in the queue itself and changing <code class="highlighter-rouge">smtpd.conf</code>
doesn’t update the queue entries.</p>
<p>Fixing it is easy enough:</p>
<ol>
<li>
<p>Shut down OpenSMTPD.</p>
<div class="highlighter-rouge"><pre class="highlight"><code> # /etc/rc.d/smtpd stop
</code></pre>
</div>
</li>
<li>
<p>Edit the spool files - they’re in <code class="highlighter-rouge">/var/spool/smtpd/queue/*</code>, one per email. You need to replace the <code class="highlighter-rouge">mta-relay</code> entry with the correct value. If it’s not there, add it at the bottom of the file, along with the relevant <code class="highlighter-rouge">mta-relay-flags</code>:</p>
<blockquote>
<p>mta-relay: tls://smtp.example.com<br />
mta-relay-flags: tls</p>
</blockquote>
</li>
<li>
<p>Start smtpd</p>
<div class="highlighter-rouge"><pre class="highlight"><code> # /etc/rc.d/smtpd start
</code></pre>
</div>
</li>
<li>
<p>Restart the queue</p>
<div class="highlighter-rouge"><pre class="highlight"><code> # smtpctl schedule all
</code></pre>
</div>
</li>
</ol>
<p>Simple!</p>
<p><a href="https://mjturner.net/blog/2016/04/11/fixing-opensmtpd-queue-entries/">Fixing OpenSMTPD Queue Entries</a> was originally published by Michael-John Turner at <a href="https://mjturner.net">Michael-John Turner</a> on April 11, 2016.</p>
https://mjturner.net/blog/2016/04/09/the-new-old-thing2016-04-09T19:00:15+01:002016-04-09T19:00:15+01:00Michael-John Turnerhttps://mjturner.netmj@mjturner.net
<p>Welcome to my new site!</p>
<p>I’ve finally completed the migration of this site from the tired old
mix of ten year old static HTML and Wordpress to something a lot more
flexible and manageable. This new architecture also means I’ll be able
to post a lot more frequently.</p>
<p>I never really liked my old site, so I’ve taken the decision to remove
the majority of the old content. Unfortunately this means that old links no
longer work, and I know that’s a <em>bad thing</em>, but there was really no other way.
I have added redirections for the RSS feeds, however, so if you’re reading this
via a feed reader it should work.</p>
<p>If not, please <a href="/contact">let me know</a>.</p>
<p>Post title shameless stolen from <a href="http://blogs.msdn.com/b/oldnewthing/">Raymond Chen</a>.</p>
<p><a href="https://mjturner.net/blog/2016/04/09/the-new-old-thing/">The New Old Thing</a> was originally published by Michael-John Turner at <a href="https://mjturner.net">Michael-John Turner</a> on April 09, 2016.</p>