<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/rss-style.xsl"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>troglodyne.net</title>
<link>http://troglodyne.net//posts/8881ed79-0887-442a-94b9-2ef9a98e976d?format=xml</link>
<description>troglodyne.net : /posts/8881ed79-0887-442a-94b9-2ef9a98e976d</description>
<language>en</language>
<pubDate>2026-05-06T12:32:45</pubDate>
<lastBuildDate>2026-05-06T12:32:45</lastBuildDate>

<image>
<title>troglodyne.net</title>
<url>/favicon.ico</url>
<link>http://troglodyne.net</link>
<width>32</width>
<height>32</height>
<description>troglodyne.net favicon</description>
</image>
<item>
<title>Fixing doinked maildirs thanks to updates</title>
<link>http://troglodyne.net/posts/8881ed79-0887-442a-94b9-2ef9a98e976d</link>
<description><![CDATA[<p>
Had to update a bunch of client systems lately due to our AI enabled storm of 0-days coming in hard not long ago.
This of course means that configs get stomped by hurtful package maintainers.
In this particular case, it was dovecot and postfix's mailbox dirs.
On one system I thought I had been particularly tricky in symlinking the dir the maintainer prefers to the actual dir, but they nuked it and made a real dir.  Yay.
</p>
<p>
Anyways, here's a script to schlep mail from the bad, broken maildir to the actual correct one.
<pre>fixit.sh
<code language="bash">
# Run as root in whatever bad maildir, in my case it was /var/qmail to /mail because plesk
# Alter the paths in the second sed as appropriate to your situation, or accept in $1 $2
find . -type f | grep -vP 'dovecot|spam|qmail|maildir|subscription|quota|delivery' | xargs realpath | sed -re 's/(.*)/& &/' | sed -re 's/\/var\/qmail/\/mail/2' | sed 's/^/command cp -au /' > ~/fix.sh
# Then all you have to do is run ~/fix.sh
</code>
</pre>]]></description>
<author>george</author>
<guid isPermaLink="true">http://troglodyne.net/posts/8881ed79-0887-442a-94b9-2ef9a98e976d</guid>
<pubDate>2026-05-05T15:02:32</pubDate>
<enclosure type="text/html" url="http://troglodyne.net/posts/8881ed79-0887-442a-94b9-2ef9a98e976d" />
</item>
</channel>
</rss>
