Bug 292399

Summary: Kmail message list does not show attachment icons
Product: [Applications] kmail2 Reporter: Rock <rock8000>
Component: message listAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: 948653, aeoris, aspotashev, blackravener, claudius.mueller, djmills32, fridge.batta, gita.benadi, itsef-admin, kroloskar2, lars_kdebugs, linux, mollekopf, montel, nortexoid, pancho.s, philipp.woelfel, piotr.budny+bugskde, sam.carcagno, vamp898, wbauer, wrana
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: email with attachment not recognized by kmail2

Description Rock 2012-01-25 15:13:40 UTC
Version:           4.7 (using KDE 4.7.3) 
OS:                Linux

Kmail message list does not show the attachment icons. The attachments are in the emails but no icon indicate so in the message list so i have to go in to each email to see if there is any attachment. Please fix this. 

Reproducible: Always

Steps to Reproduce:
every time open kmail and try to see in the message list which mails contain attachments but no icons, even emails have attachments. 

Actual Results:  
no attachment icons. 

Expected Results:  
The attachment icons to show in the message list

OS: Linux (i686) release 3.0.0-12-generic
Compiler: gcc
Comment 1 Laurent Montel 2012-01-26 09:03:07 UTC
Work fine here.
Comment 2 itsef-admin 2012-02-22 10:18:22 UTC
(In reply to comment #0)
[...]
> Kmail message list does not show the attachment icons.
[...]

I can confirm this to be a longstanding problem - we have already experienced that with the KDE 3.5.x kmail and still see this happening with KMail2. We have tried the latter under Kubuntu 11.10 with both KDE 4.7.4 and KDE 4.8.0 and in both cases, attachment detection is very unreliable. For some mails, attachments are detected and the icon is shown, but for the majority, no icon is shown. For the same reasons, the quick filter in the message list on "Has attachment" does not work. So far, we have been unable to determine why some mails do get detected.
Under KMail1, attachment detection tended to work better for mails that have been read, but under KMail2 not even that makes a difference.
Comment 3 itsef-admin 2012-02-22 10:21:19 UTC
(In reply to comment #2)
> (In reply to comment #0)
> [...]
> > Kmail message list does not show the attachment icons.
> [...]
> 
> I can confirm this to be a longstanding problem - we have already experienced
> that with the KDE 3.5.x kmail and still see this happening with KMail2.

For completeness: This was always with (D)IMAP accounts.
Comment 4 itsef-admin 2012-09-06 15:50:51 UTC
This problem is still present in 4.8.4 - I have a folder where three mails have a "kcrash" attachment - these are shown as having an attachment. A fourth has a PDF as attachment - but this mail is not shown as having an attachment in the list. It is also not shown if I use the quick filter "has attachment".
Comment 5 Laurent Montel 2012-09-06 16:19:04 UTC
Store email as mbox and store here.
Will test it.
Comment 6 itsef-admin 2012-09-06 16:54:10 UTC
I'd love to, but it's bigger than 2MB... Just tried to create a similar one with a smaller PDF, but that one gets displayed WITH icon for some odd reasons. I'll try and come up with an alternative location, unless you have a suggestion. (will be Monday, though).
Comment 7 Laurent Montel 2012-09-06 17:02:41 UTC
imap account ? pop3 account ?
Comment 8 Samuele Carcagno 2012-10-26 20:21:42 UTC
I can confirm that this problem is still present in kmail 4.9.2 on disconnected IMAP accounts
Comment 9 Samuele Carcagno 2012-11-25 21:52:12 UTC
Created attachment 75480 [details]
email with attachment not recognized by kmail2

the email has an attached .odt file, kmail2 does not show the attachment flag and more importantly, it is not possible to see the message when filtering with "has attachment"
Comment 10 djmills32 2012-11-26 11:15:13 UTC
I'm running 4.8.5 on openSUSE 12.2 using POP3 email to local mail folders.  Most of my folders do show an attachment icon in the message list, but some do not.  I can't find a folder specific option that might cause this.

I created a new folder next to one such folder, moved all the messages and still attachment icons are not shown.

I then tried copying a message that doesn't show the icon to a folder where other messages do.  It continues not to show the icon even in the new location.  So then I tried copying a message that does show the icon into the folder where none do.  Just that one new message does still show it.

So the issue seems to be message based and not folder based.

Any way I can get it to behave?
Comment 11 Bernd Oliver Sünderhauf 2012-11-29 13:29:50 UTC
I still have the same problem here on 4.9.3, and don't believe that in all the years this has ever worked correctly in kmail.

Scrutinizing and comparing the content, headers and source formatting of many messages didn't help at all.
One and the same message might be tagged with "Has attachment" or not, depending on obscure circumstances.
If it has something to do with the individual messages, then it needs to be multicausal.
Will try and play around with whole folders now. Maybe it helps.
But if someone has a good idea, how to track this down, you're very welcome!
Comment 12 Laurent Montel 2012-11-29 13:41:16 UTC
It's a problem with imap not kmail
Comment 13 Bernd Oliver Sünderhauf 2012-11-29 14:19:38 UTC
You mean, with Akonadis IMAP backend?
I'm not sure. I experience the same in maildirs with messages copied over from an IMAP folder. And now, another subset of the messages would be missing the attachment marker.
And finally, if I delete the $ATTACHMENT flag of a mail in the Akonadi Console, kmail restores the flag upon hitting "update folder". So IMHO this flag seems to be driven by kmail not Akonadi.
Comment 14 Samuele Carcagno 2012-11-29 14:21:07 UTC
If this can help, I would like to add that in kmail 1.13.7 in Debian testing (wheezy) there is not such a problem, attachment icons are displayed normally for the same messages on which kmail2 does not show the attachment icons. Also in thunderbird you can see the attachment icons normally.
Comment 15 Laurent Montel 2012-11-29 14:40:54 UTC
yes akonadi imap backend.
kmail is just a frontend.
And I discussed with kevin about this bug long time ago and he explains me that it was not all imap server has support for store attach status.
so when it reload it it remove this status in kmail.
Comment 16 Bernd Oliver Sünderhauf 2012-11-29 14:54:11 UTC
(In reply to comment #15)
> yes akonadi imap backend.
So how come local maildirs are also affected?

> that it was not all imap server has support for store attach status.
> so when it reload it it remove this status in kmail.
Might be, but the procedure described in #13 was on a local maildir.
Also, it was the other way around: I manually removed the flag in Akonadi Console, but upon "update folder" it was automatically re-added.
Comment 17 Lars Altenhain 2012-12-14 13:40:06 UTC
I also had this problem, that the attachment icon was not shown for some mails which have an attachment, did some testing and found under which circumstances the bug is triggered:

If a new mail with an attachment arrives in the inbox the icon is displayed and also in akonadiconsole I can see the "$ATTACHMENT" flag. But this flag is only transmitted to the imap-server when something is done with the mail, that requires other imap flags to be changed (e.g. reply, mark as read or important). But if I leave this message as is and just press F5 on the inbox to check for new mails the flags are re-read from the imap server and the icon disappears together with the "$ATTACHMENT" flag in akanadiconsole.

The same happens also for the icons / imap flags for signed or encrypted mails.
Comment 18 Philipp Woelfel 2013-04-10 00:21:49 UTC
This problem is still present in KDE 4.10.2 (OpenSUSE binaries).

@ Laurent (Comment 15): The same problem occurs on two different but very common IMAP servers which I am using, Cyrus and Dovecot. 

This is a huge usability issue. Thunderbird manages to show the attachment icons just fine.

If it's a problem with akonadi and not kmail, should another bug report be filed?
Comment 19 Philipp Woelfel 2013-04-10 00:22:25 UTC
*** This bug has been confirmed by popular vote. ***
Comment 20 Samuele Carcagno 2013-07-14 13:06:38 UTC
Since from the discussion above the bug may be related to the IMAP Akonadi backend rather than kmail2 I've opened a bug report there:

https://bugs.kde.org/show_bug.cgi?id=322346
Comment 21 Christian Mollekopf 2013-11-20 10:59:22 UTC

*** This bug has been marked as a duplicate of bug 291332 ***
Comment 22 Teus 2014-04-16 10:32:54 UTC
Hi,

This problem is still in KDE 4.11.5, but attachments missing are in OpenDocument format if this is relevant. There is no icon for attachment in mail list, but attachment appears in mail. For doc and docx attachment icon is showed on list.
Comment 23 Bernd Oliver Sünderhauf 2014-04-16 12:08:18 UTC
@Teus:
Seems to be completely fixed only in 4.12, otherwise please check bug 291332.
Comment 24 Samuele Carcagno 2014-04-28 15:52:01 UTC
I've just tried kmail 4.13 on Kubuntu 14.04 (Trusty) and the missing attachment flag problem is still present
Comment 25 Lars Altenhain 2014-04-29 08:45:03 UTC
On openSUSE 13.1 with KDE4.13 this bug is also still present. The attachment icon is shown for new mails but as soon as the mail is marked as read or moved to another folder the icon disappears. 

For new mails with an attachment the "$ATTACHMENT" flag is set in the akonadi database (can be seen with akonadi console) but not transmitted to the imap server. This can be checked e.g. with thunderbird by creating a tag "$ATTACHMENT" there and filter the message list by this tag. As soon as something is done to the email like marking as read the flags are reread from the server and the "$ATTACHMENT" flag disappears from the akonadi database. If the email is copied to another folder inside kmail the "$ATTACHMENT" flag is correctly set also on the imap server for the copy.
Comment 26 Christian Hille 2014-07-12 10:47:03 UTC
Can confirm the error. Inbox messages have no icon for attachments. K-Mail is not suitable for professional use with this error.
Comment 27 Gita Benadi 2014-07-14 19:24:22 UTC
Same problem here on Kubuntu 14.04. Not being able to see which messages in the list have attachments is really a big annoyance.
Comment 28 Daniel Wrana 2014-09-20 05:59:44 UTC
Still there in Ubuntu 14.04 with KDE 4.14. I have this bug since years with two different servers. Working around with pop3, wich is not really a solution (and also buggy)
Comment 29 Larry CK 2014-10-27 10:20:22 UTC
Using OpenSuse 13.1 (64bit). Resently upgraded to KDE 4.14.2 and Kontakt version upgraded to 4.14.2 as well.

Attachment issue got kind off "better", but is still there. Now, for some e-mails list will correctly show  "has attachment" icon, for some e-mails the "has attachment" icon appears (when there is an attachment) once I activate/click on the e-mail message in the list, yet for other e-mails, that do have attachments, clicking on the message does not help, kontakt/kmail simply does not show the show the "has attachment" icon. E-mails without the "has attachment" icon are not displayed when "messages with attachments" filter is used. Is there any progress on this?
Comment 30 Oskar Krol 2015-02-14 10:09:15 UTC
The bug is NOT RESOLVED!
Still present in KMail 4.13.3
Not showing attachments flags... :(
Comment 31 Laurent Montel 2015-02-14 12:11:05 UTC
4.13.3 is very old. 
But there is some fix in 4.14.6.
Comment 32 Oskar Krol 2015-02-14 19:43:06 UTC
Thanks for your help Laurent, upgraded Mint to 17.1 and have Kmail 4.14.2 now...
Would you know how can I make it into 14.6? :)
Comment 33 Vamp898 2015-04-17 08:30:47 UTC
Using 4.14.6 on Archlinux, nothing changed. Issue is still there.

But it changed a bit.

In the past versions i could see the icon until i opened the email (so it was there for unread messages).

No its not there at all.
Comment 34 Claudius 2015-08-20 13:54:01 UTC
Using 4.14.9, openSUSE 13.2, IMAP accounts - still the same issue. Attachments are shown for unread mail. Once the email is read the attachment flag disappears.

This is more than a minor annoyance...

Let me know if there is anything further information needed.
Comment 35 Wolfgang Bauer 2015-08-20 16:09:55 UTC
(In reply to Claudius from comment #34)
> Using 4.14.9, openSUSE 13.2, IMAP accounts - still the same issue.
> Attachments are shown for unread mail. Once the email is read the attachment
> flag disappears.

Does this happen when the mail is markes as read automatically, or only if you mark it manually (by clicking on the state icon)?

There is a bug that this flag icons removes the wrong flag, i.e. the one that indicates there's an attachment.
See bug#342756
Comment 36 Claudius 2015-08-20 16:57:56 UTC
This happens as soon as I read an email - so automatically. I don't click the state icon.
Comment 37 Michael D 2015-10-09 19:41:33 UTC
Still a bug in kmail2 version 5.0.1. After not having noticed a single attachment in 3 years, this bug finally got me fired from my job!