Bug 30181 - kmail can't send mails sometimes
Summary: kmail can't send mails sometimes
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: High major
Target Milestone: ---
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-16 22:28 CET by Christian C
Modified: 2024-08-22 23:03 CEST (History)
2 users (show)

See Also:
Source RPM: kmail-20.12.0-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Christian C 2022-03-16 22:28:39 CET
Description of problem:

When I send an email with kmail, after a while, I get a message "Échec du transport de messages. Connexion expirée" and my email stays in the outbox.
Sometimes, I get the message "Échec de l'obtention de l'interface D-Bus de « mailfilteragent »".

It's an old story because as you can read in :

https://kdepim-bugs.kde.narkive.com/qFHy1vcd/bug-290774-new-kmail-cannot-send-emails-failed-to-get-d-bus-interface-of-mailfilteragent

10 (TEN) years ago, this issue already existed.
And a number of posts in many forum relate regularly this issue.

How could it not be definitely fixed ?

For me, it's an emergency. I need to send administrative documents immediately.

None of the workarounds proposed in the numerous threads dedicated to this problem could help me.

Could you propose me a new (non destructive) solution ?


Version-Release number of selected component (if applicable):
$ rpm -qa | grep kmail
lib64kmailquicktextpluginprivate5-20.12.0-2.mga8
lib64kmailmarkdown5-20.12.0-2.mga8
lib64kmaillanguagetool5-20.12.0-2.mga8
kmail-account-wizard-20.12.0-1.mga8
kmail-20.12.0-1.mga8
lib64kmailgrammalecte5-20.12.0-2.mga8
kmailtransport-20.12.0-1.mga8
lib64kmailprivate5-20.12.0-1.mga8
kmail-handbook-20.12.0-1.mga8

$ rpm -qa | grep pim
kpimtextedit-20.12.0-1.mga8
lib64kpimsmtp5-20.12.0-1.mga8
pim-sieve-editor-20.12.0-1.mga8
lib64kf5libkdepim5-20.12.0-1.mga8
lib64kpimgapitasks5-20.12.0-1.mga8
lib64kpimpkpass5-20.12.0-1.mga8
lib64kpimgapicalendar5-20.12.0-1.mga8
lib64kf5akonadisearchpim5-20.12.0-1.mga8
libkdepim-20.12.0-1.mga8
pim-data-exporter-20.12.0-1.mga8
lib64kpimitinerary5-20.12.0-1.mga8
lib64pimdataexporterprivate5-20.12.0-1.mga8
lib64kf5pimcommon5-20.12.0-1.mga8
kdepim-addons-20.12.0-2.mga8
lib64kpimgapicore5-20.12.0-1.mga8
lib64kpimimportwizard5-20.12.0-1.mga8
pimcommon-20.12.0-1.mga8
lib64kpimgapicontacts5-20.12.0-1.mga8
lib64kf5pimtextedit5-20.12.0-1.mga8
lib64kf5pimcommonakonadi5-20.12.0-1.mga8
lib64kpimaddressbookimportexport5-20.12.0-1.mga8

$ rpm -qa | grep akonadi
akonadi-contacts-20.12.0-1.mga8
akonadi-notes-common-20.12.0-1.mga8
lib64kf5akonadicontact5-20.12.0-1.mga8
lib64kf5mailtransportakonadi5-20.12.0-1.mga8
akonadi-kde-20.12.0-1.mga8
lib64kf5akonadixml5-20.12.0-1.mga8
akonadi-import-wizard-20.12.0-1.mga8
lib64kf5akonadisearchdebug5-20.12.0-1.mga8
lib64kf5akonadicore5-20.12.0-1.mga8
akonadi-mime-20.12.0-1.mga8
lib64kf5akonadisearchpim5-20.12.0-1.mga8
lib64akonadi-singlefileresource5-20.12.0-1.mga8
lib64kf5akonadimime5-20.12.0-1.mga8
lib64kf5akonadinotes5-20.12.0-1.mga8
lib64kf5akonadiagentbase5-20.12.0-1.mga8
lib64akonadi-filestore5-20.12.0-1.mga8
lib64akonadiprivate5-20.12.0-1.mga8
akonadi-20.12.0-1.mga8
lib64kf5akonadiwidgets5-20.12.0-1.mga8
akonadi-calendar-tools-20.12.0-1.mga8
lib64kf5mailimporterakonadi5-20.12.0-1.mga8
akonadi-calendar-common-20.12.0-1.mga8
lib64kf5akonadicalendar5-20.12.0-1.mga8
lib64kf5pimcommonakonadi5-20.12.0-1.mga8

How reproducible:
always

Steps to Reproduce:
1. send a e-mail
2.
3.
Comment 1 Christian C 2022-03-17 11:53:27 CET
After modifying some configuration items in kmail, for some unknown reason, I succeeded in sending one of the 2 messages blocked in the outbox directory.

