Discussion:
migration from KMail
(too old to reply)
Adam Funk
2011-02-13 20:24:08 UTC
Permalink
Raw Message
I'm about to switch from KMail to Claws (on Ubuntu Maverick), and I'm
interested in comments & tips from other users who have done something
similar.

I currently have a ~/Mail in maildir format containing about 24,000
e-mails in 190 MB. I guess I'll need to convert that to MH format,
presumably using kmail-mailbox2claws-mail.pl (in the claws-mail-tools
package). How reliable is it?

Also, is the MH format "greppable" like the maildir format?

Thanks,
Adam
Paul
2011-02-13 21:40:42 UTC
Permalink
Raw Message
On Sun, 13 Feb 2011 20:24:08 +0000
Post by Adam Funk
I'm about to switch from KMail to Claws (on Ubuntu Maverick), and
I'm interested in comments & tips from other users who have done
something similar.
I currently have a ~/Mail in maildir format containing about 24,000
e-mails in 190 MB. I guess I'll need to convert that to MH format,
presumably using kmail-mailbox2claws-mail.pl (in the
claws-mail-tools package). How reliable is it?
It seems it's a mixed bag - for some it works, for some it has
problems. Anyway, it is non-destructive, so there's no harm giving it
a go.

Alternately, Hanno Böck sent me the attached bash script, which does
the same thing. It would be useful if you could test this, Hanno sent
it to me as a replacement for kmail-mailbox2claws-mail.pl, but I've
not found the time to create a dummy kmail mailbox to test it on yet.

Please report how you got on with either or both. Thanks!
Post by Adam Funk
Also, is the MH format "greppable" like the maildir format?
Yes, it is. At least, the 7bit/8bit msgs are, but, for example, the
base64'ed msgs are not. This is the same as maildir.

HTH
with regards

Paul
--
It isn't worth a nickel to two guys like you or me,
but to a collector it is worth a fortune
Adam Funk
2011-02-17 17:46:33 UTC
Permalink
Raw Message
Post by Paul
Post by Adam Funk
I currently have a ~/Mail in maildir format containing about 24,000
e-mails in 190 MB. I guess I'll need to convert that to MH format,
presumably using kmail-mailbox2claws-mail.pl (in the
claws-mail-tools package). How reliable is it?
It seems it's a mixed bag - for some it works, for some it has
problems. Anyway, it is non-destructive, so there's no harm giving it
a go.
It didn't work for me ... I got a lot of errors about undefined
variables in a string comparison and no files in the output directory.
Post by Paul
Alternately, Hanno Böck sent me the attached bash script, which does
the same thing. It would be useful if you could test this, Hanno sent
it to me as a replacement for kmail-mailbox2claws-mail.pl, but I've
not found the time to create a dummy kmail mailbox to test it on yet.
Please report how you got on with either or both. Thanks!
I modified it slightly (see below) and it worked, although when I ran
it with the arguments 'Mail_KMail' and 'Mail', it put all the output
in a 'MailMail_Kmail' directory. I decided renaming that to Mail
would be easier than manipulating sed (in which I'm not fluent). The
results worked perfectly in Claws.

I'm really impressed with Claws so far. I wish I'd switched to it
years ago.


##################################################
#!/bin/bash

# changed from /bin/sh to get let cmd

# this script converts a kmail directory structure to claws-mail MH format
#
# by Hanno Boeck, http://www.hboeck.de/
#
# I, the copyright holder of this work, hereby release it into the public
# domain. This applies worldwide.
# In case this is not legally possible:
# I grant anyone the right to use this work for any purpose, without any
# conditions, unless such conditions are required by law.


if [ -z $1 ] || [ -z $2 ]; then
echo "Usage: kmail-to-claws [fromdir] [todir]"
exit -1
fi


echo Converting from $1 kmail dir to $2 claws/mh dir

#for i in `find -type d -name cur`; do
for i in `find $1 -type d -name cur`; do
#export oldname=$1`echo $i|sed -e 's:cur$::g' -e 's:^\./:/:g'`
export oldname=`echo $i|sed -e 's:cur$::g' -e 's:^\./:/:g'`
export newname=$2`echo $oldname|sed -e 's:\.\(\w*\).directory:\1:g'`
echo progress: $oldname to $newname

count=0

mkdir -p $newname
for file in `ls $oldname/cur/`; do
let count++
cp $oldname/cur/$file $newname/$count
done
for file in `ls $oldname/new/`; do
let count++
cp $oldname/new/$file $newname/$count
done

done
Corrado
2011-02-13 21:47:05 UTC
Permalink
Raw Message
On Sun, 13 Feb 2011 20:24:08 +0000
Adam Funk <***@ducksburg.com> wrote:

Hi,

did that a couple years ago, and everything went fine; for the record,
I've successfully transferred some 10 years' worth of email, roughly 1
GB.

If I remeber correctly, I've imported the various KMail mbox files
(that was the format I used) using the "File/Import mbox file" menu
option in ClawsMail.

If your mail is in maildir format in KMail, though, that's uncharted
territory for me.... You may perhaps create a new folder (mbox format)
in KMail, copy (drag) your emails to it, then import that mbox file in
ClawsMail.

No clues about the Perl script you mentioned, unfortunately.

Good luck!

--
Corrado
Post by Paul
On Sun, 13 Feb 2011 20:24:08 +0000
I'm about to switch from KMail to Claws (on Ubuntu Maverick), and I'm
interested in comments & tips from other users who have done something
similar.
I currently have a ~/Mail in maildir format containing about 24,000
e-mails in 190 MB. I guess I'll need to convert that to MH format,
presumably using kmail-mailbox2claws-mail.pl (in the claws-mail-tools
package). How reliable is it?
Also, is the MH format "greppable" like the maildir format?
Thanks,
Adam
Al Bogner
2011-02-13 22:55:18 UTC
Permalink
Raw Message
Post by Paul
On Sun, 13 Feb 2011 20:24:08 +0000
Hi,
did that a couple years ago, and everything went fine; for the record,
I've successfully transferred some 10 years' worth of email, roughly 1
GB.
If I remeber correctly, I've imported the various KMail mbox files
(that was the format I used) using the "File/Import mbox file" menu
option in ClawsMail.
If your mail is in maildir format in KMail, though, that's uncharted
territory for me.... You may perhaps create a new folder (mbox format)
in KMail, copy (drag) your emails to it, then import that mbox file in
ClawsMail.
No clues about the Perl script you mentioned, unfortunately.
I did nothing else than playing with a _copy_ of 1 KMail folder and
_renamed_ them to a number starting from 1 and increasing by one. Then
I renamed every Kmail-folder from Opensuse / KDE4.

Before I checked the names of my folder and optimized them. That was
all.

The perl-script didn't work for me.

If you want, send me a PM and I can send you a _quick and dirty_ script,
which fitted for _my_ needs. You will have to change it for your needs!

Al
Adam Funk
2011-02-14 19:45:11 UTC
Permalink
Raw Message
Thanks for the replies to my first post; I'm still digesting them and
playing around with Claws, and I have a few more questions about this
move.

I currently use KMail at home to connect to 3 servers. The main one
is an IMAP server with several folders, which I also use through a
webmail interface. When I'm not at home, I move messages I'm finished
with into a "done" folder, and later (at home) file them into a tree
of local folders (moving them off the IMAP server into the local
~/Mail/ hierarchy). Occasionally I move messages back onto the IMAP
server from the local folders. Claws will support both of these
moves, right?

I also pull mail from a POP3 server and the local /var/spool/mail
straight into the local inbox. Also OK?

Is it possible to set Claws to stop creating a "Queue" folder on the
IMAP server? I don't need it. (If it's not possible, I can live with
it.)


