Bug 338575 - Email alarms fail to send using sendmail
Summary: Email alarms fail to send using sendmail
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-26 12:19 UTC by David Jarvie
Modified: 2020-08-17 23:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.11, 15.08.03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jarvie 2014-08-26 12:19:58 UTC
A user reports recently upgrading one host from ubuntu 12.04 to 14.04 and kalarm stopped sending emails, with the error message

   Email Sending Failed: "Failed to get D-Bus interface of mailfilteragent"

kalarmrc has EmailClient=sendmail and this worked before the upgrade. sendmail works when testing from a shell. (Same kalarm rc works fine on another fedora host.)

Source: kdepim
Version: 4:4.13.3-0ubuntu0.1
Comment 1 germ 2014-08-29 18:44:06 UTC
Here's the version that is having this sendmail challenge:

$ kalarm --version
Qt: 4.8.6
KDE Development Platform: 4.13.3
KAlarm: 2.10.10-ak
$
Comment 2 germ 2014-09-05 15:32:56 UTC
I had some time to focus more on this issue and I think I found the fix after reading https://bugs.kde.org/show_bug.cgi?id=290774

My Ubuntu 14.04 did not have kmail installed. Once I added that, emails seems to be working again. This seems strange since KAlarm is configured to use sendmail, not kmail.

Tried this first:

$ qdbus org.freedesktop.Akonadi.Agent.akonadi_mailfilter_agent
Service 'org.freedesktop.Akonadi.Agent.akonadi_mailfilter_agent' does not exist.
$
$  kmail
The program 'kmail' is currently not installed. You can install it by typing:
sudo apt-get install kmail
$

Then installed kmail:

$ sudo apt-get install kmail
...
$

And

$ qdbus org.freedesktop.Akonadi.Agent.akonadi_mailfilter_agent
/
/Debug
/KDebug
/KPIMIDENTITIES_IdentityManager
/MailFilterAgent
/MainApplication
$

Finally, when I did a email "Try" test in KAlarm I no longer get the D-bus mailfilter error, the mail is sent, and I received it.

Let's see if upcoming alarms continue to succeed sending emails.
Comment 3 David Jarvie 2014-10-09 23:25:38 UTC
On my system using KDE 4.14.1, there is currently no error feedback to KAlarm when the mail fails to send due to akonadi_mailfilter_agent missing. This needs to be rectified, so that KAlarm can warn the user that sending failed, and preferably warn that akonadi_mailfilter_agent needs to be installed.
Comment 4 David Jarvie 2015-10-08 23:20:17 UTC
I have investigated adding error feedback about this problem, but there doesn't seem to be any easy fix due to the way that Akonadi handles sendmail requests, where it just initiates the request without monitoring its completion. In KDE 5, sendmail support is being removed from Akonadi, which makes spending a lot of time to fix this a bit futile. The KDE 5 version of KAlarm will need to revert to calling sendmail directly. This should be implemented soon.
Comment 5 David Jarvie 2015-10-28 22:58:10 UTC
A fix has been put in to KDE 4.14 to check for the presence of akonadi_mailfilter_agent if the sendmail option is selected, and a message is now displayed to the user if it is not found. Ideally the MailTransport job would provide feedback, but for the reasons given in the last comment, it isn't worth the effort of implementing this when the sendmail mechanism will have to be changed for KDE 5.

Commit 78a8c9324afeb9881d93ec2aca845ddafa30514f (KDE4.14 branch).

Sendmail still needs to be implemented in the KDE 5 version.
Comment 6 David Jarvie 2015-11-04 22:23:35 UTC
Sendmail has now been implemented again for the applications 15.08.03 release. This no longer uses the MailTransport library, since sendmail support has been dropped from that, and it therefore doesn't need akonadi_mailfilter_agent any more.

Commit 2a3f9dd8168a76234e63a09544b5b36e466d1779 (15.08 branch), b28eb209056dccc3a3293b4eb8e261fd9d8145e9 (master).