Send System/Cron mails *without* Exim MTA
on WordPress servers, often there is a breach or infection for varied reasons like WP-Core not updated or some malicious plugin/theme installed by user.
I would like to "watch" the Exim Queue count (exim -bpc) and report if the count is over a threshold. But the problem is, suppose under a compromised state, the Exim queue is already sitting at 10000, the "alert" mail will be queued after that and is practically never going to shoot out, failing the very purpose of the alert.
Is there a way to configure an alternative MTA like ssmtp or anything else, in parallel to Exim4, so that all cron mails are sent through this special MTA rather than main MTA-Exim
It'd be great to able to send these mails through an authenticated SMTP remote host, like a gmail account to ensure deliverability.
Also if there is a system watcher app that can watch the Exim Queue count (exim -bpc) and report if the count is over a threshold ? Would be a alot of help for servers hosting Wordpress where there is a time to time breach