Thanks,
Adam
Paul
2011-02-15 06:57:42 UTC
Permalink
Raw Message
On Mon, 14 Feb 2011 19:45:11 +0000
Post by Adam Funk
I currently use KMail at home to connect to 3 servers. The main one
is an IMAP server with several folders, which I also use through a
webmail interface. When I'm not at home, I move messages I'm
finished with into a "done" folder, and later (at home) file them
into a tree of local folders (moving them off the IMAP server into
the local ~/Mail/ hierarchy). Occasionally I move messages back
onto the IMAP server from the local folders. Claws will support
both of these moves, right?
Yes.
Post by Adam Funk
I also pull mail from a POP3 server and the local /var/spool/mail
straight into the local inbox. Also OK?
Yes. The latter using a 'Local' account.
Post by Adam Funk
Is it possible to set Claws to stop creating a "Queue" folder on the
IMAP server? I don't need it. (If it's not possible, I can live
with it.)
Claws will create it, but you don't have to use it - the account can
be configured to use a different queue folder, e.g. an MH one.

with regards

Paul
--
It isn't worth a nickel to two guys like you or me,
but to a collector it is worth a fortune
Adam Funk
2011-02-17 22:07:04 UTC
Permalink
Raw Message
Post by Paul
On Mon, 14 Feb 2011 19:45:11 +0000
Post by Adam Funk
I currently use KMail at home to connect to 3 servers. The main one
is an IMAP server with several folders, which I also use through a
webmail interface. When I'm not at home, I move messages I'm
finished with into a "done" folder, and later (at home) file them
into a tree of local folders (moving them off the IMAP server into
the local ~/Mail/ hierarchy). Occasionally I move messages back
onto the IMAP server from the local folders. Claws will support
both of these moves, right?
Yes.
Post by Adam Funk
I also pull mail from a POP3 server and the local /var/spool/mail
straight into the local inbox. Also OK?
Yes. The latter using a 'Local' account.
That worked out well, & I found out how to set up "identities" as
send-only accounts in the excellent documentation. Thanks for the
tips.
Post by Paul
Post by Adam Funk
Is it possible to set Claws to stop creating a "Queue" folder on the
IMAP server? I don't need it. (If it's not possible, I can live
with it.)
Claws will create it, but you don't have to use it - the account can
be configured to use a different queue folder, e.g. an MH one.
OK, I'll look into it. Thanks again.

Loading...