Bug 312074 - kmail can not detect mailing lists in imap folders
Summary: kmail can not detect mailing lists in imap folders
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 5.3.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-22 14:42 UTC by Anders Lund
Modified: 2021-01-13 12:05 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Lund 2012-12-22 14:42:12 UTC
Since I moved to IMAP, kmail can not autodetect mailing lists in folders any longer

Reproducible: Always

Steps to Reproduce:
1. subscribe to a mailing list, create a filter moving its messages to a dedicated folder and wait till you get a few messages
2. activate folder->mailing list management and click the autodetect button
Actual Results:  
kmail can not detect mailing list

Expected Results:  
mailing list detected
Comment 1 Anders Lund 2012-12-22 14:44:05 UTC
the described procedure should of course happen using a IMAP account ;)
Comment 2 Martin Airs 2013-05-24 17:54:29 UTC
I'v managed to get it to work, by going into the folder and selecting the top mail, then scroll to bottom and shift+select the bottom mail (or select all)

then if I go into Folder->Mailing List Management then press detect automatically, it does fill in the fields successfully

Martin
Comment 3 Daniel Vrátil 2013-05-24 17:57:22 UTC
Is this with regular or disconnected IMAP? Can you check whether the emails have List-Post header?
Comment 4 Martin Airs 2013-05-24 18:02:52 UTC
this is a regular imap folder, the fedora Announce, KDE, Test and User lists to be specific

