spiralofhope logo
spiralofhope logo

S
piral of Hope
Better software is possible.
Styles
Table of Contents

Linux email software


mh to maildir

http://offog.org/darcs/misccode/mh-to-maildir

#!/bin/sh
  1. Convert an mh folder into a maildir.
  2. Adam Sampson
  3. The "maildir" command is part of safecat:
if [ $# != 2 ] ; then echo "Usage: mh-to-maildir mhdir maildir" exit 1 fi mhdir="$1" maildir="$2" mkdir -p "$maildir/new" "$maildir/cur" "$maildir/tmp" || exit 1 ls "$mhdir" | egrep '^[0-9]+$' | sort -n | while read n ; do maildir "$maildir" <"$mhdir/$n" || exit 1 done
./mh-to-maildir ~/Mail ~/Maildir-test
I had various accounts in claws-mail, so I did stuff like this:

./mh-to-maildir ~/Mail/subfolder1 ~/Maildir-test