Skip to content

EWS: meeting requests, responses and cancellations are listed with their dates, sender and size - #1573

Merged
benandez merged 1 commit into
UCSLabs:mainfrom
SetsuaD:fix/1457-ews-meeting-requests
Nov 17, 2026
Merged

benandez merged 1 commit into
UCSLabs:mainfrom
SetsuaD:fix/1457-ews-meeting-requests

Conversation

@SetsuaD

@SetsuaD SetsuaD commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1457.

What was wrong. SyncFolderItems asks for the Default shape plus the recipients, categories, preview and flag,
and read_item takes the times, size, sender, importance and Message-ID from whatever comes back. Default doesn't
give the same fields for every kind of item. On an Exchange Server 2019, a MeetingRequest, MeetingResponse or
MeetingCancellation (IPM.Schedule.Meeting.Request, .Resp.*, .Canceled) comes back with its id, subject, read
state, attachments flag and preview, and with no DateTimeReceived, DateTimeSent, Size, From, Importance or
InternetMessageId. The answer is still NoError. So the item was stored as sent and received at 0, from nobody, size 0.
That is the record in the report ("date": 0, "received": 0, "unfetched": true). It was sorted below everything else
in the folder, under the oldest heading, and the background download takes the newest first, so it was the last message
of the account to be fetched whole. Until that fetch filled the date from the MIME, the invitation was listed at the very
end of a large Inbox, with no date and no sender. A plain Message isn't hit as hard: Default gives it DateTimeSent,
From and Size, but not DateTimeReceived or Importance.

The fix (crates/ews only):

  • items.rs: SyncFolderItems::element asks for item:DateTimeReceived, item:DateTimeSent, item:Size,
    item:Importance, message:From and message:InternetMessageId by name, in every shape (Full, Lean, Bare).
    These are basic item properties in every schema version back to Exchange 2007, so they don't change which shape a
    server is read in. Nothing changes in how the answer is read: the item reader already takes any item element, and it
    now gets the fields it reads.
  • The stand-in: an item has the element it is listed as (Item::element, Message by default), and
    State::deliver_meeting delivers a meeting request, response or cancellation. In the Default shape such an item
    gets what Exchange gives it, with the times, size, sender, importance and Message-ID only when they are asked for.
    It also knows item:DateTimeSent, item:Size and message:InternetMessageId.

Tests. mail_tests.rs: meeting_messages_come_with_their_times_sender_and_size lists a request, a response and a
cancellation in the Inbox through the stand-in, in each shape (every property, without the preview, Exchange 2010). It
checks that each comes with its two times, its sender, its importance, its size and its Message-ID. It fails without
the change ("a server with every property: Planning: dated") and passes with it. cargo xtask ci passes.

Checked live on an Exchange Server 2019 (15.2) we run. We put an iCalendar REQUEST, REPLY and CANCEL into a
test mailbox's Inbox. Exchange stored them as IPM.Schedule.Meeting.Request, IPM.Schedule.Meeting.Resp.Tent and
IPM.Schedule.Meeting.Canceled.

  • SyncFolderItems in the shape the listing asked for until now: the three came back as t:MeetingRequest,
    t:MeetingResponse and t:MeetingCancellation with no times, size, sender, importance or Message-ID. With the six
    properties added, all of them were there.
  • The app built from this branch, on a fresh profile, with Download messages in full set to 1 MB, after one
    Send/Receive (mail.list over the control channel). All four were at the top of the Inbox, each with its sender and
    with its arrival time from DateTimeReceived (the cancellation arrived two seconds after it was sent). That includes
    a fourth request carrying a 2 MB attachment, which was over the limit and so had only the listing to go on.
  • The released 0.13.0 on the same mailbox listed the three small ones with dates and a sender too, but only because a
    small Inbox is fetched whole within seconds and the dates then come from the message itself. Its "received" time was
    the sent time, which is what the list falls back to when the listing gave none. A large Inbox, or an invitation whose
    turn to be fetched hasn't come, shows the gap the report describes.

For you to look at.

  • Items already stored with no date stay that way until they change on the server or are fetched whole, when the date
    comes from the message itself. Reading the folders of Exchange server accounts afresh once would mend them at once; I
    left that out.
  • I haven't seen a Grommunio or SmarterMail answer to these six properties in SyncFolderItems. They are standard
    fields, but they are asked in every shape. If a server refused one, no shape would get past it, so a report like
    that would mean moving that property to Full alone.

Human-reviewed, AI-assisted, nobody's mailbox harmed.

Summary by CodeRabbit

  • Bug Fixes
    • Meeting invitations, responses, and cancellations now appear in the folder where they arrived, instead of at the end of the folder without a date. Their arrival date, sender, and size are included in the listing.

…ith their dates, sender and size

The Default shape of SyncFolderItems gives a MeetingRequest, MeetingResponse or
MeetingCancellation no DateTimeReceived, DateTimeSent, Size, From, Importance or
InternetMessageId (Exchange Server 2019), so a meeting invitation was stored dated 0,
from nobody, listed at the end of the Inbox and fetched whole last. The listing now asks
for those six properties by name in every shape. The stand-in lists a meeting's message
as Exchange does, with them only when asked.

Human-reviewed, AI-assisted, nobody's mailbox harmed.
@SetsuaD
SetsuaD requested a review from benandez as a code owner November 17, 2026 04:31
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

SyncFolderItems now requests additional properties for listed items. The EWS stand-in can represent meeting requests, responses, and cancellations with meeting-specific XML. A test checks these items across three server shapes.

