Version: (using KDE KDE 3.5.5) Installed from: Gentoo Packages OS: Linux When you have an LDAP resource defined (without offline caching), and there is a change on the LDAP server (ie. via phpldapadmin or some other client) - it doesn't get picked up within Kontact. You either need to quit kontact and restart it (unacceptable in corporate environment), or un-check and re-check the resource (again - not acceptable). I think under 3.5.3, Kontact would pick up the changes.. 3.5.4 and 3.5.5 do not however. There is some type of caching happening, even though offline caching is completely disabled. BJ.
The following patch forces a re-load of any active LDAP resources everytime there is a check for new mail. It may not be the most elegant of solutions but it works! BJ. --- accountmanager.cpp 2006-10-23 10:57:50.000000000 -0400 +++ /usr/portage/distfiles/kdepim-3.5.5/kmail/accountmanager.cpp 2006-10-24 11:11:22.000000000 -0400 @@ -26,6 +26,18 @@ #include <qregexp.h> #include <qvaluelist.h> +// Include files for LDAP re-load +#include <qptrlist.h> +#include <kresources/resource.h> + +#include <kabc/addressbook.h> +#include <kabc/stdaddressbook.h> +#include <kabc/resource.h> +#include "ldapclient.h" + +#include "kabc/resourceldapkio.h" +// + using namespace KMail; //----------------------------------------------------------------------------- @@ -312,6 +324,25 @@ if ( !(*it)->checkExclude() ) singleCheckMail( (*it), _interactive); } + + KABC::AddressBook* myAB = KABC::StdAddressBook::self(false); + + QPtrList<KABC::Resource> kabcResources = myAB->resources(); + QPtrListIterator<KABC::Resource> kabcResourceIterator( kabcResources ); + + KABC::Resource* i; + + while( (i = kabcResourceIterator.current() ) != 0) + { + ++kabcResourceIterator; + KRES::Resource* res = static_cast<KRES::Resource*>( i ); + if(res && res->type() == "ldapkio") { + if (res->isActive()) { + i->load(); + } + } + } + }
Thank you for taking the time to file a bug report. KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2. We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.