kmail suddenly stopped sending mail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kdepim (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: kmail
Environment:
Ubuntu 8.04, x86_64, all updates applied
kmail 1.9.9 (4:3.5.9-0ubuntu)
Yesterday after working offline for a while (and with kmail set to
offline mode), I suddenly stopped being able to get kmail to send
mail from its outbox ... now it just sits there, instead of going out
to the SMTP server. (Which is working, as verified through a
different mailer setup.)
No combination of the usual "send queued mail" (now) buttons works.
Sending a new message (with the "send immediately" options) doesn't
have the usual "empty the queue" side effect any more either.
According to Wireshark, it's not even doing a name lookup for the
relevant SMTP server, so it's clear that something rather wrong is
happening. This persists after quit/restart of kmail, as well as
after a full OS reboot.
To emphasize: this is the same mailer configuration that worked
yesterday. Moreover, if I go into the SMTP config and tell it
to poke the server to see what it supports ... it can talk to it,
and get the right answer. Fetching mail (POP) works too; there
is no network connectivity problem. Only sending stopped working.
This is *different* from the problem whereby "send queued messages"
only works if the outbox is selected as the active folder. (In 7.04, kmail
gladly emptied the queue regardless of what mail folder I was reading.)
The only clue I have is this .xsession-errors output. I have no idea whether
this is new, since I've never bothered to look at that file before.
kdecore (KLibLoader): WARNING: KLibrary: /usr/lib/
kdecore (KLibLoader): WARNING: KLibrary: /usr/lib/
kdecore (KLibLoader): WARNING: KLibrary: /usr/lib/
kdecore (KLibLoader): WARNING: KLibrary: /usr/lib/
The relevant SMTP server requires SSL encryption, so this suggests that somehow
kmail forgot how to find SSL, or perhaps a certificate expired on Friday afternoon and
so it's now going through new code paths (which are failing).
More info from another .xsession-errors message:
kmail: WARNING: FolderStorage: :getMsg, message has no sernum, index: 0
Well that's odd. It stored a message that it refuses to retrieve... there are most certainly some bugs inside kmail here.
I speculate this one may be related to the way sometimes when kmail crashes, the message most recently written into
a given folder will be unreadable (displays as all white in the message window, but the $SUBJECT etc are readable in
the list pane) and undeletable (producing a "crossed out" graphic in the list pane that never vanishes ... usually it's just
barely visible before it's completely erased) and unmovable.
Hey, great -- no sooner do I have *that* theory than I observe that the first message in the outbox is unreadable in
exactly that way. And of course I can't manually move it to a different folder.
... So I was able to recover the outbox folder manually: (a) with kmail open, move all messages to the "drafts" folder, index.sorted file; (f) reopen kmail; (g) move the messages back from
except obviously the unrecoverable one; (b) create an "empty" folder; (c) quit kmail; (d) manually move that message
to someplace I can recover it from by hand, so the outbox/cur directory is empty; (e) overwite the .outbox.index* files
with the .empty.index* ones, removing the .outbox.
"drafts" to "outbox"; (h) Now try "send queued messages" ... it works!!
I'll have to re-create that one problematic message myself. It's just a patch submission after all; easy.
CONCLUSION: this *IS* the same problem I've seen when reading messages in the (temporal) vicinity of a kmail
crash. (All crashes I've seen have been caused by me pressing the "reply all" button. I speculate that mail was
being added to that folder at the same time, since after the crash there are always a few not-seen-before messages.)
It's just that when this folder corruption happens on the outbox, the symptoms are even more damaging... and when
I've had to work around this with non-"outbox" folders, I could recover by just removing the message from the folder,
no need for all the (a)..(h) shenanigans.