# get containing maildir of $orig_msgfile
orig_maildir=$(dirname $(dirname "$orig_msgfile"))
if [ ! -d "$orig_maildir/cur" ] ; then
# get containing maildir of $orig_msgfile
orig_maildir=$(dirname $(dirname "$orig_msgfile"))
if [ ! -d "$orig_maildir/cur" ] ; then