Bug 43931 - "ghost messages" stay in outbox
Summary: "ghost messages" stay in outbox
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports All
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 45746 48544 50218 51448 51525 52102 52129 54834 55838 57149 58369 58965 60858 63475 64172 65243 69409 73773 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-14 19:33 UTC by ebakke
Modified: 2009-12-25 15:02 UTC (History)
18 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ebakke 2002-06-14 19:24:21 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kmail
Version:           KDE 3.0.1 
Severity:          normal
Installed from:    FreeBSD Ports
Compiler:          gcc 2.95.3
OS:                FreeBSD
OS/Compiler notes: FreeBSD 4.6

In some cases when I try to send emails KMail gives me an error message saying the message can't be sent because the sender address is missing.  The message will stay in the outbox until the problem is fixed.

Trying to resend the message will work some times but usually not.  The sender address is specified in my KMail configuration and when I ask to see all header fields it is also present there.

In most cases I have to delete the message and type it again.  On the second try the message is usually sent without problems.


(Submitted via bugs.kde.org)
Comment 1 Daniel Naber 2002-09-19 02:59:19 UTC
Are you sure you're not mixing this up with a mistyped *receiver* address? 
Comment 2 degs 2002-10-03 12:09:11 UTC
I also see this. I think the problem is not the message that I'm currently 
trying to send, its empty messages stuck in the outbox (sender: unknown, to: 
unknown). Not clear how these messages get into the inbox, but clearing them 
allows other messages to be sent successfully again. 
 
degs@giantblob.com 
Comment 3 Stohn 2002-11-08 04:54:32 UTC
KDE 3.0.3  KMail 1.4.3  Installed from RedHat
Receiving the same message.  By reentering the password in the settings area, I
can send mail repeatedly until closing and starting KMail, which requires the
reentry of the password again.

If password storage is disabled, the problem does not occur.
Comment 4 Egor Kobylkin 2003-04-12 11:10:22 UTC
KDE 3.1.0 Kmail 1.5 installed from Mandrake 9.1rc2
I have the same bug - sending emails fails because KMail doesn't find the sender
address with the empty message in my outbox, wich blocks all other. Could it be
that this message is generated as a reply to "delivery confirmation request"?

It seems like this bug is there for some time now. Would it not be better if
KMail went through the whole list and tried to send every single one independently?
Comment 5 ebakke 2003-04-22 19:01:27 UTC
Subject: Re:  sending emails fails because KMail doesn't find the sender address

On Saturday 12 April 2003 11:10, Egor Kobylkin wrote:
> ------- Additional Comments From egork@iname.com  2003-04-12 11:10 -------
> KDE 3.1.0 Kmail 1.5 installed from Mandrake 9.1rc2
> I have the same bug - sending emails fails because KMail doesn't find the
> sender address with the empty message in my outbox, wich blocks all other.
> Could it be that this message is generated as a reply to "delivery
> confirmation request"?
>
> It seems like this bug is there for some time now. Would it not be better
> if KMail went through the whole list and tried to send every single one
> independently?

- From what I have found this happens when KMail crashes.  The messages are no 
longer in the outbox, but the mailbox index say that they are.  When you try 
to send a new email, KMail will also try to send the emails that are already 
in the outbox. (Or more correctly, that it thinks are already in the outbox)

Because the emails don't exist anymore, it can not get information about them, 
and shows the error message we see.  Another clue is that when you select the 
emails in the outbox, the subject changes to "No subject" immediately.

The solution is to delete the emails that have already been sent (Those that 
change subjects...) and then resend the email that failed.

Of course, the real solution would be to regenerate the mailbox indices for 
some of the mailboxes when the program starts, but that is a bit outside what 
I have the time and resources to do ;)

Comment 6 W K Havinga 2003-05-11 15:00:06 UTC
> From what I have found this happens when KMail crashes. The messages are no 
> longer in the outbox, but the mailbox index say that they are. When you try to 
> send a new email, KMail will also try to send the emails that are alreadyin the 
> outbox. (Or more correctly, that it thinks are already in the outbox) 
 
From what I have observed, you are totally right. It looks like index and outbox 
are out of sync indeed. It happens after you have send some mails, and then 
KMail crashes on closing it (although I can not say what triggers those crashes, 
unfortunately) 
 
Maybe it would be good if the indexes where rebuilt if they clearly do not match 
with the corresponding mailbox? 
 
As suggested above, maybe kmail should try to mail all (other) messages, even if 
it can not send the previous ones because the sender is incorrect. It would be OK 
if it still gives a popup that it 'can not send all messages, because some do not 
specify a sender address', so the problem won't remain unnoticed by the user. 
Comment 7 Ingo Klöcker 2003-05-12 01:17:29 UTC
Subject: Re:  sending emails fails because KMail doesn't find the sender address

On Sunday 11 May 2003 15:00, W K Havinga wrote:
> Maybe it would be good if the indexes where rebuilt if they clearly
> do not match with the corresponding mailbox?

Yes. We will fix this problem.

> As suggested above, maybe kmail should try to mail all (other)
> messages, even if it can not send the previous ones because the
> sender is incorrect.

This has been implemented for KDE 3.2.

