You are not logged in.

#1 2012-02-08 19:58:47

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

[Solved] Can't send messages with Kmail 4.8

Every time I start Kmail it asks me if I want to work online or offline, or else it wouldn't synchronize my IMAP folders. Annoying...
The worst part is that I can't send emails, since Kmail sees the akonadi resource as offline (despite it being online), puts the message in the outgoing folder, then asks if I want to work online. Yes, of course, but trying to send it again leads to the same result: the message sits in the outgoing folder, whatever I do.
I tried to restart the akonadi server, to toggle online/offline all of the agents, restart the computer, but nothing.
These are the packages that have been upgraded from the last time I was able to send emails:

[2012-02-07 15:36] upgraded apr-util (1.3.12-5 -> 1.4.1-1)
[2012-02-07 15:36] upgraded autoconf2.13 (2.13-1 -> 2.13-2)
[2012-02-07 15:36] upgraded compositeproto (0.4.2-1 -> 0.4.2-2)
[2012-02-07 15:36] upgraded libxslt (1.1.26-2 -> 1.1.26-3)
[2012-02-07 21:31] upgraded apache (2.2.21-1 -> 2.2.22-2)
[2012-02-07 21:31] upgraded libcups (1.5.0-2 -> 1.5.2-1)
[2012-02-07 21:31] upgraded cups (1.5.0-2 -> 1.5.2-1)
[2012-02-07 21:31] upgraded faad2 (2.7-2 -> 2.7-3)
[2012-02-07 21:31] upgraded lib32-glibc (2.15-4 -> 2.15-5)
[2012-02-07 21:31] upgraded libasyncns (0.8-3 -> 0.8-4)
[2012-02-07 21:31] upgraded libmad (0.15.1b-5 -> 0.15.1b-6)
[2012-02-07 21:31] upgraded libmikmod (3.1.12-3 -> 3.1.12-4)
[2012-02-07 21:31] upgraded libsndfile (1.0.25-1 -> 1.0.25-2)
[2012-02-07 21:31] upgraded openal (1.13-2 -> 1.13-3)
[2012-02-07 21:31] upgraded rtkit (0.10-2 -> 0.10-3)
[2012-02-08 10:18] upgraded linux-pf (3.2.3-1 -> 3.2.4-1)
[2012-02-08 10:19] upgraded linux-pf-headers (3.2.3-1 -> 3.2.4-1)
[2012-02-08 10:19] upgraded lib32-gtk2 (2.24.9-1 -> 2.24.10-1)
[2012-02-08 10:19] upgraded libqalculate (0.9.7-2 -> 0.9.7-3)
[2012-02-08 10:19] upgraded libvorbis (1.3.2-1 -> 1.3.3-1)
[2012-02-08 10:19] upgraded memtest86+ (4.20-1 -> 4.20-2)
[2012-02-08 11:16] upgraded linux-pf (3.2.4-1 -> 3.2.4-2)
[2012-02-08 11:17] upgraded linux-pf-headers (3.2.4-1 -> 3.2.4-2)
[2012-02-08 13:20] upgraded cpio (2.11-2 -> 2.11-3)
[2012-02-08 13:20] upgraded cpufrequtils (008-1 -> 008-2)
[2012-02-08 13:20] upgraded htdig (3.2.0b6-7 -> 3.2.0b6-8)
[2012-02-08 13:20] upgraded linux-firmware (20111101-1 -> 20120205-1)
[2012-02-08 13:20] upgraded linux (3.2.4-1 -> 3.2.5-1)
[2012-02-08 13:21] upgraded linux-headers (3.2.4-1 -> 3.2.5-1)
[2012-02-08 13:21] upgraded lynx (2.8.7-4 -> 2.8.7-5)
[2012-02-08 13:21] upgraded perl-event-execflow (0.64-2 -> 0.64-3)
[2012-02-08 13:21] upgraded qca (2.0.3-1 -> 2.0.3-2)
[2012-02-08 13:21] upgraded qca-ossl (2.0.0-3 -> 2.0.0-4)
[2012-02-08 13:23] upgraded broadcom-wl (5.100.82.112-3 -> 5.100.82.112-3)
[2012-02-08 13:24] upgraded acpi_call-git (20120204-1 -> 20120208-1)
[2012-02-08 13:27] upgraded broadcom-wl-pf (5.100.82.112-3 -> 5.100.82.112-3)
[2012-02-08 13:28] upgraded acpi_call-pf-git (20120208-1 -> 20120208-1)
[2012-02-08 19:58] upgraded docbook-xsl (1.76.1-1 -> 1.76.1-2)
[2012-02-08 19:58] upgraded libdmtx (0.7.4-1 -> 0.7.4-2)
[2012-02-08 19:58] upgraded libical (0.46-1 -> 0.46-2)
[2012-02-08 19:58] upgraded libiodbc (3.52.7-4 -> 3.52.7-5)
[2012-02-08 19:58] upgraded libraw1394 (2.0.7-1 -> 2.0.7-2)
[2012-02-08 19:58] upgraded musicbrainz (2.1.5-4 -> 2.1.5-5)
[2012-02-08 19:58] upgraded openexr (1.7.0-1 -> 1.7.0-2)
[2012-02-08 19:58] upgraded phonon (1:4.6.0-1 -> 1:4.6.0-2)
[2012-02-08 19:58] upgraded pmount (0.9.23-2 -> 0.9.23-3)
[2012-02-08 19:58] upgraded tdb (1.2.9-1 -> 1.2.9-2)

