Michael Haeckel
ed29cf8fc9
Expire old messages from any folder.
...
Patch by Samuel Penn <sam@bifrost.demon.co.uk>.
svn path=/trunk/kdenetwork/kmail/; revision=119556
25 years ago
David Faure
60198e652a
CVS_SILENT fixheaders
...
svn path=/trunk/kdenetwork/kmail/; revision=117511
25 years ago
Dirk Mueller
6797558d5d
356 includes less
...
svn path=/trunk/kdenetwork/kmail/; revision=117339
25 years ago
Michael Haeckel
f532a1d6fb
Don't crash, when moving several messages from an IMAP folder to a local one.
...
svn path=/trunk/kdenetwork/kmail/; revision=115849
25 years ago
Michael Haeckel
afaa128982
Prevent some compiler warnings.
...
svn path=/trunk/kdenetwork/kmail/; revision=114851
25 years ago
Michael Haeckel
82339c4c96
Make moving/copying multiple mails from IMAP to local folders working again
...
correctely.
svn path=/trunk/kdenetwork/kmail/; revision=113902
25 years ago
Michael Haeckel
3053058627
QList -> QPtrList
...
svn path=/trunk/kdenetwork/kmail/; revision=112855
25 years ago
Michael Haeckel
e3127d7f19
Store the IMAP folder also in a KMFolderMgr like the local folders.
...
- Allows easily keeping track of obsolete cache files. These are now cleaned up.
- IMAP folders are now always accesible, not only when already connected.
svn path=/trunk/kdenetwork/kmail/; revision=111641
25 years ago
Don Sanders
80a5c3453d
Fix problem with index file corruption detection. It was returning a lot
...
of false positives.
svn path=/trunk/kdenetwork/kmail/; revision=109794
25 years ago
Kurt Granroth
0b28159da9
Massive commit to include native maildir-style mailboxes support in
...
KMail. To test, create a Child Folder and select "maildir" as the
mailbox type.
svn path=/trunk/kdenetwork/kmail/; revision=109511
25 years ago
Michael Haeckel
afcde8f996
Permanent IMAP header caching.
...
svn path=/trunk/kdenetwork/kmail/; revision=109324
25 years ago
Don Sanders
21474c87be
Disable recently added sanity checking, was necessary due to the
...
incurable insanity of nfs.
svn path=/trunk/kdenetwork/kmail/; revision=107601
25 years ago
Don Sanders
ff043abbf7
Fix problem with local accounts introduced by my last commit.
...
svn path=/trunk/kdenetwork/kmail/; revision=106707
25 years ago
Don Sanders
0a0bb2b8d2
Here's a patch which works towards a couple of goals.
...
The idea is to attempt to prevent mail loss when exceptional
events that KMail was not designed to handle occur.
In order to prevent mail loss when an external application
(like procmail) modifies folder files in ~/Mail I want to
check for an out of date index file everywhere that the
index file is updated which is in three places.
1) When closing (for real) a folder
2) When adding message to a folder
3) When compacting a folder
There's also the possibility that an external program
modifies a folder file but doesn't update its date, making
the kmail index file out of sync with the corresponding
folder file. I want to check for this, and if it occurs
then no longer compact that folder file (disabling
compaction should eliminate the possibility of losing mail
due to an index file being out of sync).
I have two ideas for doing this.
1) Check that the index entry matches the folder file when
a message is selected and if not disable compaction for
that folder (I've done that in the attached patch, it would
be best to prompt the user asking if they want to regnerate
the index file).
2) When compacting check that the index entry matches the
folder file. I'm working on a way to this quickly.
svn path=/trunk/kdenetwork/kmail/; revision=106520
25 years ago
Don Sanders
04a6be9323
Revert undiscussed commit by tanton
...
svn path=/trunk/kdenetwork/kmail/; revision=105335
25 years ago
Don Sanders
e2abc31a31
Added missing resize calls.
...
diff -u -r1.176 kmfolder.cpp
--- kmfolder.cpp 2001/07/07 19:13:07 1.176
+++ kmfolder.cpp 2001/07/08 14:16:04
@@ -1724,7 +1724,8 @@
}
mi = (KMMsgInfo*)mMsgList[idx];
msize = mi->msgSize();
- mtext.resize(msize+2);
+ if (mtext.size() < msize + 2)
+ mtext.resize(msize+2);
folder_offset = mi->folderOffset();
//now we need to find the separator! grr...
@@ -1734,9 +1735,13 @@
rc = errno;
break;
}
+ if (mtext.size() < 20)
+ mtext.resize(20);
fread(mtext.data(), 20, 1, mStream);
if(i <= 0) { //woops we've reached the top of the file, last try..
if(!strncasecmp(mtext.data(), "from ", 5)) {
+ if (mtext.size() < folder_offset)
+ mtext.resize(folder_offset);
if(fseek(mStream, chunk_offset, SEEK_SET) == -1 ||
!fread(mtext.data(), folder_offset, 1, mStream) ||
!fwrite(mtext.data(), folder_offset, 1, tmpfile)) {
@@ -1756,6 +1761,8 @@
}
if(last_crlf != -1) {
int size = folder_offset - (i + last_crlf+1);
+ if (mtext.size() < size)
+ mtext.resize(size);
if(fseek(mStream, i + last_crlf+1, SEEK_SET) == -1 ||
!fread(mtext.data(), size, 1, mStream) ||
!fwrite(mtext.data(), size, 1, tmpfile)) {
svn path=/trunk/kdenetwork/kmail/; revision=105334
25 years ago
Tobias Anton
2c506f40b0
this fixes a crash when parsing a corrupted index file.
...
looked over my mark, but not posted for review because
there's no open smtp i know.
anton at stud dot fbi dot fh-darmstadt dot de
Index: kmfolder.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmfolder.cpp,v
retrieving revision 1.175
diff -r1.175 kmfolder.cpp
872a873
> bool conversion_result;
892c893,896
< mi->compat_fromOldIndexString(line, mConvertToUtf8);
---
> // convert from old index file format.
> // TODO: make use of return value from
> // compat_fromOldIndexString (tobias)
> conversion_result = mi->compat_fromOldIndexString(line, mConvertToUtf8);
895a900,902
> // could this be the desired solution? (tobias)
> // if (!conversion_result)
> // break;
Index: kmmsginfo.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmsginfo.cpp,v
retrieving revision 1.28
diff -r1.28 kmmsginfo.cpp
6a7,8
> #include <kdebug.h>
>
341c343
< void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8)
---
> bool KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8)
352a355,368
> // TODO: have stricter checks, e.g. for zero strings
> if (str.length()<263+22)
> {
> kdDebug(5001) << "Index string too short: "
> << str.length()
> << "characters."
> << endl << "using default values." << endl;
> kd->subject = QString();
> kd->from = QString();
> kd->to = QString();
> kd->replyToIdMD5 = QString();
> kd->msgIdMD5 = QString();
> return false;
> }
357,358c373,377
< } else {
< start = offset = str.data() + 37;
---
> }
> else
> {
> QCString midstr;
> start = offset = str.data () + 37;
360,361c379,384
< kd->subject = QString::fromUtf8(str.mid(start - str.data(),
< 100 - (start - offset)), 100 - (start - offset));
---
> midstr = str.mid(start - str.data(), 100 - (start - offset));
> if (!midstr.isNull())
> kd->subject = QString::fromUtf8(midstr,100 - (start - offset));
> else
> kd->subject = QString();
>
364,365c387,392
< kd->from = QString::fromUtf8(str.mid(start - str.data(),
< 50 - (start - offset)), 50 - (start - offset));
---
> midstr = str.mid(start - str.data(), 50 - (start - offset));
> if (!midstr.isNull())
> kd->from = QString::fromUtf8(midstr, 50 - (start - offset));
> else
> kd->from = QString();
>
368,369c395,399
< kd->to = QString::fromUtf8(str.mid(start - str.data(),
< 50 - (start - offset)), 50 - (start - offset));
---
> midstr = str.mid(start - str.data(), 50 - (start - offset));
> if (!midstr.isNull())
> kd->to = QString::fromUtf8(midstr, 50 - (start - offset));
> else
> kd->to = QString();
373a404
> return true;
svn path=/trunk/kdenetwork/kmail/; revision=105260
25 years ago
Don Sanders
6b45aa141a
Don't fsync a KMFolder after everytime addMsg is called.
...
Instead when checking for new mail sync just before expunging the local
account or just before deleting mail from the pop server. I guess syncing
isn't currently as issue for imap.
There is a question of whether/when sync should be called for other
operations such as moving messages between folders.
svn path=/trunk/kdenetwork/kmail/; revision=105142
25 years ago
Don Sanders
c51b01e9b6
More robust handling of upgrading index files corrupted with nulls.
...
svn path=/trunk/kdenetwork/kmail/; revision=105125
25 years ago
Don Sanders
8d1e6dd3fa
Critical bug fix - please move tag.
...
Index file corruption could occur if KMail was killed at a sensitive
stage of folder compaction. This bug was introduced by Sam's patch.
rc = fsync(fileno(tmpfile));
rc |= fclose(tmpfile);
if (!rc) {
+ bool autoCreate = mAutoCreateIndex;
+ _rename(tempName.local8Bit(), location().local8Bit());
writeIndex();
+ writeConfig();
+ mAutoCreateIndex = false;
close(TRUE);
- _rename(tempName.local8Bit(), location().local8Bit());
+ mAutoCreateIndex = autoCreate;
}
svn path=/trunk/kdenetwork/kmail/; revision=103871
25 years ago
Don Sanders
7bae55584e
Possibly improve reliability on unclean shutdown of the operating system.
...
svn path=/trunk/kdenetwork/kmail/; revision=103812
25 years ago
Michael Haeckel
71a665f186
Escape leading dots in foldernames of imap folders.
...
Otherwise KMail claims, it has found mailbox files from a KMail version of a
different univers of the generation after next with version number 135949380,
if the user browes a ~/Mail directory produced from KMail via IMAP and has
hidden folders enabled.
svn path=/trunk/kdenetwork/kmail/; revision=103059
25 years ago
Michael Haeckel
e895b47719
Mailing list IMAP folders work now correctely without loosing the settings.
...
svn path=/trunk/kdenetwork/kmail/; revision=103040
25 years ago
Don Sanders
858d958c03
I've fixed the problem with deleting messages
...
causing trailing "F"s.
Now that Sam's patch has been applied KMMsgInfos store an
offset into an mbox and the length of the message at that
point.
But a problem occurs when a new message is appended to an
mbox. KMail ensures a '\n' separator is appended in the
file to separate the last message in the mbox from the
"From ..." mbox separator that will be inserted for the
new message.
This causing a complication that the last message in the
mbox must have its length updated (otherwise compaction is
messed up).
The patch fixes an exception to the above. If a message at
the end of the mbox is deleted then we don't want to update
the length of the last (undeleted) message in the mbox (as
that length has already been updated earlier when new mail
arrived).
This patch won't fix currently deleted mbox files. I'm not
to sure how bad the corruption it. Hmm, might be bad.
I also noticed that the "revert" variable seems to be set
wrong. It is used to roll back the mbox when a critical
error (like disk space exhausted) occurs. So I fixed that
also.
svn path=/trunk/kdenetwork/kmail/; revision=102830
25 years ago
Michael Haeckel
ba08a83bc8
ASCII_CAST cleanup for kmmsgbase.cpp and kmacctlocal.cpp.
...
svn path=/trunk/kdenetwork/kmail/; revision=102473
25 years ago
Michael Haeckel
ceffd57016
- Store filenames always in unicode. Although this requires much more local8Bit
...
conversions, it indeed gives a better overview in the code.
This also fixes a few minor problems with non-latin folder names.
- Remove all subfolders, when removing a folder, not only the first one.
- Remove some unused code.
svn path=/trunk/kdenetwork/kmail/; revision=102457
25 years ago
Stephan Kulow
fad19ec9f2
converting the remaining qDebug calls to kdDebug(5006)
...
svn path=/trunk/kdenetwork/kmail/; revision=102083
25 years ago
Stephan Kulow
6164556515
use debug area 5006 - so I can read mails without seeing tons of debug output
...
svn path=/trunk/kdenetwork/kmail/; revision=101769
25 years ago
Michael Haeckel
f5fbc88803
kmfolder and kmheaders are not also ascii cast free.
...
Still 11 files left.
svn path=/trunk/kdenetwork/kmail/; revision=101702
25 years ago
Michael Haeckel
1ea3c09114
Revert two broken commits.
...
svn path=/trunk/kdenetwork/kmail/; revision=101661
25 years ago
Luk Tinkl
83535fa909
passing .latin1() to system() is a no no
...
svn path=/trunk/kdenetwork/kmail/; revision=101589
25 years ago
Marc Mutz
20ed595a46
Add #undef QT_NO_{ASCII_CAST,COMPAT}, resp. to the tops of .cpp files that
...
need them, in preparation of the remove of -UQT_NO_* from Makefile.am.
svn path=/trunk/kdenetwork/kmail/; revision=101548
25 years ago
Michael Haeckel
669052969c
Prevent some compiler warnings.
...
svn path=/trunk/kdenetwork/kmail/; revision=98230
25 years ago
Michael Haeckel
c580d6066c
Patch from Don Sanders <sanders@kde.org> and Sam Magnuson <sam@trolltech.com>
...
Heavy speedup for huge folders.
svn path=/trunk/kdenetwork/kmail/; revision=98218
25 years ago
Michael Haeckel
fe832697f1
Remove all QObject::initMetaObject() calls, since they are automatically
...
executed on demand according to the QT docs.
Patch by Marc Mutz <Marc.Mutz@uni-bielefeld.de>
svn path=/trunk/kdenetwork/kmail/; revision=97957
25 years ago
Stephan Kulow
8ca8afd932
making use of indentities indepent of mailing lists
...
svn path=/trunk/kdenetwork/kmail/; revision=97394
25 years ago
Michael Haeckel
84eeb6eb0e
Use KConfigGroupSaver everywhere.
...
Patch by Marc Mutz <Marc.Mutz@uni-bielefeld.de>
svn path=/trunk/kdenetwork/kmail/; revision=97385
25 years ago
Stephan Kulow
29021bdb05
.copy on a Qt string is a noop since quite some Qt versions
...
svn path=/trunk/kdenetwork/kmail/; revision=96404
25 years ago
Michael Haeckel
e5adf2a876
Don't add an empty Content-Type header to mails, that don't have one.
...
svn path=/trunk/kdenetwork/kmail/; revision=95651
25 years ago
Stephan Kulow
ae16a29f43
- msgStr = i18n("Creating index file: %1 messages done").arg(num);
...
+ msgStr = i18n("Creating index file: %n message done",
"Creating index file: %n messages done", num);
svn path=/trunk/kdenetwork/kmail/; revision=94725
25 years ago
Michael Haeckel
7a32089a2c
Specifiy an identity for every mailing list.
...
Patch by Ingo Klöcker <ingo.kloecker@epost.de>
svn path=/trunk/kdenetwork/kmail/; revision=93728
25 years ago
Stephan Kulow
fec2831df5
removing "const QString" in return values and parameters. It only confuses compilers,
...
using const QString& in parameters and QString in return values
svn path=/trunk/kdenetwork/kmail/; revision=92546
25 years ago
Michael Haeckel
98e452c985
- Don't crash when exiting KMail while a message in an IMAP folder is selected
...
which has for some reason no X-UID header.
- Don't eat the X-UID header of every first message in a folder.
svn path=/trunk/kdenetwork/kmail/; revision=92524
25 years ago
Michael Haeckel
2d8e17a6d5
Display a warning, if the outbox contains messages not created by KMail.
...
svn path=/trunk/kdenetwork/kmail/; revision=92485
25 years ago
Michael Haeckel
0a5f7eb30e
Remember the number of unread message in an IMAP folder when switching to a
...
different one.
svn path=/trunk/kdenetwork/kmail/; revision=91299
25 years ago
Michael Haeckel
eb7de92e2e
Don't add mails to the cached headers automatically when moving/copying to IMAP
...
folders. Leads only to trouble, since the new UID is not yet known.
svn path=/trunk/kdenetwork/kmail/; revision=90177
25 years ago
Michael Haeckel
204e397c5d
- Don't eat the last character of every line, when moving a message from local
...
to IMAP
- Don't crash, when deleting part of a thread in an IMAP folder
- Copying messages within the same IMAP account now also copies on the server
svn path=/trunk/kdenetwork/kmail/; revision=89913
25 years ago
Michael Haeckel
500ac30a5b
Moving mails between IMAP folders on the same server now uses the IMAP copy
...
command.
svn path=/trunk/kdenetwork/kmail/; revision=89814
25 years ago
Daniel Naber
a3f6c58045
init mMailingListEnabled = false or you'll end up with
...
an inbox that let's you use "Post to mailing list"
svn path=/trunk/kdenetwork/kmail/; revision=89670
25 years ago
Michael Haeckel
cf96285095
Don't crash, when selecting a message which is in progress of being moved.
...
Since I don't like a modal progress window as present in some other clients,
these cases need handling.
svn path=/trunk/kdenetwork/kmail/; revision=89245
25 years ago