InterLinked1 / lbbs

Lightweight BBS For Linux - Bulletin Board System server software
GNU General Public License v2.0
35 stars 4 forks source link

net_imap: Thunderbird clients infinite loop if BODY[] not returned #11

Closed InterLinked1 closed 1 year ago

InterLinked1 commented 1 year ago

Thunderbird-based clients will enter an infinite loop trying to fetch the BODY[] is they ask for it, since net_imap does not yet support this. The FETCH response will be empty, causing clients to loop forever until the user manually closes them.

[2023-06-03 15:24:40.630]   DEBUG[8163]: net_imap.c:4667 process_fetch: 0x7fb3fdc575d0 <= * 44 FETCH (RFC822.SIZE 172442 UID 96)
[2023-06-03 15:24:40.630]   DEBUG[8163]: net_imap.c:4705 process_fetch: 0x7fb3fdc575d0 <= 1551 OK UID FETCH Completed
[2023-06-03 15:24:40.649]   DEBUG[8163]: net_imap.c:9125 handle_client: 0x7fb3fdc575d0 => 1552 UID fetch 96 (UID RFC822.SIZE BODY.PEEK[]<99614720.65536>)
[2023-06-03 15:24:40.650] WARNING[8163]: net_imap.c:4564 process_fetch: Unsupported BODY[] argument: []<99614720.65536>
[2023-06-03 15:24:40.650]   DEBUG[8163]: net_imap.c:4667 process_fetch: 0x7fb3fdc575d0 <= * 44 FETCH (RFC822.SIZE 172442 U

A surface level fix would prevent clients from infinite looping in this manner, ideally disconnecting them after some number of failed fetches in a row, but of course the real fix is to support this mandatory FETCH argument.