kmail2/akonadi fail to send messages, kmail long uptime

Bug #832660 reported by Hatem MASMOUDI on 2011-08-24
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KDE PIM
Unknown
Medium
kdepim (Ubuntu)
Undecided
Unassigned

Bug Description

failed to send email:

$ QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Aucun fichier ou dossier de ce type
QFileSystemWatcher: failed to add paths: /home/hatem/.config/ibus/bus
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "\Draft"
kmail2(5684)/libakonadi Akonadi::MessageStatus::setStatusFromFlags: Unknown flag: "$MDNSent

I think that is kde bug https://bugs.kde.org/show_bug.cgi?id=274750

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: kontact 4:4.7.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic i686
Architecture: i386
Date: Wed Aug 24 11:30:01 2011
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110816)
SourcePackage: kdepim
UpgradeStatus: No upgrade log present (probably fresh install)

Version: 2.1.1 (using KDE 4.6.4)
OS: Linux

After composing an e-mail, KMail fails at sending it. The message stays in the outbox folder. No error message is displayed.
Clicking on "send queued message" does nothing (no sending and no message).

Reproducible: Always

Steps to Reproduce:
Setup a simple SMTP account (example : smtp.orange.fr (french provider), no authentication, no encryption).
Try to send an e-mail.

Actual Results:
Nothing is done, the message is still in the outbox folder.

Expected Results:
The message should be sent.

OS: Linux (x86_64) release 2.6.39-ARCH
Compiler: gcc

I can't test with another server as my provided filters outgoing SMTP connections.
KMail worked fine in version 1.

I can confirm this problem. I'm also using Arch.
Version 2.1.1 sending emails worked in the beginning but broke recently. Might have to do with some package upgrades?

I'm also an arch user and on the upgrade to kmail 2.1.1 had my settings migrated to the akonadi framework. This was somewhat problematic and I had the same issue sending via my SMTP settings.

I deleted my default setting and re-created it. It worked even though the settings hadn't changed.

Might be worth trying?
DB.

I tried to delete my kmail configurations (from .kde4/app and .kde4/config) and restoring it but it's unsuccesful.
I still can't send e-mails.

I confirm comment #3

Same problem here with kmail 4.7.0 on openSUSE 11.4 with several SMTP-accounts.

Had the same problem after migration,

The problem here was
in
~/.local/share/.local-mail.directory I found 2 folders
* outbox
* Postausgang

composed mails ready to sent went into "Postausgang" whereas the agent seems to be looking for new mail in "outbox"

after removing this directory a new one was created with only "Postausgang"
and after removing and readding the "Mail Dispatcher Agent" using akonadiconsole

sending is working fine now

i'm seeing the same problem in KMail 4.7.0, KDE 4.7.0. i tried many variations on the suggestion in comment #3, but the problem remains. one of the times, KMail seemed to forget about KWallet's existence, asking me whether i want to store my SMTP password insecurely even though the KWallet was running and the wallet was open (opened by Akonadi from a previous KMail instance).

oddly, the Mail Dispatcher Agent is absent from System Settings --> Personal Information --> Akonadi Resources Configuration, and i can't add it because it's greyed out.

for the record, i'm running Kubuntu 11.04.

Download full text (7.2 KiB)

ok, i also have the problem sending mail on smtp.
I tried #3 recreating the smtp account and #7 deleting all folders in ~/.local/share/.local-mail.directory and akonadictl restart - they get recreated but mail does not go through.

my settings:
also arch, multiple smtp accounts-one selected as default, none working :/, migration went wrong, passwords stored in kwallet but that seems to work well, i use gpg signitures for mail but failures appear even without them.

I'm attaching output when kmail is run from console, most seems just like nepomuk whinning, maybe last lines could mean something..??

Thank you, Mark

