PHP 8.4 Imap extension unbundled / missing lib on debian trixie

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) 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

Root cause:

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

Thats 7 years now. :expressionless:

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

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.

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