Hi everyone,
I’ve been setting up Mautic 7 on Debian 13 with PHP 8.4 and a self-hosted Postfix server, and like many of you I ran into the php-imap problem. After a lot of research and trial and error I found a way to make bounce processing work without it.
The approach is simple — 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 existing /mailer/callback endpoint, the same way Amazon SES and SendGrid do it.
It’s two pieces:
- A small Mautic 7 plugin that registers the smtp callback
- A Perl script that runs on the mail server via cron
It’s working on my setup. I’m not a Mautic developer — I’m just a sysadmin who needed this to work and wanted to share it in case it helps someone else. I’d really appreciate any feedback, improvements, or corrections from people who know Mautic’s internals better than I do.
Hope it’s useful to someone!