Thanks for any help

Last edited by hermes (2012-02-20 10:43:12)


Linux Registered User #362737

Offline

#2 2012-02-08 20:03:02

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,144

Re: [Solved] Can't send messages with Kmail 4.8

Is the Mail Dispatcher agent online?

Offline

#3 2012-02-08 20:13:09

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: [Solved] Can't send messages with Kmail 4.8

Yes. I also tried to toggle offline/online.


Linux Registered User #362737

Offline

#4 2012-02-09 17:14:06

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: [Solved] Can't send messages with Kmail 4.8

I'll mark it solved, even if I didn't find the real cause of the issue. I just deleted all of the kmail related stuff under ~/.kde4/share/{apps,config}, rebooted, and I'm not asked any more if I want to go online.


Linux Registered User #362737

Offline

#5 2012-02-10 09:23:30

harbind
Member
Registered: 2009-05-08
Posts: 22

Re: [Solved] Can't send messages with Kmail 4.8

This is really annoying bug. This seems to happen for me when I log in while network isn't ready. Somehow kmail thinks I'm offline, while all services and agents are online. Everything works just fine if I wait a little while on kdm.

Offline

#6 2012-02-12 20:18:47

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Re: [Solved] Can't send messages with Kmail 4.8

I guess I'm seeing the same thing. I'm connected via WiFi with the password stored in KWallet so I can't get the network ready before the desktop loads. Kopete is also reporting the desktop as being offline. I'm pretty sure it worked before in KDE 4.8.0. Perhaps this should be reported...

Offline

#7 2012-02-13 17:09:06

kleofas
Member
Registered: 2009-11-22
Posts: 21

Re: [Solved] Can't send messages with Kmail 4.8

I've got a little script in case something goes wrong like in this case. It was "inspired" by another thread in... July I think. Here it is:

#!/bin/bash

killall -9 kded4
kded4 & disown

Just run it when you're having trouble with the mail transport agent.

Hope this helps.

Offline

#8 2012-02-14 21:57:57

sam
Member
Registered: 2008-05-23
Posts: 82

Re: [Solved] Can't send messages with Kmail 4.8

