https://bugs.kde.org/show_bug.cgi?id=527954

            Bug ID: 527954
           Summary: PIM events plugin of digital clock renders iCal data
                    embedded in emails (IMAP spam folder) as calendar
                    events, duplicating real calendar entries
    Classification: Applications
           Product: kdepim
      Version First 6.8.1
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

The "PIM events" calendar plugin of Plasma's digital clock widget renders
calendar events extracted from iCalendar data embedded in unrelated EMAIL
items — in my case three invitation/confirmation mails sitting in the spam
folder of an IMAP account. A single, non-recurring Google Calendar event was
displayed FOUR times: once (live) from the Akonadi Google calendar resource,
and three times (static) from three emails whose raw payloads embed the same
VEVENT data.

STEPS TO REPRODUCE

1. Set up an Akonadi Google Calendar (libkgapi) resource with a calendar event.
2. Have at least one email in any IMAP folder of an unrelated mail account (in
   my case: the spam folder) that embeds iCalendar data for the same event —
   typical conference invite/confirmation mail with a text/calendar part.
3. Enable the "PIM events" plugin on the digital clock widget and open its
   calendar.

OBSERVED RESULT

- The event is shown multiple times: one live entry plus one entry per
  matching mail. Only the entry backed by the real calendar item follows edits
  made in Google Calendar; the mail-derived entries stay frozen, because the
  emails never change.
- The mail-derived entries are rendered with a default/fallback color (mail
  folders have no calendar color).
- In the plugin's configuration page (digital clock settings → calendar →
  PIM events), the list of calendars is EMPTY.
- akonadiserver logs at session start (twice):
  "Error while handling command FetchCollections on connection
plasmashell-<pid>"
- The user journal shows a repeating ItemRetrievalJob loop (roughly every
  5 s) on the plasmashell connection.

EXPECTED RESULT

The PIM events plugin should only display incidences from collections that
actually provide calendar/event items. Email items (message/rfc822, IMAP
folders) must never be parsed as calendar events, regardless of any embedded
iCalendar data.

ADDITIONAL INFORMATION

I analyzed the Akonadi database (SQL against the local Akonadi MariaDB
instance) while the widget showed the event four times:

- The Akonadi Google calendar collection contains exactly ONE item for the
  event: a clean payload (single VEVENT, no RRULE, no RECURRENCE-ID,
  STATUS:CONFIRMED, iCal UID <eventuid>@google.com).
- Querying ALL item payloads in the Akonadi database for the event title and
  its DTSTART returns exactly two kinds of hits:
  (a) the single live calendar item (Google calendar collection), and
  (b) three EMAIL items in the IMAP spam folder collection of an unrelated
      mail account (akonadi_imap_resource), each embedding the same event
      title and the same DTSTART/DTEND in their raw RFC822 payload.
- There are no duplicates anywhere in the calendar collections: KOrganizer/
  Merkuro and the Google web UI show the event exactly once. konsolekalendar
  (akonadi-calendar-tools) also lists it exactly once.
- Deleting the three mails via IMAP (webmail) made the surplus entries
  disappear from the widget immediately, and the Akonadi database removed the
  mail items via IMAP sync. The issue is fully resolved for me, but the
  underlying filtering bug remains.

The empty calendar list in the plugin's configuration page plus the recurring
"Error while handling command FetchCollections on connection plasmashell-…"
messages suggest that the plugin's collection filtering is broken in general:
it appears to include mail collections as event sources, and the configuration
page fails to fetch its collection list at all.

Possibly related but distinct: bug 464328 (PIM events plugin shows recurring
events twice) covers recurrence/exception explosion. This report is about mail
items being rendered as events at all — not a duplicate of that issue.

[thomas@roamer ~]$ grep -i "retrieval\|FetchItems" akonadi-pimevents.log | head
-5
Okt 28 19:08:06 roamer akonadiserver[3877]: ItemRetrievalJob for request 7
finished
Okt 28 19:08:12 roamer akonadiserver[3877]: ItemRetrievalJob for request 11
finished
Okt 28 19:08:17 roamer akonadiserver[3877]: ItemRetrievalJob for request 12
finished
Okt 28 19:08:22 roamer akonadiserver[3877]: ItemRetrievalJob for request 13
finished
Okt 28 19:08:27 roamer akonadiserver[3877]: ItemRetrievalJob for request 14
finished
[thomas@roamer ~]$ 


SOFTWARE/OS VERSIONS

- Distribution: EndeavourOS (Arch Linux based, rolling)
- Plasma version: 6.8.1 (plasma-desktop 6.8.1-1)
- Qt version: 6.12.0 (qt6-base 6.12.0-3)
- kdepim-addons: 26.08.2-1
- kdepim-runtime: 26.08.2-1
- Akonadi: 26.08.2-2
- Kernel: 7.2.11-arch1-1 (uname -r)
- Session type: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to