Skip to content

tv42/maildir-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maildir-fix -- Fix Maildirs after git has pruned empty dirs

maildir-fix makes sure the subdirectories required for a Maildir are present: new, cur, tmp.

This is useful if you're the kind of crazy that stores email in Git repositories, as Git will prune directories that become empty.

Use like this:

$ ls Spam
cur/  tmp/
$ maildir-fix Spam
$ ls Spam
cur/  new/  tmp/

It can process a Binc IMAP -style mail depot with the -depot=PATH flag:

$ maildir-fix -depot=.

Git hooks

You can make git run maildir-fix automatically, by creating the git hooks post-checkout, post-merge and post-rewrite with the following:

#!/bin/sh
set -e

. "$(git --exec-path)/git-sh-setup"

require_work_tree
cd_to_toplevel

maildir-fix -depot=.

About

Fix maildirs after git has pruned empty dirs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages