Fixing my duplicate email fiasco with rmlint in Maildir

 

Remember my recent email fiasco, during which I ended up with tens of thousands of duplicate emails? I remember it. After storming off and ignoring the problem for a week, I decided I should do something about it.

Today, I fixed it!

Actually, a post from Edd Salkield fixed it: Removing duplicate emails from an mbsync maildir.

Basically, the duplicate email files aren't exact duplicates. Each has a unique X-TUID header line. So we remove that line on every file in a copy of the mail store so we can use rmlint to find the duplicates. rmlint generates a script for removing the duplicate files. We run the script on the original mail store, which still has the X-TUID headers intact.

My Steps:

  • cp -r ~/Mail ~/Mail_backup # Make a full backup, just in case
  • cp -r ~/Mail ~/Mail-workingcopy # Make another copy to work with
  • cd ~/Mail-workingcopy
  • find ./ -type f -exec gsed -i -e '/X-TUID/d' {} \; # Strip the X-TUID header, which is the only differing line in otherwise duplicate files (Needed gsed on my Mac)
  • rmlint -g --types="defaults -ed -dd" # Run rmlint on working copy
  • Check the generated rmlint.sh file to confirm paths are absolute (mine were)
  • gsed -i -e 's/-workingcopy//g' rmlint.sh # Find and remove working copy suffix, making it the "real" path
  • mv rmlint.sh ../Mail/ # move the script into the real mail store
  • cd ~/Mail # get ready to de-dupe
  • ./rmlint.sh -x -n # Do a dry run of the script
  • ./rmlint.sh -x # Go!
  • mbsync -a # Sync with server (be sure that --expunge-far is set)

It worked for me. I may give it a second before trying the whole muchsync thing again, but it's good to know that if I foul things up, there's a way out of it.

Baty.net posts

27 Jan 2025 at 13:45

My first homemade 3D print

 

I have no useful experience with 3D modeling software, so I figured it was time to jump in. My first project was to stop the Baron Fig Squire pen from rolling off my desk 30 times a day.

I thought about making a clip, but that felt too complicated, so I made a simple ring with a couple of flat sides. The problem was that it still rolled. The flat bits weren't enough to stop it, given any momentum.

Instead of a fancy solution, I just added a tiny nubbin to the ring. It's not pretty or elegant, but it works.

Crude but effective.

Baty.net posts

26 Jan 2025 at 20:05

Howm updates

During the first 6 months using Howm, I kept changing the format I used. I started with plain .txt files then moved to Markdown, then to org and back again a few times. What a mess. I'm an Org mode person, so I spent rather too long this morning converting and renaming everything to .org. I need to stick with this, now.

Baty.net posts

26 Jan 2025 at 14:20

Bringing Apple Passwords into Pass

 

I have a soft spot for Pass: The Standard Unix Password Manager, but Apple's new Passwords app has been working fine. I use Safari, so the whole thing is very convenient.

Sometimes I get twitchy about having things in only one place, so today I decided I'd like to import my Apple Password passwords into Pass. It took me a minute, so I'm jotting down some notes here, for next time.

First, install pass-import. Pass-import is "A pass extension for importing data from most existing password managers". There's a lot of Python going on, which always seems to trip me up, but thankfully there's a Homebrew recipe, so...brew install pass-import.

pass-import supports many password apps out of the box. It doesn't yet support Apple Passwords, apparently. It handles Keychain exports, but that's not what I needed. I used the generic CSV option.

I exported the passwords to a CSV file (pass.csv) from Passwords.app.

I ran a test pass import foo.csv command but got an error. The pass command didn't recognize the import option. After some digging, I learned that the Homebrew recipe installs a script named pimport. Confusing, but OK fine.

After much trial and error, this is finally the command that worked.

pimport  -o .password-store/ \   # where to import to
         pass \                  # destination format
         csv \                   # Source format
         pass.csv \              # Source csv file
         --cols=title,url,login,password,comments,otpauth \  # Map columns
         -p apple-import/        # put in subfolder .password-store/apple-import

Now I have a backup. I don't know of a way to do this incrementally, so I suppose I'll just delete the apple-import/ folder and redo the export/import once in a while to catch up.

Baty.net posts

24 Jan 2025 at 23:45

I can't find things

It happened again. I was looking for a quote that I know I saved...Somewhere. I can't find it. Spotlight doesn't find it. DEVONthink doesn't find it. I can't find it in the wiki or here in the blog. I wonder where I put it? Probably depends on what day I saved it, because I change that just about every day and it's crazy-making.

Baty.net posts

23 Jan 2025 at 14:40

Stepping back from social media

I need another break from social media. People I admire and respect are behaving poorly over there, and it's making me irritable. I don't care if they're right or wrong. Presentation matters, and I don't approve of the presentation. I'm well within tolerance if I choose not to listen for a bit. I'll head back in a day or week or month, probably, but right now, being there is bad for my health.

Baty.net posts

22 Jan 2025 at 09:15



Refresh complete

ReloadX
Home
(302) All feeds

Last 24 hours
Download OPML
*
A Very Good Blog by Keenan
A Working Library
Alastair Johnston
Andy Sylvester's Web
Anna Havron
*
Annie
*
Annie Mueller
Apple Annie's Weblog
Articles – Dan Q
Austin Kleon
*
Baty.net posts
bgfay
*
Bix Dot Blog
*
Brandon's Journal
*
Chris Coyier
Chris Lovie-Tyler
*
Chris McLeod's blog
*
CJ Chilvers
*
Colin Devroe
*
Colin Walker – Daily Feed
Content on Kwon.nyc
*
Crazy Stupid Tech
*
Dave's famous linkblog
*
daverupert.com
Dino's Journal 📖
dispatches
*
dominikhofer dot me
Excursions
*
Flashing Palely in the Margins
Floating Flinders
For You
*
Frank Meeuwsen
frittiert.es
Hello! on Alan Ralph
*
Human Stuff from Lisa Olivera
inessential.com
*
Interconnected
*
jabel
Jake LaCaze
*
James Van Dyne
*
Jan-Lukas Else
*
Jim Nielsen's Blog
Jo's Blog
*
Kev Quirk
*
lili's musings
*
Live & Learn
*
Lucy Bellwood
*
Maggie Appleton
*
Manton Reece
*
Manu's Feed
*
maya.land
*
Meadow
Minutes to Midnight RSS feed
Nicky's Blog
*
Notes – Dan Q
*
On my Om
Own Your Web
Paul's Dev Notes
*
QC RSS
rebeccatoh.co
*
reverie v. reality
*
Rhoneisms
ribbonfarm
*
Robert Birming
Robin Rendle
Robin Rendle
Sara Joy
*
Scripting News
*
Scripting News for email
Sentiers – Blog
Simon Collison | Articles & Stream
strandlines
Tangible Life
the dream machine
*
The Marginalian
*
The Torment Nexus
*
thejaymo
theunderground.blog
Thoughtless Ramblings
tomcritchlow.com
*
Tracy Durnell
*
Winnie Lim
*
yours, tiramisu
Žan Černe's Blog

About Reader


Reader is a public/private RSS & Atom feed reader.


The page is publicly available but all admin and post actions are gated behind login checks. Anyone is welcome to come and have a look at what feeds are listed — the posts visible will be everything within the last week and be unaffected by my read/unread status.


Reader currently updates every six hours.


Close

Search




x
Colin Walker Colin Walker colin@colinwalker.blog