Created attachment 2282 [details] Increase POPBUFSIZE and check for overflow I recently needed to use Microsoft Exchange, and followed the very helpful instructions at https://www.claws-mail.org/faq/index.php/Oauth2 . One of the issues I encountered was that the Oauth2 access tokens used can be larger than one of the buffers used to store them. The largest token size I saw was 3636 bytes, but pop3_gen_send silently truncates these tokens to POPBUFSIZE=512 bytes . I've attached the patch that I use to increase POPBUFSIZE and warn when there is an overflow.
Fixed by 15f792b7ecc27a055afe119bb3caf812fdeada79.