Tux

...making Linux just a little more fun!

how to convert from kmail to slypheed-claws ?

J.Bakshi [j.bakshi at icmail.net]


Sun, 8 Mar 2009 15:59:19 +0530

Dear list,

Is there any way to convert the emails ( maildir form ) and account information (pop3, smtps) stored in kmail to slypheed-claws ?

Thanks


Top    Back


Thomas Adam [thomas.adam22 at gmail.com]


Sun, 8 Mar 2009 10:36:34 +0000

2009/3/8 J.Bakshi <j.bakshi@icmail.net>:

> Dear list,
>
> Is there any way to convert the emails ( maildir form ) and account
> information (pop3, smtps)  stored in kmail to slypheed-claws ?

claws-mail (no longer called sylpheed-claws) supports these protocols, yes. Beyond confirming it, you'll have to set it up yourself.

-- Thomas Adam


Top    Back


J.Bakshi [j.bakshi at icmail.net]


Sun, 8 Mar 2009 21:25:38 +0530

On Sunday 08 Mar 2009 4:06:34 pm Thomas Adam wrote:

> 2009/3/8 J.Bakshi <j.bakshi@icmail.net>:
> > Dear list,
> >
> > Is there any way to convert the emails ( maildir form ) and account
> > information (pop3, smtps)  stored in kmail to slypheed-claws ?
>
> claws-mail (no longer called sylpheed-claws) supports these protocols,
> yes.  Beyond confirming it, you'll have to set it up yourself.

Thanks Thomas,

I have no problem to setup the email accounts manually but I already have huge mails in kmail ( maildir format) because I have been using it since last a few years. That's why I'm in search of an application which can also convert maildir format to mbox. If claws-mail supports maildir then it would be only coping and pasting the folders.

thanks


Top    Back


Karl-Heinz Herrmann [kh1 at khherrmann.de]


Sun, 8 Mar 2009 17:10:58 +0100

On Sun, 8 Mar 2009 21:25:38 +0530 "J.Bakshi" <j.bakshi@icmail.net> wrote:

> I have no problem to setup the email accounts manually but I already
> have huge mails in kmail ( maildir format) because I have been using
> it since last a few years. That's why I'm in search of an application
> which can also convert maildir format to mbox. If claws-mail supports
> maildir then it would be only coping and pasting the folders. 

I'm using claws-mail for several years now and it can read both mbox and maildir (native format is maildir). claws can configure the mail-directory AND int can handle more than one. So you can either copy your whole maildir structure into the new mail dir (or even better point claws at the right directory containing your old mails). Or you can keep the old and new separate but available inside claws. mboxes can be opened/imported as necessary. You can also export as mbox.

K.-H.


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Sun, 8 Mar 2009 16:14:01 -0400

On Sun, Mar 08, 2009 at 09:25:38PM +0530, J.Bakshi wrote:

> On Sunday 08 Mar 2009 4:06:34 pm Thomas Adam wrote:
> > 2009/3/8 J.Bakshi <j.bakshi@icmail.net>:
> > > Dear list,
> > >
> > > Is there any way to convert the emails ( maildir form ) and account
> > > information (pop3, smtps)  stored in kmail to slypheed-claws ?
> >
> > claws-mail (no longer called sylpheed-claws) supports these protocols,
> > yes.  Beyond confirming it, you'll have to set it up yourself.
> 
> Thanks Thomas,
> I have no problem to setup the email accounts manually but I already have huge 
> mails in kmail ( maildir format) because I have been using it since last a 
> few years. That's why I'm in search of an application which can also convert 
> maildir format to mbox. If claws-mail supports maildir then it would be only 
> coping and pasting the folders. 

I seem to recall that maildir is just separate RFC822-formatted messages. If it is, then the solution is simply

cat maildir/* > mbox

Otherwise, I'd imagine there are plenty of converters.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * https://LinuxGazette.NET *


Top    Back


Jim Jackson [jj at franjam.org.uk]


Sun, 8 Mar 2009 20:46:37 +0000 (GMT)

On Sun, 8 Mar 2009, Ben Okopnik wrote:

> On Sun, Mar 08, 2009 at 09:25:38PM +0530, J.Bakshi wrote:
>> On Sunday 08 Mar 2009 4:06:34 pm Thomas Adam wrote:
>>> 2009/3/8 J.Bakshi <j.bakshi@icmail.net>:
>>>> Dear list,
>>>>
>>>> Is there any way to convert the emails ( maildir form ) and account
>>>> information (pop3, smtps)  stored in kmail to slypheed-claws ?
>>>
>>> claws-mail (no longer called sylpheed-claws) supports these protocols,
>>> yes.  Beyond confirming it, you'll have to set it up yourself.
>>
>> Thanks Thomas,
>> I have no problem to setup the email accounts manually but I already have huge
>> mails in kmail ( maildir format) because I have been using it since last a
>> few years. That's why I'm in search of an application which can also convert
>> maildir format to mbox. If claws-mail supports maildir then it would be only
>> coping and pasting the folders.
>
> I seem to recall that maildir is just separate RFC822-formatted
> messages. If it is, then the solution is simply
>
> ```
> cat maildir/* > mbox
> '''

Only if the RFC2822 formatted messages have the extra first line of form

 From envelope-sender date-received

Otherwise, at the very least, you would need to...

date=`date``
for f in maildir/* ; do
 echo "From someone@someplace $date" >> mbox
 cat "$f" >> mbox
done

assuming a bourne-like shell, and I'm sure a little perlery would get you the date of the email and, with luck, the envelope sender from some "X-Env-Sender:", or similar, header field.


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Sun, 8 Mar 2009 18:58:52 -0400

On Sun, Mar 08, 2009 at 08:46:37PM +0000, Jim Jackson wrote:

> On Sun, 8 Mar 2009, Ben Okopnik wrote:
>
>> I seem to recall that maildir is just separate RFC822-formatted
>> messages. If it is, then the solution is simply
>>
>> ```
>> cat maildir/* > mbox
>> '''
>
> Only if the RFC2822 formatted messages have the extra first line of form
>
> ```
> From envelope-sender date-received
> '''
>
> Otherwise, at the very least, you would need to...
>
> ```
> date=`date``
> for f in maildir/* ; do
>  echo "From someone@someplace $date" >> mbox
>  cat "$f" >> mbox
> done
> '''

Sure - I just did something like that for my recent 2-cent tip.

for file in maildir/*
do
	sed '1i\'"$(echo From $USER $(date))" file >> mbox
done
> assuming a bourne-like shell, and I'm sure a little perlery would get you
> the date of the email and, with luck, the envelope sender from some  
> "X-Env-Sender:", or similar, header field.

Reasonable idea, although most emails don't have an 'X-Env-Sender: ' field, and the 'Date: ' field isn't formatted correctly. In any case, neither the name nor the date in the 'From ' header doesn't seem to make any difference, so it can be anything at all - as long as it's formatted well.

D=`date` perl -wne'/^From: (.*)$/ && $u = $1; $m .= $_;
	END{ print "From $u $ENV{D}\n$m" }' maildir/* > mbox
-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * https://LinuxGazette.NET *


Top    Back