Comment 8 Stephan Kulow 2003-09-21 12:16:55 UTC
*** Bug 63475 has been marked as a duplicate of this bug. ***
Comment 9 Stephan Kulow 2003-09-21 12:32:16 UTC
*** Bug 45746 has been marked as a duplicate of this bug. ***
Comment 10 Stephan Kulow 2003-09-21 14:45:20 UTC
*** Bug 48544 has been marked as a duplicate of this bug. ***
Comment 11 Stephan Kulow 2003-09-21 15:13:41 UTC
*** Bug 64172 has been marked as a duplicate of this bug. ***
Comment 12 Stephan Kulow 2003-09-22 20:13:03 UTC
*** Bug 55838 has been marked as a duplicate of this bug. ***
Comment 13 Stephan Kulow 2003-09-23 21:22:21 UTC
*** Bug 60858 has been marked as a duplicate of this bug. ***
Comment 14 Stephan Kulow 2003-09-24 07:36:36 UTC
*** Bug 58965 has been marked as a duplicate of this bug. ***
Comment 15 Stephan Kulow 2003-09-24 21:29:49 UTC
*** Bug 54834 has been marked as a duplicate of this bug. ***
Comment 16 Stephan Kulow 2003-09-24 21:53:34 UTC
*** Bug 57149 has been marked as a duplicate of this bug. ***
Comment 17 Stephan Kulow 2003-09-25 19:02:03 UTC
*** Bug 58369 has been marked as a duplicate of this bug. ***
Comment 18 Stephan Kulow 2003-09-25 19:21:15 UTC
*** Bug 50218 has been marked as a duplicate of this bug. ***
Comment 19 Stephan Kulow 2003-09-27 10:55:24 UTC
*** Bug 51525 has been marked as a duplicate of this bug. ***
Comment 20 Stephan Kulow 2003-09-27 11:00:23 UTC
*** Bug 52129 has been marked as a duplicate of this bug. ***
Comment 21 Yaman Salahi 2003-09-27 20:33:59 UTC
Subject: Re:  "ghost messages" stay in outbox

why do i keep getting  this email in my inbox?

owner@bugs.kde.org wrote:

| ------- You are receiving this mail because: ------- You are on the
| CC list for the bug, or are watching someone who is.
|
| http://bugs.kde.org/show_bug.cgi?id=43931 coolo@kde.org changed:
|
| What    |Removed                     |Added
|
- 
----------------------------------------------------------------------------
|  CC|                            |daniel@herkes.org
|
|
|
| ------- Additional Comments From coolo@kde.org  2003-09-27 10:55
| ------- *** Bug 51525 has been marked as a duplicate of this bug. ***
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/ddgWCum7FN3SOOURAghfAKCK+kFeff3/0rqvgG74HRyzuwgNogCgq/Gh
T/HMpK/KncUBSarstr8EcrI=
=Tlsk
-----END PGP SIGNATURE-----


Comment 22 ebakke 2003-09-27 20:41:50 UTC
Subject: Re:  "ghost messages" stay in outbox         

> Subject: Re:  "ghost messages" stay in outbox
> 
> why do i keep getting  this email in my inbox?
> 
Because someone is cleaning the KDE bug reports, when
a duplicate bug report is found it is merged with my original
report.  Then the email address of the reporter is added
to the notification list.

So, every time the bug is updated an email like this is
sent out.  And if you got the email you are on the notification
list as well, probably because you have filed a similar bug
report in the past.

I have been getting these emails for weeks now.
---
Erik H. Bakke

Comment 23 Stephan Kulow 2003-09-27 21:40:01 UTC
*** Bug 52102 has been marked as a duplicate of this bug. ***
Comment 24 Stephan Kulow 2003-09-27 21:41:04 UTC
*** Bug 51448 has been marked as a duplicate of this bug. ***
Comment 25 Stephan Kulow 2003-09-30 19:39:02 UTC
*** Bug 65243 has been marked as a duplicate of this bug. ***
Comment 26 Ingo Klöcker 2003-12-01 14:33:38 UTC
*** Bug 69409 has been marked as a duplicate of this bug. ***
Comment 27 Ingo Klöcker 2004-01-30 10:48:53 UTC
*** Bug 73773 has been marked as a duplicate of this bug. ***
Comment 28 Fredrik Persson 2004-04-08 17:01:47 UTC
Kmail 1.6
KDE 3.2.0.RC1
SuSE 8.2

I still get some ghost message in Kmail outbox and it wont send any "non-ghost-messages". Yesterday I had 5 ghost mail of 8 mail.. 
Comment 29 Till Adam 2004-05-29 23:38:01 UTC
CVS commit by tilladam: 

Nuke the index of the outbox on startup if the outbox folder is a maildir
folder, to make ghost messages impossible, which result when KMail crashes
after a message has entered and left a folder within five seconds, which
pretty much only happens for the outbox, and the index is therefor less
than 5 seconds out of date, which is the nfs tolerance. 

This is a nasty hack of a workaround, but it should fix the symptom.

CCMAIL: 43931-done@bugs.kde.org


  M +8 -0      kmkernel.cpp   1.287


--- kdepim/kmail/kmkernel.cpp  #1.286:1.287
@@ -837,4 +837,12 @@ void KMKernel::initFolders(KConfig* cfg)
   if ( the_outboxFolder->userWhoField().isEmpty() )
     the_outboxFolder->setUserWhoField( QString::null );
+  /* Nuke the oubox's index file, to make sure that no ghost messages are in
+   * it from a previous crash. Ghost messages happen in the outbox because it
+   * the only folder where messages enter and leave within 5 seconds, which is
+   * the leniency period for index invalidation. Since the number of mails in
+   * this folder is expected to be very small, we can live with regenerating
+   * the index on each start to be on the save side. */
+  if ( the_outboxFolder->folderType() == KMFolderTypeMaildir )
+    unlink( QFile::encodeName( the_outboxFolder->indexLocation() ) );
   the_outboxFolder->open();
 


Comment 30 Bram Schoenmakers 2004-12-15 13:55:08 UTC
I've spotted this bug in KDE PIM 3.3.1.