exporting from kmail (Was: Kmail2/Akonadi issue on FreeBSD.)

gene heskett gheskett at wdtv.com
Wed Nov 30 04:01:23 GMT 2011


On Tuesday, November 29, 2011 10:47:42 PM Duncan did opine:

> gene heskett posted on Tue, 29 Nov 2011 13:58:11 -0500 as excerpted:
 
> > Interesting that you say claws, but this post came from the pan
> > newsreader according to its headers.
> 
> There were clues to that explanation in the previous mail, but they were
> indirect enough that someone who wasn't familiar with the service might
> have missed them.
> 
> I handle all my lists thru gmane.org, a publicly available list2news
> (and list2web, with a convenient-for-link-references header in each
> news article pointing at the web version) service, and use pan as my
> news client, so pan's what I read and reply to list messages with.  My
> email client thus only deals with normal, personal mail, not
> mailinglists.
> 
> You can read more about it at http://gmane.org .  The list2news server
> is at nntp://news.gmane.org .  You can read as news any list it
> carries, but before replying to anything using it, do read up on it at
> the website, as the mechanism it uses for posting is sort of like
> posting to a moderated newsgroup, but with an "are you sure" address
> verification on the first post to a particular list, and then a forward
> to the listserv -- it only actually posts the message to the group
> after getting it as a list message, just like any other list message.
> 
> I don't actually do much real news these days, but when I do, I use a
> separate pan instance, complete with its own settings, for handling
> news, as compared to the one I use for lists thru gmane.  Thus, as I
> said in the previous post, separate apps or at least separate instances
> of apps for each of mail, lists, news and feeds.  As it happens, I use
> separate instances of pan for lists (thru gmane) and news, and separate
> instances of claws for mail and feeds, but I did go to the trouble to
> setup separate instances, it's not one instance handling both, so they
> act more like four separate apps with similar keyboard accelerator
> settings (I have the keyboard accelerators setup similarly in each),
> than two apps each handling two tasks.
> 
> > What I would like to do is start a conversation with someone who has
> > bailed on kmail & went to claws, and see just how hard it would be to
> > convert my box to that, including the importation of the whole,
> > several Gigabyte, some of it now approaching 10 years old, kmail
> > email corpus into claws.  All the while continuing with my present
> > fetchmail based system to deliver the filtered email into
> > /var/spool/mail/gene.
> > 
> > I have a lot of claws installed already, so the first thing is to
> > import the kmail email corpus into claws.  And on that point, I have
> > no clue,
> 
> I see two other suggestions already, (1) setting up a temporary IMAP
> server to grab them and then pulling from that into claws, and (2) using
> mutt to do the conversion.  However, I used a third solution, (3)
> running the script for that purpose as available on the claws-mail
> site.  It should be easy to find as it's listed as a kmail maildir
> importer script.
> 
> I used a (different) script, also from the claws-mail site, to import
> kmails/kaddressbook's addressbook/contacts into claws-mail.  But it's
> labeled as an evolution vcf-format addressbook importer.
> 
> Unfortunately, both of these were somewhat old and needed a bit of
> massaging to work with current kmail data.  I should note that I don't
> actually know either python or perl (the languages the scripts were
> written in), but know bash and have a sysadmin's "maybe I can hack it to
> work" level familiarity with everything from C/C++ to
> perl/python/tcl/tk/ javascript to html.  That sysadmin's "can I hack it
> to work" approach was all I needed.
> 
> I think it was the maildir importer that was written in python, but it
> was python 2.2 or some such, and didn't initially work with the python
> 2.7 I'm running here.  IIRC I first had to change the shebang line (#!/
> bin/python...) to point at 2.7 instead of 2.2 but that was no big deal.
> That got it to try to run, but it spit out some errors.  Looking at
> them, I had to change a keyword or two and possibly rearrange the
> passed variables in a couple of calls.  That's certainly hacking at a
> level that's beyond some, but it should be doable with a bit of
> patience and persistence by anyone with as I said, a sysadmin's "can I
> hack it to work" level of understanding and approach to their boxes.
> 
> Based on what you have said before about your setups and the hacks you
> use to get them to work, I'm guessing it's within your capabilities.  If
> you understand shebang, that part's easy enough, and once past that, if
> need be, you can post the errors and I or someone can probably figure
> out what's going on and post a fixit mod.
> 
> Or, since I think a couple of your boxes are running older
> installations, it's quite possible you won't have to make any changes
> except possibly to the shebang, if you're running python 2.4 or some
> such.
> 
> I've been kicking myself ever since I got claws up and running, wishing
> I'd been a bit more careful with my changes to the scripts, so I could
> submit them as patches back upstream for others to use.  Unfortunately,
> I was rather shortsightedly simply trying to hack something that would
> get the conversion to work at the time, and wasn't thinking about
> submitting the fixes back upstream. =:^( <kick, kick.  Bad bad boy,
> duncan!>
> 
> That's what I used, but given the necessary hacking, the temporary IMAP
> server or mutt conversion methods sound like they might be easier.
> Definitely YMMV on this one!
> 
> 
> The addressbook/contacts may in fact be easier to either import by hand,
> or leave as the *.vcf files that akonadi can export (I used a command-
> line tool akonadi ships for that, but don't remember its name, and I
> /think/ it can be done from the kaddressbook GUI as well, also note that
> pre-akonadi kaddressbook apparently used vcfs, one per contact, and if
> you upgraded from kde3 or pre-4.4 kde4, you probably still have those
> around... but they're one per contact, which isn't ideal for mass
> importing).  Claws can sort of use these directly, but at least here,
> they appeared read-only and as presented in claws' GUI, clearly weren't
> in its most usable native format.  So I went ahead and tried the
> evolution vcf importer conversion script on them.
> 
> Unfortunately, this (perl) script required a bit of hacking as well.
> It's also old, but perl has apparently stayed more compatible with this
> script than python had with the other one, and it would at least try to
> execute without any changes at all.
> 
> But the vcf format it expected was somewhat different than what was in
> the vcf files exported by akonadi.  The script's a decade old IIRC, for
> 2001 era evolution, and some of the field identifiers expected by the
> script didn't correspond to what akonadi had used in its export.  But by
> comparing what the script source expected with what was in akonadi's vcf
> files, I was able to hack one into the other at least well enough to get
> the script to import the names and email addresses.  For most of my
> contacts, that's all I had anyway, so I don't know whether it messed up
> the rest of it or not, but it did import names and email addresses OK,
> when I was done.
> 
> I guess some more kicking is in order here, tho I know I still have that
> vcf and could still figure out what I hacked and submit the patches
> upstream.
> 
> But, if you don't have that many contacts anyway, perhaps just manually
> transferring them is easiest.
> 
> Or, they can probably be gathered off the mail once that's converted, if
> you wish to go that way.  I didn't try that.
> 
> Or just be happy with claws' handling of the vcfs as they are...
> 
> Or, if it's kmail you really want to be rid of and you don't mind the
> akonadi-based kaddressbook hanging around for awhile, just continue
> using it for now, populate the claws addressbook from emails as you go,
> and if desired in six months or a year or whatever, choose a flagday to
> convert or dump whatever's left in kaddressbook and be rid of it then. 
> The biggest factor for most will be the email itself, since that's
> what's causing the problems, and once it's gone, some people may be
> just fine with keeping kaddressbook and akonadi around and doing an
> individual- contact-need based conversion.  But at least here, once I
> was off of kmail, I wanted all traces of that akonadi troublemaker off
> my system, and went to all necessary trouble to make it so.


I may have hit what is almost a show-stopper with claws.  There appears, 
from the .pdf of the docs I found, no way to have another script send it a 
check mail command.  And while I did find an auto-check option in the 
preferences menu, it doesn't read as doing what I need it to do, or the 
docs maybe are a bit old?  kmail from 4.6.5, even from the 3.5.0+, has had 
a dbus socket that works very well indeed using this line from my 
~/bin/mailwatcher script:
Cmd define (word wrapped):
Cmd="/usr/lib/qt4/bin/qdbus org.kde.kmail /KMail 
org.kde.kmail.kmail.checkMail"

Invocation later in the script after having verified that kmail is indeed 
running and there is new mail in /var/spool/mail/gene:
$cmd

Is this dbus port indeed on the missing list?

Thanks Duncan.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene>
  Always be sincere, even when you don't mean it. -Irene Peter
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list