# PHP 8.4 Imap extension unbundled / missing lib on debian trixie

**URL:** https://forum.mautic.org/t/php-8-4-imap-extension-unbundled-missing-lib-on-debian-trixie/36989
**Category:** Product Support
**Created:** [November 28, 2025, 7:57am UTC](https://forum.mautic.org/t/php-8-4-imap-extension-unbundled-missing-lib-on-debian-trixie/36989 "2025-11-28T07:57:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![larsmattia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/larsmattia/32/13016_2.png) [@larsmattia](https://forum.mautic.org/u/larsmattia)
#### Post date: [November 28, 2025, 7:57am UTC](https://forum.mautic.org/t/php-8-4-imap-extension-unbundled-missing-lib-on-debian-trixie/36989/1 "2025-11-28T07:57:25Z")

</div>

**Your software**  
My Mautic version is: 6.0.6  
My PHP version is: 8.4 (Debian Trixie)  
My Database type and version is: -

**Your problem**  
My problem is:

Starting with Debian Trixie the libc-client-dev ([libc-client2007e-dev](https://packages.debian.org/sid/libc-client2007e-dev)) package required to build the imap ext is not provided anymore.

Research revealed: [IMAP extension moved from PHP Core to PECL - PHP 8.4 • PHP.Watch](https://php.watch/versions/8.4/imap-unbundled)

Root cause:

> The underlying C library that the extension depends on has not received any updates since 2018.

Thats 7 years now. 😑

docker-mautic worked around by pinning to debian bookworm: [fix: Unable to locate package libc-client-dev by kiart-tantasi · Pull Request #441 · mautic/docker-mautic · GitHub](https://github.com/mautic/docker-mautic/pull/441)

There is the webklek/php-imap PHP implementation: [GitHub - Webklex/php-imap: PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication process as well.](https://github.com/Webklex/php-imap)

---

<div class="post-metadata">

### Author: ![onorosaurosrex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/onorosaurosrex/32/15100_2.png) [@onorosaurosrex](https://forum.mautic.org/u/onorosaurosrex)
#### Post date: [June 29, 2026, 8:30pm UTC](https://forum.mautic.org/t/php-8-4-imap-extension-unbundled-missing-lib-on-debian-trixie/36989/2 "2026-06-29T20:30:04Z")

</div>

Hi,

I had exactly the same issue and found a solution that works without needing php-imap.

Instead of Mautic reading the bounce mailbox directly via IMAP, a small script on the mail server reads the bounces and notifies Mautic through its `/mailer/callback` endpoint, just like Amazon SES and SendGrid do.

There are two components:

- A plugin for Mautic 7 that registers smtp as a callback transport
- A Perl script running on the mail server via cron

It’s working in my environment with Debian 13, PHP 8.4, Mautic 7.1.2, and Postfix + Dovecot.

I’m not a Mautic developer — I’m a sysadmin and just wanted to share this in case it’s useful to someone. I welcome any feedback or improvements.

**GitHub:** [GitHub - onorosaurosrex/mautic-postfix-bounce: Mautic 7 bounce processing for self-hosted Postfix without php-imap. Compatible with Debian 13 and PHP 8.4. · GitHub](https://github.com/onorosaurosrex/mautic-postfix-bounce)
