php8.4 no longer has imap as a module, it needs to be added via pecl. That worked for bookworm, but generated an error for trixie:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
67.42 ERROR: `/tmp/pear/temp/imap/configure --with-php-config=/usr/local/bin/php-config --with-kerberos --with-imap-ssl' failed
php8.4 no longer has imap as a module, it needs to be added via pecl. That worked for bookworm, but generated an error for trixie: