• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jstedfast / MailKit / 4.18.1.1687
94%

Build:
DEFAULT BRANCH: master
Ran 03 Oct 2026 09:38PM UTC
Jobs 1
Files 176
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Oct 2026 09:34PM UTC coverage: 92.676% (+0.006%) from 92.67%
4.18.1.1687

push

coveralls.net

jstedfast
Widen message sizes, line counts and offsets to 64-bit

RFC 3501 defines literal lengths, partial fetch offsets, RFC822.SIZE,
body line counts, LARGER/SMALLER and STATUS SIZE as 32-bit *unsigned*
values, so messages larger than 2 GB could overflow MailKit's int-based
APIs. IMAP4rev2 (RFC 9051) widens these to number64 (63-bit), which maps
exactly to System.Int64. Widening now avoids another API break when
IMAP4rev2 support is fleshed out.

All widened values are documented as never being negative.

Public API changes:
- IMailFolder/MailFolder/ImapFolder GetStream[Async] offset/count: int -> long
- ImapFolder.CreateStream/CommitStream offset/length: int -> long
- IMessageSummary.Size/MessageSummary.Size: uint? -> long?
- IMailFolder.Size/MailFolder.Size: ulong? -> long?
- BodyPartText.Lines/BodyPartMessage.Lines: uint -> long
- SearchQuery.LargerThan/SmallerThan: int -> long
- IMailSpool/MailSpool/Pop3Client GetMessageSize[s][Async]: int -> long
- ISmtpClient/SmtpClient.MaxSize: uint -> long. RFC 1870 allows up to
  20 digits, so values exceeding long.MaxValue are clamped.

Internally, the IMAP tokenizer, literal handling, STATUS SIZE,
RFC822.SIZE, partial FETCH offsets and BODYSTRUCTURE line counts are
now parsed as 64-bit values with overflow detection. This also resolves
the FIXME in ImapFolder.CreateStream.

Added unit tests covering literals up to long.MaxValue (and overflow),
line counts above 4 GB including BodyPart serialization round-trips,
FETCH with a 5 GB partial offset and 6 GB RFC822.SIZE, and SMTP SIZE
parsing/clamping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

24079 of 25982 relevant lines covered (92.68%)

0.93 hits per line

Coverage Regressions

Lines Coverage ∆ File
99
95.1
-0.03% D/a/MailKit/MailKit/MailKit/Net/Imap/ImapEngine.cs
59
95.37
0.0% D/a/MailKit/MailKit/MailKit/Net/Imap/ImapFolderFetch.cs
52
93.06
-0.11% D/a/MailKit/MailKit/MailKit/Net/Smtp/SmtpClient.cs
46
83.76
0.78% D/a/MailKit/MailKit/MailKit/BodyPart.cs
41
96.08
-0.21% D/a/MailKit/MailKit/MailKit/Net/Imap/ImapUtils.cs
Jobs
ID Job ID Ran Files Coverage
1 4.18.1.1687.1 03 Oct 2026 09:38PM UTC 176
92.68
Source Files on build 4.18.1.1687
  • Tree
  • List 176
  • Changed 19
  • Source Changed 19
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 21d4a1f8 on github
  • Prev Build on master (#4.18.1.1686)
  • Next Build on master (#4.18.1.1688)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc