MD5 bd9633fbc0739b499ce331936cca5d47 files/kmail-3.5.2-misc-fixes.diff 10293
RMD160 855c29e1d3462c9d2a7b21e3a0840e577de8ea76 files/kmail-3.5.2-misc-fixes.diff 10293
SHA256 8401d02668a03f8e20baf92304383ea445c6483fc637014f9a4bd888e86fe252 files/kmail-3.5.2-misc-fixes.diff 10293
+AUX kmail-3.5.5-dimap-mail-loss.patch 10075 RMD160 7de6fd6e28d4a1a4ecbffe174d7b1d3f96fb7155 SHA1 1957b99aaa114f647d24c5943ecb3d3fae3382e6 SHA256 411e984a2b0eb079351b1f3c28ae0c72b4360449b743b559fecad074bf869fb2
+MD5 defcf09940f42413c805da114fa06dd4 files/kmail-3.5.5-dimap-mail-loss.patch 10075
+RMD160 7de6fd6e28d4a1a4ecbffe174d7b1d3f96fb7155 files/kmail-3.5.5-dimap-mail-loss.patch 10075
+SHA256 411e984a2b0eb079351b1f3c28ae0c72b4360449b743b559fecad074bf869fb2 files/kmail-3.5.5-dimap-mail-loss.patch 10075
DIST kdepim-3.5.2.tar.bz2 12887336 RMD160 8e6571d14bbf6b3370c4fdb108a1a79625e87365 SHA1 1907bc219d2dd51a376a99d0f7e6b9af97d5adf7 SHA256 9c038a80912894b3ec132b2c7219ec5549ca80dcdeec88555928d2e038966539
DIST kdepim-3.5.3.tar.bz2 12912017 RMD160 fdd951d6c117246f170986d944d3d61c094e9a00 SHA1 c957fffefaa73e8be670b2a2d639b82205fe5309 SHA256 460f9104c63c8a57801f5405be7c709e8604abf93c7f35ee9d60d20e0e0e5adb
DIST kdepim-3.5.4.tar.bz2 12925075 RMD160 d3ecf9353dc578c392e1b82c72c7b8a2a88fdcdc SHA1 5db32e856be53d22d5f71a2465f877db4e8be91d SHA256 b31dee9c2d7ebdeb1841c22dbdeaf1c88ee1f0d3b11897592305ec076d02edfa
MD5 0fcc33895c22ad4399c98cad4c3430bc kmail-3.5.4.ebuild 1995
RMD160 33ce6eff4092613faa75039c31bdba8ec26a4d0a kmail-3.5.4.ebuild 1995
SHA256 46a1a428145785aaac693490ff7890f3493deb32a08ea3e2b42c4f45bb0395e6 kmail-3.5.4.ebuild 1995
+EBUILD kmail-3.5.5-r1.ebuild 2013 RMD160 186ab6c1dc95d39eea0d9d91f29c12edd75bc877 SHA1 94c64a8c4b2401c7235ca55e93cb078e2db1652f SHA256 c00013d3a622cb1c97c1b5879a6de18f6bee997d223cbeeda1b3cdd7eb0a2ef4
+MD5 371c06b11e4124b0ab336c0e2662e9d6 kmail-3.5.5-r1.ebuild 2013
+RMD160 186ab6c1dc95d39eea0d9d91f29c12edd75bc877 kmail-3.5.5-r1.ebuild 2013
+SHA256 c00013d3a622cb1c97c1b5879a6de18f6bee997d223cbeeda1b3cdd7eb0a2ef4 kmail-3.5.5-r1.ebuild 2013
EBUILD kmail-3.5.5.ebuild 2083 RMD160 62ec23bf917ec7b5b8bb3de77f5a9328b4282339 SHA1 bd5a1683f3deb6f47e5f045209fddcf31b7aa355 SHA256 47fb67cab8554d683baac96d38b321b994775d72a5f4277253a473754a55d524
MD5 ec71a9580dd1f96eb64351bfbbfdbb65 kmail-3.5.5.ebuild 2083
RMD160 62ec23bf917ec7b5b8bb3de77f5a9328b4282339 kmail-3.5.5.ebuild 2083
SHA256 47fb67cab8554d683baac96d38b321b994775d72a5f4277253a473754a55d524 kmail-3.5.5.ebuild 2083
-MISC ChangeLog 11151 RMD160 02c01185b724617024c6d81f7fb0ae25a7a2b451 SHA1 23310088c5fbd2fc6f97581357669d3d89778b12 SHA256 1ce9589f3f3829d5837936f2a479de0b2a7ec27c6ed8793f59742832d97bd9ca
-MD5 3326c246d76319429dcf1e51004de50b ChangeLog 11151
-RMD160 02c01185b724617024c6d81f7fb0ae25a7a2b451 ChangeLog 11151
-SHA256 1ce9589f3f3829d5837936f2a479de0b2a7ec27c6ed8793f59742832d97bd9ca ChangeLog 11151
+MISC ChangeLog 11350 RMD160 61924bae645e57db643a6973670258f64ecfe7a6 SHA1 953ffc54e0b5d39d9814132c4f893da4f2b06d17 SHA256 27d708c79ba7d4cffae65a8166645cb9f0b0f9edf4cf3fb3af4f737c71ea2c2f
+MD5 74fbc75f1366ccd84e4957bc5138ece5 ChangeLog 11350
+RMD160 61924bae645e57db643a6973670258f64ecfe7a6 ChangeLog 11350
+SHA256 27d708c79ba7d4cffae65a8166645cb9f0b0f9edf4cf3fb3af4f737c71ea2c2f ChangeLog 11350
MISC metadata.xml 156 RMD160 ecce3b981f150c45ae1e84e2d208e678d6124259 SHA1 b64f7c0b4e5db816d82ad19848f72118af129d35 SHA256 2f4da28506b9d4185f320f67a6191d30c7a921217ed4447ed46ea0bc4aefc79a
MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156
RMD160 ecce3b981f150c45ae1e84e2d208e678d6124259 metadata.xml 156
MD5 805592bb13fc869af5c4ae1670b84edd files/digest-kmail-3.5.5 247
RMD160 431fdb9163eb9f1552e68f14b4f4c1deb467c7bf files/digest-kmail-3.5.5 247
SHA256 79f3b37a9c00197e5c3d06173ef9526420d44109e12c7b0e69e1b3e5efce6daf files/digest-kmail-3.5.5 247
+MD5 805592bb13fc869af5c4ae1670b84edd files/digest-kmail-3.5.5-r1 247
+RMD160 431fdb9163eb9f1552e68f14b4f4c1deb467c7bf files/digest-kmail-3.5.5-r1 247
+SHA256 79f3b37a9c00197e5c3d06173ef9526420d44109e12c7b0e69e1b3e5efce6daf files/digest-kmail-3.5.5-r1 247
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
-iD8DBQFFIkRcAiZjviIA2XgRAs8HAKCytXjLdY3K2uEkvQRm+Reh4aaiyQCg4zkf
-dXE7y4+p4I6tlta9NSXNOrU=
-=zarf
+iD8DBQFFT9ILAiZjviIA2XgRAh5NAKDjBolA8eRQeHxwg4OU+pA71vL3mACePVSd
+rT8GPwB4wxrjJJ3WuOiyNts=
+=IKr1
-----END PGP SIGNATURE-----
--- /dev/null
+Index: kmail/kmfoldercachedimap.cpp
+===================================================================
+--- kmail/kmfoldercachedimap.cpp (revision 597658)
++++ kmail/kmfoldercachedimap.cpp (revision 597659)
+@@ -75,6 +75,7 @@
+ #include <globalsettings.h>
+
+ #define UIDCACHE_VERSION 1
++#define MAIL_LOSS_DEBUGGING 0
+
+ static QString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) {
+ switch (r) {
+@@ -150,10 +151,22 @@
+ mFolderRemoved( false ),
+ /*mHoldSyncs( false ),*/ mRecurse( true ),
+ mStatusChangedLocally( false ), mAnnotationFolderTypeChanged( false ),
+- mIncidencesForChanged( false ), mPersonalNamespacesCheckDone( true )
++ mIncidencesForChanged( false ), mPersonalNamespacesCheckDone( true ),
++ mFoundAnIMAPDigest( false )
+ {
+ setUidValidity("");
+- readUidCache();
++ // if we fail to read a uid file but there is one, nuke it
++ if ( readUidCache() == -1 ) {
++ if ( QFile::exists( uidCacheLocation() ) ) {
++ KMessageBox::error( 0,
++ i18n( "The UID cache file for folder %1 could not be read. There "
++ "could be a problem with file system permission, or it is corrupted."
++ ).arg( folder->prettyURL() ) );
++ // try to unlink it, in case it was corruped. If it couldn't be read
++ // because of permissions, this will fail, which is fine
++ unlink( QFile::encodeName( uidCacheLocation() ) );
++ }
++ }
+
+ mProgress = 0;
+ }
+@@ -306,7 +319,7 @@
+ if( uidValidity().isEmpty() || uidValidity() == "INVALID" ) {
+ // No info from the server yet, remove the file.
+ if( QFile::exists( uidCacheLocation() ) )
+- unlink( QFile::encodeName( uidCacheLocation() ) );
++ return unlink( QFile::encodeName( uidCacheLocation() ) );
+ return 0;
+ }
+
+@@ -317,17 +330,23 @@
+ str << uidValidity() << endl;
+ str << lastUid() << endl;
+ uidcache.flush();
+- fsync( uidcache.handle() ); /* this is probably overkill */
+- uidcache.close();
+- return 0;
+- } else {
+- return errno; /* does QFile set errno? */
++ if ( uidcache.status() == IO_Ok ) {
++ fsync( uidcache.handle() ); /* this is probably overkill */
++ uidcache.close();
++ if ( uidcache.status() == IO_Ok )
++ return 0;
++ }
+ }
++ KMessageBox::error( 0,
++ i18n( "The UID cache file for folder %1 could not be written. There "
++ "could be a problem with file system permission." ).arg( folder()->prettyURL() ) );
++
++ return -1;
+ }
+
+ void KMFolderCachedImap::reloadUidMap()
+ {
+- kdDebug(5006) << "Reloading Uid Map " << endl;
++ //kdDebug(5006) << "Reloading Uid Map " << endl;
+ uidMap.clear();
+ open();
+ for( int i = 0; i < count(); ++i ) {
+@@ -448,7 +467,8 @@
+ {
+ killTimer( uidWriteTimer );
+ uidWriteTimer = -1;
+- writeUidCache();
++ if ( writeUidCache() == -1 )
++ unlink( QFile::encodeName( uidCacheLocation() ) );
+ }
+
+ ulong KMFolderCachedImap::lastUid()
+@@ -467,10 +487,22 @@
+ QMap<ulong,int>::Iterator it = uidMap.find( uid );
+ if( it != uidMap.end() ) {
+ KMMsgBase *msg = getMsgBase( *it );
++#ifdef MAIL_LOSS_DEBUGGING
++ kdDebug(5006) << "UID " << uid << " is supposed to be in the map" << endl;
++ kdDebug(5006) << "UID's index is to be " << *it << endl;
++ kdDebug(5006) << "There is a message there? " << (msg != 0) << endl;
++ if ( msg ) {
++ kdDebug(5006) << "Its UID is: " << msg->UID() << endl;
++ }
++#endif
++
+ if( msg && msg->UID() == uid )
+ return msg;
++ kdDebug(5006) << "########## Didn't find uid: " << uid << "in cache athough it's supposed to be there!" << endl;
+ } else {
++#ifdef MAIL_LOSS_DEBUGGING
+ kdDebug(5006) << "Didn't find uid: " << uid << "in cache!" << endl;
++#endif
+ }
+ // Not found by now
+ // if( mapReloaded )
+@@ -482,8 +514,10 @@
+ if( it != uidMap.end() )
+ // Since the uid map is just rebuilt, no need for the sanity check
+ return getMsgBase( *it );
++#ifdef MAIL_LOSS_DEBUGGING
+ else
+ kdDebug(5006) << "Reloaded, but stil didn't find uid: " << uid << endl;
++#endif
+ // Then it's not here
+ return 0;
+ }
+@@ -841,9 +875,14 @@
+ to be deleted on the server has been deleted, adjust our local notion of the
+ highes uid seen thus far. */
+ slotUpdateLastUid();
+- if( mLastUid == 0 && uidWriteTimer == -1 )
++ if( mLastUid == 0 && uidWriteTimer == -1 ) {
+ // This is probably a new and empty folder. Write the UID cache
+- writeUidCache();
++ if ( writeUidCache() == -1 ) {
++ resetSyncState();
++ emit folderComplete( this, false );
++ return;
++ }
++ }
+ }
+ }
+
+@@ -1209,9 +1248,10 @@
+ void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const QString&, bool cont)
+ {
+ if ( mSyncState == SYNC_STATE_INITIAL ){
+- kdDebug(5006) << "IMAP status changed but reset " << endl;
++ //kdDebug(5006) << "IMAP status changed but reset " << endl;
+ return; // we were reset
+ }
++ //kdDebug(5006) << "IMAP status changed for folder: " << folder->prettyURL() << endl;
+ if ( folder->storage() == this ) {
+ --mStatusFlagsJobs;
+ if ( mStatusFlagsJobs == 0 || !cont ) // done or aborting
+@@ -1220,6 +1260,7 @@
+ if ( mStatusFlagsJobs == 0 && cont ) {
+ mProgress += 5;
+ serverSyncInternal();
++ //kdDebug(5006) << "Proceeding with mailcheck." << endl;
+ }
+ }
+ }
+@@ -1288,15 +1329,24 @@
+ // them one by one because the index list can get resized under
+ // us. So use msg pointers instead
+
++ QStringList uids;
+ QMap<ulong,int>::const_iterator it = uidMap.constBegin();
+ for( ; it != uidMap.end(); it++ ) {
+ ulong uid ( it.key() );
+- if( uid!=0 && !uidsOnServer.find( uid ) )
++ if( uid!=0 && !uidsOnServer.find( uid ) ) {
++ uids << QString::number( uid );
+ msgsForDeletion.append( getMsg( *it ) );
++ }
+ }
+
+ if( !msgsForDeletion.isEmpty() ) {
+- removeMsg( msgsForDeletion );
++#ifdef MAIL_LOSS_DEBUGGING
++ if ( KMessageBox::warningYesNo(
++ 0, i18n( "<qt><p>Mails on the server in folder <b>%1</b> were deleted. "
++ "Do you want to delete them locally?<br>UIDs: %2</p></qt>" )
++ .arg( folder()->prettyURL() ).arg( uids.join(",") ) ) == KMessageBox::Yes )
++#endif
++ removeMsg( msgsForDeletion );
+ }
+
+ /* Delete messages from the server that we dont have anymore */
+@@ -1370,6 +1420,8 @@
+ uidsForDeletionOnServer.clear();
+ mMsgsForDownload.clear();
+ mUidsForDownload.clear();
++ // listing is only considered successful if saw a syntactically correct imapdigest
++ mFoundAnIMAPDigest = false;
+
+ CachedImapJob* job = new CachedImapJob( FolderJob::tListMessages, this );
+ connect( job, SIGNAL( result(KMail::FolderJob *) ),
+@@ -1415,6 +1467,7 @@
+ setReadOnly( access == "Read only" );
+ }
+ (*it).cdata.remove(0, pos);
++ mFoundAnIMAPDigest = true;
+ }
+ pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1);
+ // Start with something largish when rebuilding the cache
+@@ -1432,7 +1485,7 @@
+ if( uid != 0 ) {
+ if ( uidsOnServer.count() == uidsOnServer.size() ) {
+ uidsOnServer.resize( KMail::nextPrime( uidsOnServer.size() * 2 ) );
+- kdDebug( 5006 ) << "Resizing to: " << uidsOnServer.size() << endl;
++ //kdDebug( 5006 ) << "Resizing to: " << uidsOnServer.size() << endl;
+ }
+ uidsOnServer.insert( uid, &v );
+ }
+@@ -1451,7 +1504,9 @@
+ KMMsgBase *existingMessage = findByUID(uid);
+ if( !existingMessage ) {
+ if ( mUserRights <= 0 || ( mUserRights & KMail::ACLJobs::Delete ) ) {
+- // kdDebug(5006) << "message with uid " << uid << " is gone from local cache. Must be deleted on server!!!" << endl;
++#ifdef MAIL_LOSS_DEBUGGING
++ kdDebug(5006) << "message with uid " << uid << " is gone from local cache. Must be deleted on server!!!" << endl;
++#endif
+ uidsForDeletionOnServer << uid;
+ } else {
+ redownload = true;
+@@ -1490,6 +1545,13 @@
+ void KMFolderCachedImap::getMessagesResult( KMail::FolderJob *job, bool lastSet )
+ {
+ mProgress += 10;
++ if ( !job->error() && !mFoundAnIMAPDigest ) {
++ kdWarning(5006) << "######## Folderlisting did not complete, but there was no error! "
++ "Aborting sync of folder: " << folder()->prettyURL() << endl;
++#ifdef MAIL_LOSS_DEBUGGING
++ kmkernel->emergencyExit( i18n("Folder listing failed in interesting ways." ) );
++#endif
++ }
+ if( job->error() ) { // error listing messages but the user chose to continue
+ mContentState = imapNoInformation;
+ mSyncState = SYNC_STATE_HANDLE_INBOX; // be sure not to continue in this folder
+@@ -1741,7 +1803,7 @@
+ KMFolderNode *node;
+ bool root = ( this == mAccount->rootFolder() );
+ if ( root && !mAccount->hasInbox() ) {
+- kdDebug(5006) << "check INBOX" << endl;
++ //kdDebug(5006) << "check INBOX" << endl;
+ // create the INBOX
+ for (node = folder()->child()->first(); node; node = folder()->child()->next())
+ if (!node->isDir() && node->name() == "INBOX") break;
+@@ -2216,7 +2278,7 @@
+ void
+ KMFolderCachedImap::slotAnnotationChanged( const QString& entry, const QString& attribute, const QString& value )
+ {
+- kdDebug(5006) << k_funcinfo << entry << " " << attribute << " " << value << endl;
++ //kdDebug(5006) << k_funcinfo << entry << " " << attribute << " " << value << endl;
+ if ( entry == KOLAB_FOLDERTYPE )
+ mAnnotationFolderTypeChanged = false;
+ else if ( entry == KOLAB_INCIDENCESFOR ) {
+Index: kmail/kmfoldercachedimap.h
+===================================================================
+--- kmail/kmfoldercachedimap.h (revision 597658)
++++ kmail/kmfoldercachedimap.h (revision 597659)
+@@ -445,6 +445,11 @@
+ mLastUid. See above for details. */
+ ulong mTentativeHighestUid;
+
++ /** Used to determine whether listing messages yielded a sensible result.
++ * Only then is the deletion o messages (which relies on succesful
++ * listing) attempted, during the sync. */
++ bool mFoundAnIMAPDigest;
++
+ int mUserRights;
+ ACLList mACLList;
+