-----
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Invalid iterator."
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
kmail2(32135)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-marek/nepomuk-socket"
"/usr/bin/kmail(32135)" Soprano: "QLocalSocket::connectToServer: Invalid name"
kmail2(32135)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-marek/nepomuk-socket"
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Invalid iterator."
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
kmail2(32135)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Connecting to local socket "/tmp/ksocket-marek/nepomuk-socket"
"/usr/bin/kmail(32135)" Soprano: "QLocalSocket::connectToServer: Invalid name"
kmail2(32135)/nepomuk (library) {anonymous}::GlobalModelContainer::init: Failed to connect to Nepomuk server via local socket "/tmp/ksocket-marek/nepomuk-socket"
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Unsupported operation (2)": "Invalid model"
"/usr/bin/kmail(32135)" Soprano: "Invalid iterator."
"/usr/bin/kmail(32135)" Sop...

Read more...

I got the same problem. After updating to Kmail 4.7.0 sending mails does not work anymore. Tried also the suggestions given in the comments 3 (recreating the settings for outgoing mail) and 7 (deleting ~/.local/share/.local-mail.directory). But none of them worked. The smtp server is mail.gmx.net

After trying things like deleting the directory .local/share/akonad, regenerating settings for my mail accounts in kmail, I still could not send messages yesterday. After rebooting this morning and logging in, however, I saw a pop up message saying that my message in the outbox folder was sent. Very strange... At the same time I saw some virtuoso processes running. Anyway, I do not know exactly why, but now kmail can send messages.

Hatem MASMOUDI (hatem-masmoudi) wrote :

Same here. Could someone please increase priority? An Email client that cannot send is severely broken.

Manually removing the .local/share/.local-mail.directory actually recreated the outbox as a "Postausgang", which is the localised version. Right-click on it now does not even offer me the option of sending the outbox. What a mess.

After restart, the "Posteingang" (localised outbox) regains the possibility of sending, but even after removing all SMTP servers, and just adding one, I still cannot send mail.

*** Bug 280848 has been marked as a duplicate of this bug. ***

funny: .config/akonadi/agent_config_akonadi_maildispatcher_agent had the entry:

[Agent]
Online=false

