Outgoing Mail Routing on LAN
I have a mail-related question for what might be a slightly unusual situation:
On my LAN, I have a server (Machine A) running that handles automated backups (via rsync/rsnapshot and a custom script). When it completes its backup, it sends out an email to my gmail account so that I am notified of the success/failure of the backup process (regardless of where I am at the time). Exim(4) is configured on this server as smarthost for this purpose.
Now, I have another machine (Machine B) on my LAN that I'm using for home security, and I'd like to have an email generated on certain security events, but rather than routing directly through my ISP, I want to have the outgoing email routed through the mail server on Machine A. It turns out that the security software I'm using on Machine B doesn't handle authentication correctly.
So, my question is this:
How can I config exim on Machine A to handle my outgoing email on Machine B (or any other machine on my LAN for that matter)?
Keep in mind that I don't care about handling incoming mail: I just need to generate email notifications from within my LAN and send them out to external destinations.
Intuitively, I know that whatever email app I use (e.g. mail) on Machine B needs to somehow understand that it must route to the mail server on Machine A, but I'm at a loss at understanding how this is accomplished.