Thanks kleofas, your script worked (I'm not sure what it did though).

Offline

#9 2012-02-16 09:03:59

tim
Member
From: Sweden
Registered: 2006-10-29
Posts: 98

Re: [Solved] Can't send messages with Kmail 4.8

I've tried everything in this thread and everything on the net and NOTHING. I still get the offline problem. This is without a double the worst bug I've ever had. So annoying.

Anyone got any other suggestions?

Offline

#10 2012-02-16 10:26:57

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: [Solved] Can't send messages with Kmail 4.8

tim, I got it "solved" by deleting my entire KDE profile, included the akonadi resources spread throughout the home dir  (a terrible PITA), and following the harbind suggestion of waiting until the network is on before logging in (further PITA if you're in a hurry, annoying in every case). I'm not unmarking it as solved, since it now kinda works, but it's worth keeping this thread alive... I haven't checked for lack of time, does anybody know if it has been reported to the KDE devs?


Linux Registered User #362737

Offline

#11 2012-02-19 17:45:05

Phlogiston
Member
Registered: 2009-02-14
Posts: 39

Re: [Solved] Can't send messages with Kmail 4.8

Offline

#12 2012-02-20 01:31:14

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: [Solved] Can't send messages with Kmail 4.8

Removing the .kde4 folder is not "Problem solved!"

Has anyone found the exact configuration files causing this problem? I moved all kmail configs from .kde4/share/{apps,config} but the problem persists.

Edit: I managed to get my laptop to work after a reboot, however my desktop still thinks it's offline. I even copied the configs from the laptop to the desktop to no effect. This is complete madness.

Last edited by quantumphaze (2012-02-20 08:20:02)


▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#13 2012-02-20 10:42:57

hermes
Member
From: Lucca, Italy
Registered: 2010-05-19
Posts: 99

Re: [Solved] Can't send messages with Kmail 4.8

quantumphaze wrote:

Removing the .kde4 folder is not "Problem solved!"

Has anyone found the exact configuration files causing this problem? I moved all kmail configs from .kde4/share/{apps,config} but the problem persists.

Edit: I managed to get my laptop to work after a reboot, however my desktop still thinks it's offline. I even copied the configs from the laptop to the desktop to no effect. This is complete madness.

I agree with you quantumphaze, the problem is not solved, but it looks like it's not an Arch problem, that's why a bug has been filed. I marked it "solved" since, in my particular case, recreating a fresh directory structure and waiting until the connection is up, kind of let the issue not to show up again. In my particular case.
It's a serious bug, though, that is affecting not only me, as far as I can see. So I think the best thing to do is leaving this thread open stripping the [SOLVED] tag and following the discussion on bugs.kde.org and report here.
Complete madness, you're right...


Linux Registered User #362737

Offline

#14 2012-02-22 19:32:41

Sheldor42
Member
Registered: 2012-02-22
Posts: 2

Re: [Solved] Can't send messages with Kmail 4.8

I had the same porblem, and none of the solution above worked. I figured out, that the problem is the networkmanager, that makes kmail thinking i'm offline, the solution here https://bbs.archlinux.org/viewtopic.php?id=135284"  solved my problems, (i also had the problem that kopete thought i'm offline).

Offline

#15 2012-02-24 14:36:45

DoDoENT
Member
Registered: 2010-06-09
Posts: 23

Re: [Solved] Can't send messages with Kmail 4.8

I've got the same problem on my KDE 4.8 too. KMail thinks that I'm offline, although I am online. I don't use network manager. I use dhcpcd to obtain my network connection on boot, even before desktop starts, but sometimes desktop loads faster than dhcp daemon obtains the ip address from the router (ssd ftw smile ) and then kde thinks that I'm offline.

But for sending e-mail, I've found a little workaround: after clicking 'send' your message will go to your local outbox folder. Then you have to right click the outbox folder and choose "send queued messages" (or something like that). Kmail will then ask you if you want to go online, you answer that you want and all your messages from outbox will be dispatched.

Hope this helps someone...

P.S. I use network manager on my laptop. There, I start the kmail AFTER network manager connects to network. Then everything works normally.

Last edited by DoDoENT (2012-02-24 14:38:18)


Smile! It makes people wonder what you are thinking about...

Offline

#16 2012-02-25 09:28:29

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: [Solved] Can't send messages with Kmail 4.8

On my system the problem was in the DEAMON array

(... @kdm @networkmanager)

changing it to

(... networkmanager kdm)

kde starts online and kmail works

Offline

#17 2012-02-26 06:49:11

sjakub
Member
From: Canada/Poland
Registered: 2008-06-16
Posts: 84

Re: [Solved] Can't send messages with Kmail 4.8

aesiris wrote:

On my system the problem was in the DEAMON array

(... @kdm @networkmanager)

changing it to

(... networkmanager kdm)

kde starts online and kmail works

I've always had networkmanager before kdm in DAEMONS array, and I have this problem regardless...

However, restarting kded4 helps!

Last edited by sjakub (2012-02-26 06:52:13)

Offline

#18 2012-03-09 13:54:12

achims
Member
Registered: 2012-03-09
Posts: 1

Re: [Solved] Can't send messages with Kmail 4.8

I found that on my system the problem was related to networkmanager not communicating properly with kded4. After a network loss (or suspend/resume cycle), kmail and google resources did not work properly. Restarting kded4 helps, as posted before, but is overkill and not easily automated.
Instead of "killall -9 kded4; kded4 & disown", a call to qdbus can tell kded4 that the network is...

...online:
qdbus org.kde.kded /modules/networkstatus org.kde.Solid.Networking.setNetworkStatus "ntrack" 0
...offline:
qdbus org.kde.kded /modules/networkstatus org.kde.Solid.Networking.setNetworkStatus "ntrack" 1

Additionally, kmail has to stop/resume network jobs:
qdbus org.kde.kmail2 /KMail stopNetworkJobs
qdbus org.kde.kmail2 /KMail resumeNetworkJobs

In my case, google tasks has to be informed, too:
qdbus org.freedesktop.Akonadi.Resource.akonadi_googletasks_resource_3  /  org.freedesktop.Akonadi.Agent.Status.setOnline False
qdbus org.freedesktop.Akonadi.Resource.akonadi_googletasks_resource_3  /  org.freedesktop.Akonadi.Agent.Status.setOnline True

This can be made automatic by a dispatcher script: /etc/NetworkManager/dispatcher.d/50_qdbus

#!/bin/sh
#
# 50_qdbus: Sets on/offline status for Kmail and google related Akonadi services
#           NOTE: Find the resource names with qdbusviewer

INTERFACE=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface

DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof kded4)/environ | tr '\0' '\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -f2-`
USER=`cat /proc/$(pidof kded4)/environ | tr '\0' '\n' | grep USER | cut -d '=' -f2-`