Changes: Meeting item listing

Layer / File(s) Summary
Request listed item properties
crates/ews/src/items.rs
SyncFolderItems requests received and sent times, size, importance, sender, and InternetMessageId.
Represent and validate meeting items
crates/ews/src/standin_mail.rs, crates/ews/src/standin_write.rs, crates/ews/src/mail_tests.rs, packaging/release-notes.d/fixes/1457.md
The stand-in stores each item’s XML element type and emits meeting-specific fields. The test checks meeting requests, responses, and cancellations across three server shapes. The release note describes how these items are listed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: thekk1

Merge Risk: Minimal · up to b75f3

Meeting requests, responses and cancellations should now be listed with their date, sender and size on Exchange. The change is small and reversible. Existing records already stored without dates are not repaired by this change.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: EWS meeting requests, responses and cancellations now list with their dates, sender and size. The raw summary confirms the six added properties in SyncFolderItems and …
Description check Passed The description follows the template. It has a closing reference (Closes #1457) and a section on what changes for the user, covered by the 'What was wrong' and 'The fix' parts. The 'How it was checked…
Linked Issues check Passed Issue #1457 requires that an EWS meeting-request email in the Inbox appear in the message list and be accessible. The issue's cause is not established, and its zero timestamps are diagnostic clues onl…
Out of Scope Changes check Passed All changes support the linked objective. items.rs adds the six listed properties to SyncFolderItems. standin_mail.rs and standin_write.rs model meeting elements and the new properties so that the sta…
Full details: Title check

Explanation

The title names the main change: EWS meeting requests, responses and cancellations now list with their dates, sender and size. The raw summary confirms the six added properties in SyncFolderItems and the meeting-item stand-in support. The title is specific and matches the changeset and linked issue #1457.

Full details: Description check

Explanation

The description follows the template. It has a closing reference (Closes #1457) and a section on what changes for the user, covered by the 'What was wrong' and 'The fix' parts. The 'How it was checked' content covers tests, cargo xtask ci, and live Exchange 2019 testing. The CLA and maintainer-edits checklist items are not present, and the Builds-on note does not apply. The description is detailed, but it does not use the template's checklist, so the template is only partly followed.

Full details: Linked Issues check

Explanation

Issue #1457 requires that an EWS meeting-request email in the Inbox appear in the message list and be accessible. The issue's cause is not established, and its zero timestamps are diagnostic clues only. The change in crates/ews/src/items.rs adds DateTimeReceived, DateTimeSent, Size, Importance, message:From and InternetMessageId to every SyncFolderItems shape (LISTED, applied in SyncFolderItems::element). The item reader already reads these fields. Without them, a meeting item is listed with no date or sender and sorts last. The change addresses that listing gap. The stand-in (standin_mail.rs, deliver_meeting) and mail_tests.rs test meeting request, response and cancellation items in each shape and check for these fields. The live Exchange Server 2019 result in the PR description is author-reported and not verifiable from the repository. It supports the fix but is not independent evidence. The PR does not claim that attachments or zero timestamps alone caused the issue, consistent with the issue's limits.

Full details: Out of Scope Changes check

Explanation

All changes support the linked objective. items.rs adds the six listed properties to SyncFolderItems. standin_mail.rs and standin_write.rs model meeting elements and the new properties so that the stand-in can test them. mail_tests.rs adds the regression test. The release note packaging/release-notes.d/fixes/1457.md documents the fix for #1457. No unrelated file or behavior change was found in the reviewed diff of items.rs or in the file summaries.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3982a0b and b75f376.

Files selected for processing: 5

  • crates/ews/src/items.rs
  • crates/ews/src/mail_tests.rs
  • crates/ews/src/standin_mail.rs
  • crates/ews/src/standin_write.rs
  • packaging/release-notes.d/fixes/1457.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@sonarqubecloud

Copy link
Copy Markdown

@benandez benandez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SetsuaD: clear diagnosis and a careful stand-in. Asking for the six properties by name is the right fix, and read_item already reads them from any item element in the t: namespace, so MeetingRequest/Response/Cancellation read the same as Message. Approving.

Checked

  • Head b75f376294a441aed04881277e55a8c555a110ef. CI is green (run 44017777626, plus Fuzz, CodeQL and CLA; 45 pass, 2 skipped). Merges cleanly with main and, textually, with #1572 and #1575.
  • cargo test -p mailcraft-ews: 227 passed, 0 failed, including meeting_messages_come_with_their_times_sender_and_size. Clippy not re-run locally; CI clippy is green.
  • Read: crates/ews/src/items.rs (LISTED, SyncFolderItems::element, read_item), the stand-in changes in standin_mail.rs/standin_write.rs, the new test and the fragment.
  • Request, response and cancellation are each tested in the Full, Lean and Bare shapes. The shape fallback is unchanged. The request only grows, and no new parsing is added.
  • Not checked: a live Exchange or Grommunio server; #1572 and #1573 built together.

Question, not blocking: the six LISTED properties are now asked in every shape, so a server that refused one of them in SyncFolderItems would have no shape left to fall back to (Full, Lean, Bare, then the error stands). They are base item properties since Exchange 2007, but Grommunio and SmarterMail are untested. We'll try a Grommunio server before release. If one refuses, a last shape without them would cover it.

Human-reviewed, AI-assisted, nobody's mailbox harmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EWS: meeting invitation missing from the Inbox UI despite a corresponding local mailbox record

2 participants