
Email can’t access the INBOX
If you’ve been reading my posts here, or my books, you know that I like to experiment with many different aspects of Linux and open source software. Driven by curiosity, I need to explore new hardware and software, but I also need to re-examine things that I’ve tried previously. Either way, I always learn new things.
In this case, I was exploring the Thunderbird and Kmail email clients. I like to see how they’ve changed over the years so I spent a few days using Thunderbird and then Kmail. I ultimately returned to Alpine, the text-mode email client, which still works best for me.
But leaving Thunderbird and Kmail behind was not the end of my entanglement with this little experiment.
The problem
I first noticed the problem a few minutes after returning to Alpine. Access to the Inbox was blocked because another process was using it. Alpine is smart enough to tell me that in the message box near the bottom of it’s interface. It also gave me the process ID (PID). All other mail folders were accessible as usual.
Since the SendMail Inboxes for all users are maintained on the server in /var/spool/mail, I initially thought this might be a server problem. But I’m also aware, due to past issues, that the KDE PIM services that run in the background can be a problem. Even though I normally use Xfce as my desktop, simply starting Kmail loads the kalendarac and akonadi services.
The kalendarac library offers helper functions to integrate the use of Akonadi calendar and notification items in applications. These services are responsible for the notifications you get in KDE when a new email is delivered, or a calendar notification is triggered.
Akonadi is a storage service for personal information management data and metadata named after the oracle goddess of justice in Ghana. It is one of the “pillars” behind the KDE SC 4 project, although it is designed to be used in any desktop environment. It is extensible and provides concurrent read, write, and query access. Akonadi provides unique desktop-wide object identification and retrieval. It functions as an extensible data storage for all PIM applications. Besides data storage, Akonadi has several other components including search, and a library for easy access and notification of data changes. Akonadi communicates with servers to fetch and send data instead of applications through a specialized API. Data can then be retrieved from Akonadi by a model designed to collect specific data.
Akonadi starts automatically in the background when any application using it is started — such as Kmail. So my starting and using Kmail for my explorations was what launched these services. And when I stopped using Kmail, the Xfce Session and Startup configuration kept restarting kalendarac which restarted Akonadi because Calendar Reminders was selected for automatic startup on login.
The solution
This was a rather complex problem so the solution required several steps to completely rid my workstation of all vestiges of the Akonadi and kalendarac services.
Disabling the Akonadi subsystem
The first step is to stop the Akonadi server. Use this command as the root user to stop the Akonadi server.
# akonadictl stop
Be aware that launching any of the KDE PIMs will restart Akonadi. You can query the status of the Akonadi server just to be certain it’s stopped.
# akonadictl status
The Akonadi server is automatically started by any Akonadi-enabled application. If you don’t want Akonadi to be started after login, you have to ensure that no Akonadi-enabled application is launched at login or thereafter. Remember to check Plasma applets as well — the Digital Clock widget in the default panel, for instance uses Akonadi to (optionally) display calendar events and this is enabled in its settings by default (see the “Display Events” option) . You must remove any widgets that may start it from your start-up.
I found that this wasn’t the complete solution as I still had the problem. I found that a rogue instance of kalendarac was still running. This was probably due to my flailing around as I started and stopped the services during my initial problem determination.
# pgrep kalendarac
3927
# pkill kalendarac
Disable Calendar reminders
I found that the Xfce Calendar Reminders applet was checked and that launched kalendarac when I logged in to my workstation. I had to uncheck that In the Applications tab of the Xfce Session and Startup menu to fix it.

If you find that the kalendarac program is still running after a reboot, as it was for me, be sure to kill it as shown above and to deselect “Automatically save session” on the General tab of the Session and Startup menu. This is another step to prevent it from starting the next time you login.
I also needed to disable the Akonadi-related notification settings in the Xfce Notifications settings menu.

A final clean sweep
After all those changes, I was still experiencing the same symptom. I found a rogue Akonadi service running and used pkill to terminate it. I did a final check to verify that there were no remaining vestiges of Akonadi or kanendarac running and it was all clear.
At this point I deleted all packages related to Akonadi so that they can’t ever start again. Of course none of the KDE PIMs will run because their data source is now totally removed from my workstation. That’s OK because, despite the fact that I do prefer Kmail over Thunderbird, I much prefer Alpine over either GUI email client. So I won’t be using Kmail again.
I’m probably not going to even try to use KDE Plasma again any time soon, since I much prefer Xfce despite the many powerful and interesting features found in KDE Plasma. Hopefully that means I’ll not need to deal with this type of problem again.