Batch convert maildir to mbox( Evolution 3.2.0 above migrate to thunderbird)

maildirarc download

mllm © 2004-2012, allblue
#!/bin/sh
 
MAILDIRARC=`which maildirarc`
 
if [ $# -lt 2 ] ; then
  echo "USAGE: $0 maildir targetdir"
  echo " e.g.: $0 /home/foo/.local/share/evolution/mail/local /opt/my_mailbox_backup"
  exit 1;
fi
 
 
if [ $# -gt 0 -a -d $1 ];then
	cd $1
  for file in .*
	do
		if [ -d "$file/cur" ];then
			if [ "$file" = "." ];then
			  $MAILDIRARC -d 0 -c -m $2/Inbox $1/$file
			else
			  $MAILDIRARC -d 0 -c -m $2/${file#*.} $1/$file
			fi
		fi   
	done
fi
Parsed in 0.011 seconds