Q0404 - Exim/exim GitHub Wiki
Q0404
How can I arrange for messages submitted by (for example) Majordomo to be handled specially?
You can use the condition
option on a router, with a setting such as
condition = ${if and {{eq {$sender_host_address}{}} \
{eq {$sender_ident}{majordomo}}} \
{yes}{no}}
This first tests for a locally-submitted message, by ensuring there is no sending host address, and then it checks the identity of the user that ran the submitting process.