exporting from kmail (Was: Kmail2/Akonadi issue =?windows-1256?q?on=09FreeBSD=2E?=)

gene heskett gheskett at wdtv.com
Fri Dec 2 18:06:19 GMT 2011

On Friday, December 02, 2011 11:59:34 AM Duncan did opine:

> gene heskett posted on Wed, 30 Nov 2011 00:53:16 -0500 as excerpted:
> > On Wednesday, November 30, 2011 12:52:24 AM Duncan did opine:
> >> gene heskett posted on Tue, 29 Nov 2011 23:01:23 -0500 as excerpted:
> >> > 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?
> >> 
> >> I'm not aware of a dbus command for it -- that doesn't mean it
> >> doesn't exist, I just never looked for it, but there's definitely a
> >> scripted solution possible, as claws, like many mh-format mail
> >> clients, is designed with exactly that sort of scripted
> >> extensibility in mind.
> > 
> > Thanks Duncan, now I have something to look forward to.
> After looking into it... it could hardly be simpler, so much so I feel a
> bit like an idiot for not immediately suspecting and verifying this for
> my earlier reply.  Excerpt from claws-mail --help (and also covered in
> the claws-mail manpage):
> Usage: claws-mail [OPTION]...
> [...]
>   --receive              receive new messages
>   --receive-all          receive new messages of all accounts
> Now the commentary...
> As I've mentioned previously, claws-mail uses a Unix socket for instance
> syncing.

But where is the sockets # defined?

> Thus, when invoked with the above command, it'll check the
> socket and if it finds an existing claws-mail instance listening on it,
> it'll simply pass on the command over the socket.  Now days, that
> executable-binary-to-executable-binary communication would likely be
> done over dbus, but of course this setup was implemented long before
> dbus existed, so...

Yes, dbus make it easy, but it also has a few warts which require that the 
receiver be present when the first command is sent, else one has to shut it 
all down and restart things in the proper order.  IMO, if the target 
doesn't exist, dbus should dump to /dev/null, but as is, it blocks even 
after the target becomes available.
> In regard to receive vs receive-all, it can be noted that claws has a
> notion of current account that I'm still getting used to.  When you
> setup accounts, you select one (normally the first one setup) as the
> default, and that's the current account unless you've changed to a
> different one. The simple --receive option just checks that one, I
> think, while --receive-all checks them all.

I actually have kmail setup to check 2 local /var/spool/mail files, we have 
a niece whom I route slightly different because she is on winderz and 
frontiernet.net, which for some reason drives SA bonkers.  So I route that 
before SA even knows its there.
> But I just read back thru that long thread we had on your mailcheck
> script, and it reads as if you have everything pulled into the mail
> spool before your mail client ever even gets involved at all.

Again, correct.  Removing kmail from the fetch mechanics removes the 30 
second or more freezes of the composer UI while typing a reply.  Much more 
pleasant for the user.

> It may
> be that you only need a single receiving account as a result, and
> simple -- receive will work for that.
> (FWIW, claws does have the concept of send-only accounts as well.  So
> it's quite possible to have only one account with receive setup,
> presumably as the default, and a bunch of send-only accounts, if you
> need them.

Again, good guessing and correct.  I did have 3 send accounts, gmail, my 
lifetime account at the tv station, and of course my ISP, shentel.  But 
shentel started farming their email service out to gmail several months 
ago, insists on a max 3 char password, which no longer works of course, and 
to me its a shrug, no use fixing what I don't use.  KMail, with its ability 
to set the default send on a per folder basis means a mailing list reply I 
send always comes from the subscribed account.

> Also, on my feed-reader instance, I have only a single
> "fake" send- only account setup for mail, since claws seems to need at
> least that, and then have the feed plugin setup too, of course, with
> its separate folders.  Since I've only setup a fake account with it, I
> don't have to worry if I accidentally hit "reply" to one of the feed
> articles, since it couldn't go anywhere anyway.)
> As for auto-checking, in preferences under receiving, there's two
> checkboxes, one to check mail at startup, and one to check every N
> minutes.  Then each account has a checkbox for including it in the auto-
> checks, or not.

I've seen that, but that does not sync with the incoming mail so its picked 
up instantly.  My bash script, "mailwatcher" using 'inotifywait' handles 
this by detecting the closing of those files and sending the check mail cmd 
to kmail.

> If all you have is local accounts anyway, so you're not abusing a remote
> server with unnecessarily frequent checks, couldn't you just set your
> mail client, claws-mail or for that matter, kmail, to check for mail
> every one minute?  Then you shouldn't need the script at all.  But it's
> entirely possible there's something in your setup that's either not
> going to allow that, or that you have both local and remote accounts,
> and wouldn't want to set checking every minute, in ordered to avoid
> abusing the remote accounts.

The remote accounts are checked at 3 minute intervals by fetchmail.  gmail 
of course loses that in the noise, and Jimmy said our new server at the tv 
station has enough iron that I could check at 5 second intervals without 
bothering it.  Its a pair of dual core 2.6 Ghz zeon's or similar, 16 gigs 
of ram & a couple terrabyte drives.  Overkill for a 50 employee operation, 
but Jim builds them from scratch.  Usually in 3 space rack mounts one of 
the engineering people builds from scratch too.

Now, I thank you for the attention, but I probably won't be doing much for 
a day or 3 as I had a dime+ sized bit of a basal cell cancer removed from 
my nose yesterday, and the usual bag under my right eye has turned into a 
hell of a shiner, partially blocking my vision.  No pain to speak of, one 
of the advantages, if you can call it that, of being a diabetic.  Worst 
pain was putting in the 'cain, yesterday.

I don't really want to call these years the golden years though, they 
darned sure aren't for wimps. :)

I almost had them move this procedure back a couple of days, as today is 
also our 22nd anniversary.  But if we go out for dinner, I'm going to have 
to plead "yes, but you ought to see the other guy, he's a real mess" :)

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>
<SomeLamer> what's the difference between chattr and chmod?
<SomeGuru> SomeLamer: man chattr > 1; man chmod > 2; diff -u 1 2 | less
	-- Seen on #linux on irc
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