Skip to content

esovetkin/notmuch-deduplicate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Deduplicate Maildir using Notmuch

A simple bash-script to find duplicated mails and deduplicate them with a hardlink.

Requirements

  • notmuch
  • GNU/parallel
  • jq
  • pv

Usage

Just run

notmuch-deduplicate <query>

where <query> is a notmuch query.

Bugs

Some mail threads are too deep, and jq breaks. I didn't manage to catch that, so instead of running

notmuch-deduplicate '*'

it is rather more sensible to run something like this

#!/bin/bash

day=$(date -d "$2" +%F)
N="$1"
query="${@:3}"

echo "${query}"

for i in $(seq "1" "${N}"):
do
    echo "Day: ${day}"
    notmuch-deduplicate "date:${day}..${day} ${query}"
    day=$(date -d "${day} - 1 day" +%F)
done

About

Deduplicate Maildir using Notmuch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages