[kde-linux] How to check kmail has some unread mails ?

christophe christophe.dr at free.fr
Tue Mar 27 12:49:10 UTC 2007


Le Mardi 27 Mars 2007 14:41, Kevin Krammer a écrit :
> On Tuesday 27 March 2007 13:59 +0100, christophe wrote:
> > In a script, i'd like to check wether kmail has some unread mails.
> > In order to do so, i found on a mailing list that something like :
> > `cat /home/christophe/.kde/share/apps/kmail/mail/.*.index | grep -c
> > "0000"` would do the trick, but it always returns zero. Where am i wrong
> > ?
> If you have been using KMail for a long time, the mails might be in the old
> location
> ~/Mail

Nope.

>[...]
> % dcop kmail KMailIface folderList | while read folder; do dcop $(dcop
> kmail KMailIface getFolder $folder) unreadMessages; done

I've tried it but it doesn't work.
dcop kmail KMailIface folderList
returns :

/Local
/Local/autres
/Local/autres/acpi4asus
/Local/autres/aldebaran
/Local/autres/kde-linux
/Local/autres/lmsensors
/Local/autres/sourceforge
/Local/autres/unison-users
/Local/autres/video4linux
/Local/drafts
/Local/duf
/Local/inbox
/Local/localhost
/Local/outbox
/Local/sent-mail
/Local/spam
/Local/suseforum
/Local/trash

And of course directories like /local/something don't exist...

>
> Cheers,
> Kevin

-- 
christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20070327/d6a8cd53/attachment.sig>


More information about the kde-linux mailing list