I also found that if you only select a few emails it still doesn't detect automatically, you have to select allot or all for it to work
Comment 5 Colin J Thomson 2013-05-24 19:30:22 UTC
(In reply to comment #2)
> I'v managed to get it to work, by going into the folder and selecting the
> top mail, then scroll to bottom and shift+select the bottom mail (or select
> all)
> 
> then if I go into Folder->Mailing List Management then press detect
> automatically, it does fill in the fields successfully

Interesting... I just tried this with my dIMAP account with a folder with 5 list emails and one with ~900 and it does not work here.
I also checked the headers in various groups and the List-Id: is there.
Comment 6 Martin Airs 2013-05-24 20:36:40 UTC
> Interesting... I just tried this with my dIMAP account with a folder with 5
> list emails and one with ~900 and it does not work here.
> I also checked the headers in various groups and the List-Id: is there.

and are the other headers there in the mails, eg....

Reply-To: KDE on Fedora discussion <kde@lists.fedoraproject.org>
List-Id: KDE on Fedora discussion <kde.lists.fedoraproject.org>
List-Unsubscribe: <https://admin.fedoraproject.org/mailman/options/kde>,
	<mailto:kde-request@lists.fedoraproject.org?subject=unsubscribe>
List-Archive: <http://lists.fedoraproject.org/pipermail/kde/>
List-Post: <mailto:kde@lists.fedoraproject.org>
List-Help: <mailto:kde-request@lists.fedoraproject.org?subject=help>
List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/kde>,
	<mailto:kde-request@lists.fedoraproject.org?subject=subscribe>

these are the fields that get auto populated in kmail

Martin
Comment 7 Colin J Thomson 2013-05-24 21:13:18 UTC
(In reply to comment #6)
> > Interesting... I just tried this with my dIMAP account with a folder with 5
> > list emails and one with ~900 and it does not work here.
> > I also checked the headers in various groups and the List-Id: is there.
> 
> and are the other headers there in the mails, eg....
> 
> Reply-To: KDE on Fedora discussion <kde@lists.fedoraproject.org>
> List-Id: KDE on Fedora discussion <kde.lists.fedoraproject.org>
> List-Unsubscribe: <https://admin.fedoraproject.org/mailman/options/kde>,
> 	<mailto:kde-request@lists.fedoraproject.org?subject=unsubscribe>
> List-Archive: <http://lists.fedoraproject.org/pipermail/kde/>
> List-Post: <mailto:kde@lists.fedoraproject.org>
> List-Help: <mailto:kde-request@lists.fedoraproject.org?subject=help>
> List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/kde>,
> 	<mailto:kde-request@lists.fedoraproject.org?subject=subscribe>
> 
> these are the fields that get auto populated in kmail

Good info, thanks.. Although most of the groups are Yahoo Groups via my Gmail IMAP there are some of those headers:

Mailing-List: list dds-vfo@yahoogroups.com; contact dds-vfo-owner@yahoogroups.com
Delivered-To: mailing list dds-vfo@yahoogroups.com
List-Id: <dds-vfo.yahoogroups.com>
List-Unsubscribe: <mailto:dds-vfo-unsubscribe@yahoogroups.com>

I am subscribed to a few other groups that are not Yahoogroups, I test with those once mail arrives.
Comment 8 Colin J Thomson 2013-05-25 23:52:02 UTC
OK, just had some Email in from a non yahoogroup with my dIMAP account and detection of that mailing list worked no problem, here are the relevent parts of the header:

Reply-To:*****-***** <*****-*****@hotmail.com>
List-Id: <knightsqrss_cnts.be.cnts.be>
List-Unsubscribe: <http://mail.cnts.be/mailman/options/knightsqrss_cnts.be>,
	<mailto:knightsqrss-request@cnts.be?subject=unsubscribe>
List-Archive: <http://mail.cnts.be/mailman/private/knightsqrss_cnts.be/>
List-Post: <mailto:knightsqrss@cnts.be>
List-Help: <mailto:knightsqrss-request@cnts.be?subject=help>
List-Subscribe: <http://mail.cnts.be/mailman/listinfo/knightsqrss_cnts.be>,
	<mailto:knightsqrss-request@cnts.be?subject=subscribe>
Comment 9 Stefan Brüns 2013-11-20 01:01:41 UTC
Ok, here is some analysis what is happening inside KMail/Akonadi:

(see kdepim/kmail/collectionpage/collectionmailinlistpage.cpp for source code)
1. KMail requests the headers from Akonadi - CollectionMailingListPage::slotDetectMailingList()
2. Akonadi returns the stored headers - CollectionMailingListPage::slotFetchDone( KJob* job )
3. Headers are checked for List-Id and so on.

The problematic part is 2 - apparently Akonadi does not return all headers. I have dumped the returned headers, and only the following headers are returned (contents obfuscated):

Date: xxx
From: xxx
Subject: xxx
In-reply-to: xxxx
To: xxx
Message-id: xxx
References: xxx yyy zzz

Now, if i go to the *oldest* message and use "View Source [V]", then start the detection again, everything works, as Akonadi returns *all* headers.

This is a quite old installation, and IIRC Akonadi fetches the full headers as of late only.
Comment 10 Denis Kurz 2016-09-24 18:13:10 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 11 Colin J Thomson 2016-09-25 11:40:54 UTC
Still seeing this in applications 16.08 mainly with Yahoo groups headers as mentioned in the comments above.  If it helps akonadi-1.13.0-102.fc24.x86_64 and all my mail accounts are dIMAP.
Comment 12 Denis Kurz 2016-09-25 17:58:29 UTC
Colin, akonadi-1.13 suggests that your KDE PIM suite is much older than the rest of your KDE Applications (which is not uncommon). Could you please check KMail's version via "Help -> Introduction to KMail"? For KDE Applications 16.08, it should say 5.3.0 or 5.3.1 there.
Comment 13 Colin J Thomson 2016-09-25 18:13:43 UTC
(In reply to Denis Kurz from comment #12)
> Colin, akonadi-1.13 suggests that your KDE PIM suite is much older than the
> rest of your KDE Applications (which is not uncommon). Could you please
> check KMail's version via "Help -> Introduction to KMail"? For KDE
> Applications 16.08, it should say 5.3.0 or 5.3.1 there.

Sure Dennis Kmail is 5.3.0 here. 
This Fedora 24 box is running Plasma 5.7.5, Frameworks 5.26.0 and Applications 16.08.1
Comment 14 Rex Dieter 2016-09-25 18:19:05 UTC
Colin, re comment #11 ,

fyi, the the kf5 style akonadi package on fedora is named kf5-akonadi-server

(the old akonadi-1.13 package only provides kde4-style libraries for legacy applications in f24)
Comment 15 Colin J Thomson 2016-09-25 18:27:07 UTC
Thanks for the info Rex, I should of realised that.
So my kf5-akonadi-server is 16.08.1
Comment 16 Denis Kurz 2016-09-25 18:56:35 UTC
Great, thanks a lot. Reopening
Comment 17 Colin J Thomson 2020-05-16 18:44:49 UTC
FWIW I just tested with groups.io and that is not detected either via the mailing list management. I did read that "List-Post header" isn't available in groups.io so guess this might be the reason?

Fedora32 Kmail 5.14.0 (20.04.0) dIMAP