after changing the value back to `true', i can send emails again.

makes me wonder: how and why has this been changed? it definitely wasn't me!

I get the same problem basically every single time my laptop goes out from sleep. I have to launch akonadi console. The “Mais Dispatcher Agent” indicates “Ready to dispatch messages”. In reality it means that when i send an email it will not actually dispatch anything. I have to right-click on it and select “Toggle Online/Offline” and then everything works fine until the next time the laptop goes out of sleep. I think akonadi has a lot of trouble with being online/offline as i have to do the same thing to IMAP accounts when the laptop has slepts for long enough.

Mhmhm, I do have

[Agent]
Online=true

and toggling online / offline through the akonadiconsole does not help.
I have however done a fresh install of Kubuntu 11.10, with KDE 4.7, and there sending seems to work. So this might be due to a mixup during upgrade from Kmail1 -> kmail2. Will investigate and check how things behave differently in the new version, compared to what I have.

Any pointers, besides trying to capture debug output from the akonadiconsole in both and comparing?

Did like #16: I had

[Agent]
Online=false

in .config/akonadi/agent_config_akonadi_maildispatcher_agent

I toggled it to true and restarted akonadi, then my waiting mail was sent.

It could have something to do with going back from sleep. This time, the last return from sleep did not go well (freeze) and I had to force the power down and start the system again.
Maybe going to sleep is supposed to toggle Online to false and waking up toggle it back to true, which did not work in my case, since my computer did not technically wake up from sleep.

Hatem MASMOUDI (hatem-masmoudi) wrote :

have a look at "Comment #16 - https://bugs.kde.org/show_bug.cgi?id=278020 ".
for me this correct the problem of kmail2 (kde 4.7.0)

After checking there is another bug: when setting config to
[Agent]
Online=true

I success to send Email, but all emails are not forwarded to the server even if the Sent folder is on the server !

For me this magically worked (at least once) with doing

  akonadictrl restart

after one week of web interface to mails.

*** Bug 282401 has been marked as a duplicate of this bug. ***

Today Kmail2 stopped sending email on my PC...

I really don't understand why. Probably it is due to the unstability of akonadi/nepomuk: restarting akonadi is very sloooow and it throws a lot of errors like:

"/usr/bin/akonadi_nepomuk_email_feeder(2691)" Soprano: "QLocalSocket::connectToServer: Invalid name"

or

QStringList Akonadi::NepomukSearch::search(const QString&) Calling blockingQuery() failed!

I will try to restart the system and I will give some more feedback...

On the "akonadi console" I've found the "mail dispatcher agent" offline... very strange...

I followed what #16 did and it worked :) For me the upgrade from 4.7.1 to 4.7.2 screwed up KMail.

Same here on KMail 4.7.2.

Scenario:
1. Activated VPN connection that restricted SMTP.
2. Tried to send a mail which got stuck in the outbox.
3. Disabled VPN.
4. Sent a couple of mails only to notice that they were still in the outbox.

"Send mail from the queue", restarting Kontact and/or akonadi, restarting KDE didn't help. Just as in comment 16, I had to manually edit the dispatcher config file and restart akonadi.

I too have the problem that my kmail outbox is not being emptied. That's with kmail 4.7.2, and in .config/akonadi/agent_config_akonadi_maildispatcher_agent, Online is already set to True and on/off toggling of the MDA in akonadiconsole does nothing. My kmail configuration is a disaster; I migrated from kmail to kmail2, and when that wasn't working right I made the mistake of deleting the "Local Folders" account, not knowing its purpose (it doesn't look like an account). For a while I was able to send mail, but no longer.

I can confirm this, sent mails are physically sent, but remain in state
"Sending succeeded, but failed to finalize message. Unknown error. (No items found)"
locally.
- KDE 4.7.2
- KMail2 1.99.0
- OS: Linux (x86_64) release 3.0.7-45-desktop
- Compiler: gcc

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kdepim (Ubuntu):
status: New → Confirmed
Rémi Denis-Courmont (rdenis) wrote :

I am seeing this to. Whenever I start kmail, the Akonadi mail dispatcher is offline, even though fetching mail works fine and the network is up and running (in NetworkManager). Forcing the dispatcher online with akonadiconsole works around the problem until next session login. I have not figured out why the mail dispatcher starts offline.

In this case, I have a fresh Kubuntu 11.10 install, so it is _not_ a kmail2 migration issue.

I don't think this is a migration issue.

I can report I had exactly the behavior described here (about the mail dispatcher being offline) and akonadictl restart temporarily fixing the issue, on a complete fresh install of Kubuntu 11.10 Oneiric Ocelot with KDE 4.7.2 (from the backport PPA).

I configured Kmail 4.7.2 from scratch so there was no migration.

Changed in kdepim:
importance: Unknown → Medium
status: Unknown → Confirmed

I can confirm this problem with a Sabayon Linux installation (KMail 4.7.2) and that the fix from comments #20 (Online=true) and #21 (akonadictl restart) works.

Hi (sorry for my bad english !)

same problem for me under kubuntu 11.10. same solution.

I have the same probleme with Kubuntu 11.10.

Thunderbird works.

But after a "akonadictl restart" , it's ok...

After updating to 4.7.3 the agent_config_akonadi_maildispatcher_agent Online parameter was set again to false.

I've re-enabled and restarted Akonadi and now I can send email again

After restarting the PC the mail dispatcher agent was set offline again.

I can confirm Comments #16 and #19. I use KMail2 with Kubuntu 11.10. It has worked well for over four weeks

Then I experienced a power cut while my PC was in suspend mode. After restarting the computer (once power came back on), no mails were sent, they just sat in the outbox.

I had the following configuration:

[Agent]
Online=false

in .config/akonadi/agent_config_akonadi_maildispatcher_agent

Once I set it back to "true", everything worked again.

I definitely attribute this behaviour to a power cut and the computer being in suspend mode (I think I had KMail open at the time, but I can't be sure).

If I simply power up my notebook, which has the same setup and has never experienced a power cut, the Agent's online status is "true" right from the start.

(In reply to comment #19)
> Did like #16: I had
>
> [Agent]
> Online=false
>
> in .config/akonadi/agent_config_akonadi_maildispatcher_agent
>
> I toggled it to true and restarted akonadi, then my waiting mail was sent.
>
>
> It could have something to do with going back from sleep. This time, the last
> return from sleep did not go well (freeze) and I had to force the power down
> and start the system again.
> Maybe going to sleep is supposed to toggle Online to false and waking up toggle
> it back to true, which did not work in my case, since my computer did not
> technically wake up from sleep.

Thanks for this hint :o) It worked on my system, too. Before for few months my kmail worked well. No problems with sending emails. After an update, kmail always crashed on startup. I stopped akonadi, started it again and tried this serveral times, also after rebooting my system. But nothing worked. I was ready to give up, when kmail suddenly ran again. Getting emails was no problem, but sending didn't work. Now I did as you described and manually set the maildispatcher to online=true and everything works fine again. Strange somehow...

I'm using kmail 4.7.3 (Arch Linux) and I have the exact same problem.

I tried deleting ~/.kde4/share/apps/kmail* ~/.kde4/share/config/kmail* and ~/.config/akonadi

Then I made sure that I had

[Agent]
Online=true

in ~/.config/akonadi/agent_config_akonadi_maildispatcher_agent

I logged-out and logged-in again, then I started kmail. I fallowed all the steps of the configuration, but I still can't send E-Mails. They are just sitting in my outbox. I know it's not a sever problem since everything works fine with the exacts same settings in thunderbird, and it used to work with kmail.

Want to second #30. Had a power cut today, setting the variable to true and restarting Akonadi made KMail send the outbox immediately (11.10).

two informations :
1) The same error as in Comment #28 ("Sending succeeded, but failed to finalize message") do not occur when nepomuk is enabled.

Nevertheless the mail stayed in the outbox folder (although physically sent).

2) going to settings/configure kmail/identities/modify/advanced
and changing the wrong directories to

SentMail folder:
Local Folders/outbox
=> Local Folders/sent-mail

Templates folder
Local Folders/sent-mail
=> Local Folders/templates

... solved it here:
the mails are sent, go from outbox to sent-mail directory and the
reply-to flags are correctly set.
(both with or without nepomuk enabled)

kmail 4.7.2 from OpenSUSE 12.1

Same problem here (or at least it seems the same) with kde 4.8.3 (gentoo).

It happens at every login, quite repeatable. My scenario is that the network connection uses 802.X (wired) and my laptop asks a password every time I log in. It seems that akonadi services starts before the network is ready: after that there is no way to wake up mail dispatch agent. If I prevent kmail to open kdewallet, thus blocking it to fire up mail dispatch, wait for network to come up and only after this I give the right password to smtp agent, all works fine.

So it seems that mail dispatching agent is not able to deal with network issues. (of course, no online/offline mode switch can help)

some notes:
.config/akonadi/agent_config_akonadi_maildispatcher_agent
is correctly set to "true".

I've fixed local folders as suggested.

turning on/off resources by akonadi console does not help.

Confirm it on KDE 4.9.2, Gentoo, amd64, fresh install.

Confirm the same on KDE 4.10.1, Gentoo.
Noone of tricks in this topic solves the problem. :sad:

Changed in kdepim:
status: Confirmed → Unknown

I am affected too on kubuntu, moreover the notification in the bottom right of the window reports, server timeout.

Hi Kévin and everyone who commented in the bug, thank you for your report and the comments. Sorry for the long reaction time. As far as I see it refers to a version of KMail that still uses Nepomuk and is unmaintained. Thus closing. If you still have issues with sending mail, please open a new bug report after researching whether such a bug report against a current version exists. Please use at least 4.14 or if you can get it already 15.08. Report the version and the exact steps to reproduce the issue. Thank you, Martin

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.