startservice()
{
    # kded
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.kde.kded /modules/networkstatus org.kde.Solid.Networking.setNetworkStatus "ntrack" 0 
    # Google Tasks
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.freedesktop.Akonadi.Resource.akonadi_googletasks_resource_3  / \
        org.freedesktop.Akonadi.Agent.Status.setOnline True
#    # Google Calendar
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_googlecalendar_resource_7  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline True
#    # Google Contacts
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_googlecontacts_resource_15  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline True
#    # Mail Dispatcher
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Agent.akonadi_maildispatcher_agent  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline True
#    # IMAP
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_imap_resource_0  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline True
    # Kmail
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.kde.kmail2 /KMail resumeNetworkJobs
}

stopservice()
{
    # kded
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.kde.kded /modules/networkstatus org.kde.Solid.Networking.setNetworkStatus "ntrack" 1
    # Kmail
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.kde.kmail2 /KMail stopNetworkJobs
#    # IMAP
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_imap_resource_0  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline False 
#    # Mail Dispatcher
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Agent.akonadi_maildispatcher_agent  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline False
#    # Google Contacts
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_googlecontacts_resource_15  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline False
#    # Google Calendar
#    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
#        org.freedesktop.Akonadi.Resource.akonadi_googlecalendar_resource_7  / \
#        org.freedesktop.Akonadi.Agent.Status.setOnline False
    # Google Tasks
    sudo -u $USER -i DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS qdbus \
        org.freedesktop.Akonadi.Resource.akonadi_googletasks_resource_3  / \
        org.freedesktop.Akonadi.Agent.Status.setOnline False
}

restartservice()
{
    stopservice
    startservice
}

case "$STATUS" in
    'up') # $INTERFACE is up
        restartservice
	;;
    'down') # $INTERFACE is down
        # Check for active interface and down if no one active, otherwise restart
        if [ ! `nm-tool|grep State|cut -f2 -d' '` = "connected" ]; then
            stopservice
        else
            restartservice
	fi
	;;
esac

In the code, as you see, it is a little more complicated since the dispatcher is run as root (and root has a different dbus session).
I left in some comment lines for your information.  Switching kded4 on/off triggers those services on/off automatically. Just in case for someone it will not, you can try activating the corresponding lines.
If you are not using google tasks resource, you obviously should comment those lines out. The resources may even have different names on your system (at least the ID as in _resource_3), check out with qdbusviewer.

Hope this helps, for me it solved a really annoying problem.

Offline

#19 2012-03-12 12:40:42

MartinZ
Member
From: Chiloé, Chile
Registered: 2005-06-10
Posts: 379

Re: [Solved] Can't send messages with Kmail 4.8

Thanks a lot achims. As you suggested, executing

qdbus org.kde.kded /modules/networkstatus org.kde.Solid.Networking.setNetworkStatus "ntrack" 0

gets kmail and akonadi-google online until next suspend. Unfortunately, your dispatcher doesn't work here, even changing the IDs (maybe bacause of systemd?).

Here https://bugs.kde.org/show_bug.cgi?id=294441 the Network Management maintainer in KDE suggests a problem specific to Arch, maybe permissions related.


All your base are belong to us

Offline

#20 2012-03-12 18:56:43

wonko
Member
Registered: 2012-03-12
Posts: 1

Re: [Solved] Can't send messages with Kmail 4.8

I had to build kdebase-runtime myself, first uninstalling NTrack. Now it works properly. You can find the PKGBUILD attached to the bugreport
https://bugs.kde.org/show_bug.cgi?id=294441
It's the PKGBUILD from abs without NTrack as a dependency and a correction of the download path to the source file. Make sure to remove package "ntrack" before build.
Guess this might be a workaround for most people until this is fixed. I use networkmanager, so ntrack isn't necessary. I don't know when ntrack is needed at all? Maybe someone with deeper knowledge might check this out. As it seems open-suse removed it as a dependency because it caused them trouble, too. http://lists.opensuse.org/opensuse-kde/ … 00192.html

Offline

Board footer

Powered by FluxBB