I started kmail from the command line and tried to send the second one :
I got the plasma message :

"L'envoi du courrier électronique à échoué
Échec du transport de messages. Connexion expirée"

and in konsole :

$ kmail
Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls")

I tried at the same time to send mails to other recipients : they are immediately sent and the recipients returned by mail that they received them well.

Could it be possible to get error messages more verbose when kmail don't send a message ?

Thanks.
Christian C 2022-03-19 10:19:27 CET

Priority: Normal => High
Hardware: All => x86_64

Comment 2 sturmvogel 2022-03-19 14:20:47 CET
Can you try to restart akonadi?

akonadictl restart


As it seems a widely spread problem with kmail (if you google it), and always a different solution helped for different users, it's maybe hard to find a solution for you.

It doesn't solve your initial problem but if you "need to send administrative documents immediately" you could use thunderbird or another mailer available in the meantime.
Comment 4 Lewis Smith 2022-03-20 19:56:34 CET
Ye Gods! A search on the error 'Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls")' throws it up also from various applications, not just Kmail.
> 10 (TEN) years ago, this issue already existed.
I used Kmail about 25y ago, and despite plenty of irritations, it worked. It seems to me that with all the messing about that KDE do over the years, they never tidy up their applications, which should be rock solid after all this time.

Admitting it is a pain to use a different e-mail client, in an urgent situation - which has arrived with me - I agree with sturmvogel about changing. Me to Claws-mail, which is clunky and has irritations. Thunderbird is 'heavy', but more competent.

> I tried at the same time to send mails to other recipients : they are
> immediately sent and the recipients returned by mail that they
> received them well
This suggests that it is the specific recipient that may be problematic. Can you say whether the problem you report occurs with different recipients, or just certain ones. Also, if you leave the outgoing message queued for some time, say closing/re-opening Kmail (even re-booting), whether they get sent more successfully later?

Source RPM: (none) => kmail-20.12.0-1.mga8.src.rpm
CC: (none) => lewyssmith

Comment 5 sturmvogel 2022-03-20 21:37:16 CET
At the moment we have a user in german forum who is not able to send emails with thunderbird. He tried also with Kmail and wasn't successfull either. After using logging mode of thunderbird we found that his email provider silently blocked his emails because his IP is on a blocklist.

It would be worth a try to use thunderbird and see if the problems with sending emails persists. If yes, it is way easier to log errors with thunderbird.
Comment 6 Morgan Leijström 2022-03-21 11:59:51 CET
Blocklists are a pain.
Here are some IP address blocklists if you would like to check:
https://wiki.mageia.org/en/The_Onion_Router#Blacklisting_by_bad_activity

CC: (none) => fri

Comment 7 Christian C 2022-03-21 12:14:27 CET
@sturmvogel
I tried "akonadictl restart" but it doesn't work

It seems that the content of:
https://userbase.kde.org/KMail/FAQs_Hints_and_Tips#Your_mails_are_not_being_sent.2C_without_error_messages
is outdated.
Alt + F2 doesn't start anything and akonadiconsole is not a valid command.

From https://userbase.kde.org/KMail/FAQs_Hints_and_Tips#KMail2_doesn.27t_send_mail
I looked into ~/.config/akonadi/agent_config_akonadi_maildispatcher_agent and my DesiredOnlineState is true

I had a lot of problems with kmail, like loosing all my mails, akonadi refusing to start, but it is well integrated in KDE/Plasma and its HMI is better than thunderbird. Changing my MUA is a very heavy job because I have more than 10 addresses.

@Lewis Smith
> 10 (TEN) years ago, this issue already existed.
I was not talking about 'Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls")'
but as is described in the link in Comment 1:
https://kdepim-bugs.kde.narkive.com/qFHy1vcd/bug-290774-new-kmail-cannot-send-emails-failed-to-get-d-bus-interface-of-mailfilteragent
"Kmail cannot send emails : Failed to get D-Bus" which is the error message I got sometimes when trying to send my mail

Concerning the recipient, I am not sure it is the reason of the problem because as I wrote in Comment 1, "After modifying some configuration items in kmail, for some unknown reason, I succeeded in sending one of the 2 messages blocked in the outbox directory."
In addition, when a recipient is wrong, my SMTP or the recipient server returns an explicit message telling why the mail is refused.

I of course rebooted and even tried to boot on the previous kernel because it happened after an update but it changed nothing.


@sturmvogel
Your Comment 5 is interesting.
I'll try to send it from my webmail !

