Found what seems to be an older troubleshooting guide: Your Emails Are Not Being Sent, Without Error Messages , advising to restart the Mail Dispatcher Agent in the akonadiconsoleAgents tab. Tried that for good measure. It also talks about restarting if there is a problem with dbus, that does obviously not fix the issue.
This KDE troubelshooting guide Troubleshooting - KDE Community Wiki advices to look at journalctl --boot 0 --no-pager. A long read later, I found this:
sep 15 04:19:09 nixos akonadi_maildispatcher_agent[3349]: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.kde.akonadi_maildispatcher_agent'")
Not sure what to make of it though. Seraching online, this seems to be mostly relevant for apps that are meant to be started by the user as standalone programs. Might be misunderstanding this.
A bit later in the boot log:
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_newmailnotifier_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_newmailnotifier_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_birthdays_resource" has no agent account interface.
sep 15 04:19:09 nixos akonadi_control[3034]: Agent instance (agentInstanceAccountId) "akonadi_maildispatcher_agent" has no agent account interface
has no agent account interface. → because is has a dbus interface like all the other (mostly not shown) Agent instances?
Boot into OpenSuse Tumbleweed, sending works, not a problem with my mail provider.
Boot into a the last 25.11 (i belive) generation. Same issue.
Ran nixos-rebuild switch --upgrade and rebooted. E-mail not send, no error message, no new information in journalctl --follow. Piping journalctl --boot 0 --no-pager | less and searching for maildispatcher does not give me anything new.
Next, trying to reinstall NixOS. Maybe I introduced issues by copying the complete home folder over from an OpenSUSE Tumbleweed installation. Not sure if dot-folders where copied too, but this is my best guess currently.
I don’t think this is a bug, kontact tries to find some application that can send an email through dbus and can’t find it, makes sense that results in an error. It is quite common DE applications are quite tightly coupled and have dependencies on each other (especially in kde and gnome)
instead of direct manipulation of environment.systemPackages. There is a general pattern of onboarding people newer to NixOS where there is some programs.* or services.* option that is missed that makes things easier, and maybe that is happening here.
I tried this and it leads to the same D-Bus error again: Failed to get D-Bus interface of mailfilteragent. Would I be able to ask you where you found this or how more documentation could be accessed? This certainly seems like the correct path. Just installing kmail in addition to the above does however solved the issue again.
I searched for “kontact” in man configuration.nix or nixos-help (appendix A) or https://search.nixos.org/options. There are also ways to get there through nixos-option, nix repl and grepping the nixpkgs source.
If a “working” kontact should be able to send mail, and the programs.kde-pim.* snippet above doesn’t get there, then on initial glance that does seem like a bug to me either in implementation or docs of the programs.kde-pim.* tree. Again, not a kontact user so it’s hard for me to judge.
Ok, so the the man page for configuration.nix has over 385 thousand lines . I found the options in there, great resource. Will have a look at the other options as i go.
Kontact has a menu to configure Kmail, even when Kmail was not installed… I can see both sides of the argument here. To raise this further, the pim part technically does not need a mail sending client. However, it feels to me Kontact is not intended to run without Kmail. I understand, to bring this up, one needs a github account, which i have trouble with due to it not seeming to accept startmail aliases.
The good news is, others having the same should easily thing this thread and the excellent help herein.
On that note, thank you very much for your help again.
Edit:
Found it, there is a kmail option: NixOS Search . I confirm that this works: