programming (and other) musings

Posts tagged "sundry":

03 Oct 2025

mailbox spring cleaning with notmuch

After many years of switching between email systems, service providers, backup and sychronisation strategies, mail folders layouts, protocols and inadvertent replications, i ended up with a sizeable amount of local email folders containing, i was quite sure, lots of duplicates. My current email handling systems of choice, Gnus with nnml and notmuch, are pretty good at hiding them from me in normal operation, but i know those dups are there, lurking in the dark, and periodically look for a way to uncover and kill them.

I know about the sophisticated mail-deduplicate utility, but I guess it's too sophisticated for me :) Turns out the solution was in front of my eyes: notmuch knows about duplicates, and can list them easily:

notmuch search --duplicate=2 --output=files '*'`

That command will list the full path to the second file in duplicate pairs found by notmuch. So, getting rid of them is as easy as

for f in  `notmuch search --duplicate=2 --output=files '*'``; do
  rm $f;
done
notmuch new

After doing that (note we rebuild notmuch's database at the end, searching again for level-2 duplicates might discover new files if you have emails duplicated more than twice (i had). Rinse and repeat.

Tags: sundry
11 Oct 2023

in no particular order

Interesting bits elsewhere:

Older entries

Tags: sundry
09 Nov 2021

relaying mail to multiple smarthosts with opensmtpd

I like to use a local smtp daemon for sending email from my laptop, because that way i can send emails even while disconnected and, even when the network is up, because i don't have to wait for the network protocol to be completed with a remote smarthost. Oh, and i also need local mail delivery.

For many years i've used postfix to those ends; it has an acceptably simply-ish configuration; but recently i've become fond of VPNs (mullvad, if you want to know), and was annoyed by its getting confused when /etc/resolv.conf changes (for instance, because you get the VPN up after postfix's service has started). I've found a pleasantly simple alternative: OpenSMTPD.

more ...
Tags: sundry
04 May 2020

observatory

i've been learning a tiny bit about web security at mozilla's Web Security pages, and used their Mozilla Observatory to analyize this site and make it a bit safer. it was just a matter of adding a handful of headers to the webserver configuration, to wit:

Tags: sundry
Other posts
Creative Commons License
jao.io by jao is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.