@Morgan Leijström
Thanks. I'll check this possibility.
Comment 8 sturmvogel 2022-03-21 13:25:48 CET
(In reply to Christian CHEVALIER from comment #7)
> Your Comment 5 is interesting.
> I'll try to send it from my webmail !

The webmailer won't show this behaviuor if your IP is blocked, because you are sending directly from the server of your provider. An IP-Block means that the server of your provider rejects your email (from an external program like kmail or thunderbird) when it comes from an blocked IP.
Comment 9 sturmvogel 2022-03-21 13:30:25 CET
The picture you are describing is something erratic, so i don't believe anymore that it is related to an IP-Block. You say that it only happens sometimes, and only with some mails, so this is really strange.

Did you already try to move the stucked mail from your outbox back to maybe "Drafts" and resend them? Maybe kmail doesn't handle the stucked mail right if it sits there in the outbox for longer time (and some failed sending attempts).
Comment 10 Lewis Smith 2022-03-21 21:38:43 CET
I have had messages bounced by certain receiving mail servers because they found my ISP's outgoing server blacklisted somewhere. But the refusal was reported. An Internet search reveals sites that hold current blacklists - they are not all the same, a listed server may appear on only some; and it depends which such lists are checked by different e-mail components.

And yes, I had to use Webmail to get round those particular blockages; painful. You Christian can try this for (as you say) isolated important messages that do not 'go' from Kmail.

You say that you use many different e-mail addresses. Is the problem related to any of them in particular?

As for trying a different e-mail client, we are not suggesting make a complete switch from Kmail, but keeping it in parallel just to try re-sending individual messages that get 'stuck' in Kmail. Admittedly, this would mean configuring the other client e-mail addresses that actually hit the problem; not all of them. Inward messages would not be affected.
Comment 11 Christian C 2022-03-29 19:24:17 CEST
This problem is becoming more and more frequent.
Now, I have 3 e-mails that are stuck in my outbox.

I double clicked on the first one, tried to resend it and it was sent without error.

For the second one, I have the message: "Échec de l'obtention de l'interface D-Bus de « mailfilteragent »." I would roughly translate as "mailfilteragent couldn't get D-Bus interface".
I repeated the same operation and it was also sent without error.

But for the last one, I got the message "Échec du transport de messages. Connexion expirée" ie "Failed to transport messages. Connection expired".

So it seems that there are several different problems with my sending box.


Since the last one is not urgent, I'd like to know more about the reason why it is not sent.
As it doesn't seem that kmail has (when run as a command line) options to increase its verbosity, maybe one of you could write me the command line to send it with an utility like mailx or else (sorry, I’m not familiar with these commands :-( ).
Comment 12 Lewis Smith 2022-03-31 21:45:59 CEST
Sorry to have left you briefly.

I installed kmail to look at its man page - none! But:
 $ kmail -h                           throws up:
Usage: kmail [options] address|URL
Options:
  -h, --help                           Displays help on commandline options.
and a screen of options, of which:
Arguments:
  address                              Send message to 'address' or attach the
                                       file the 'URL' points to
Most of the options are for creating all the message fields on or via the command line. No sign of anything diagostic.

> I double clicked on the first one, tried to resend it and it was sent
> without error
> I repeated the same operation and it [2nd] was also sent without error
Good try.
I find myself, with Claws-Mail, that occasionally sending a message directly from the Compose window 'sticks', and the advice given is to queue it, and do 'send queued messages'; which then works. Can you try something similar with Kmail?

Time to assign this bug to the KDE group, hoping they can help.

Summary: kmail can't send mails => kmail can't send mails sometimes
Assignee: bugsquad => kde
CC: lewyssmith => (none)

Comment 13 Lewis Smith 2022-04-03 10:31:58 CEST
Christian
I did not think about one diagnostic thing you can easily do: when a Kmail message fails to go with a displayed reason, like in your comment 11, immediately do:
 $ journalctl -b --no-hostname
go to the end of the display, and post the last messages that seem relevant. This should at least show something for the D-bus problem, possibly also the 'Connexion expirée' one.

CC: (none) => lewyssmith

Comment 14 Marja Van Waes 2024-08-22 23:03:11 CEST
We stopped supporting Mageia 8 almost 8 months ago 
https://blog.mageia.org/en/2023/12/30/mageia-8-end-of-life/

That means we also stopped fixing Mageia 8 bugs and that this bug report needs to be closed, regardless of whether it was fixed for Mageia 8 or not.

If this particular bug did not get fixed for Mageia 8, then we do regret that.

If this issue is still present in Mageia 9 or cauldron, then please reopen this report, write a comment and adjust the "Version:" field.

If you are not yet a member of one or our teams, then please consider becoming one. https://wiki.mageia.org/en/Contributing
Mageia is a community project, meaning that we, the users, make Mageia together.

The more active contributors we have, the more bug reports will get fixed.
Besides, being active in a team can be very rewarding. It was and is certainly rewarding to me :-D

Resolution: (none) => OLD
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.