Re: [Evolution] imap and mh folders



The problem for me is that I have 300+ MB of mail in mh format, and
without a conversion tool a working imap is the only chance I have to
switch to evolution.

OK, so I just whipped up this MH -> evolution migration script (untested):

#!/bin/sh

cd ~/Mail
for folder in `find . -type d -print | sed -e 's:^./::'`; do
        test $folder = . && continue
        evdir="~/evolution/local/"`echo $folder | sed -e 's:/:/subfolders/:g'`
        mkdir -p $evdir
        cat > $evdir/folder-metadata.xml << EOF
<?xml version="1.0"?>
<efolder>
        <type>mail</type>
        <description>$folder folder</description>
</efolder>
EOF
        packf +$folder -file $evdir/mbox
done


But then I realized that if you want to use IMAP, you don't want the
evolution directory structure. In which case, this should work
(assuming that you don't have any folders that contain subfolders).
(also untested)

#!/bin/sh

cd ~/Mail
for folder in `find . -type d -print | sed -e 's:^./::'`; do
        test $folder = . && continue
        mkdir -p `dirname ~/mail/$folder`
        packf +$folder -file ~/mail/$folder
done



(and use "mail" as your IMAP path.)

-- Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]