I run a cPanel server. This server was recently compromised and spam was being sent, so I would like to keep track of every email that Exim sends.
Would it be possible to make Exim run a script before putting the email in the queue?
I want to make Exim send the "From: " header to a Python script. This script will keep track of how many emails that domain has sent in 1 hour, and either let the email be sent, or block the cPanel account.
I have tried doing this with
system_filter, but I couldn't successfully do it.
How can I make Exim send outgoing email to a Python script for processing?