I regularly send out mails using different addresses from different domains. Let's take mail@example.com
and new@spf.com
as an example.
To keep things easy and centralized (as in: configuration is on the server, so I don't have to set up each client separately), I always use smtp.example.com
as my outgoing mail server, which is an Exim on Debian.
Now, the admin of this fictitious spf.com
has activated SPF and tells me that mails sent from my @spf.com
-address through example.com
might start getting filtered. Makes sense!
Of course, I now would go ahead and set up all the different clients I use (home PC, laptop, work machine, smartphone, …) so that mails from the different domains go out through their respective SMTPs. If you ever tried this, it's a hassle: Each client is different and not all are as easy to configure. It would be so much easier to tell Exim to:
- check outgoing mails before sending them,
- "intercept"/filter out ones from
@spf.com
, and - "forward"/send those through smtp.spf.com (with the provided username and password) instead.
This way, I could set up the whole thing once on the server and be done with it—every client would work "out of the box".
I've been having trouble searching for the correct terms to google for; I'd be surprised if Exim wasn't able to do something like this!