I want to block all outgoing emails except to few whitelisted domains. what are the best ways to go about it?
Can I put an intermediate Intranet server which will do filtering based on whitelist and forward requests to actual SMTP server if its allowed?
update: this one is similar but can't figure out actual details. How to properly filter outgoing e-mail?
this looks interesting: https://serverfault.com/a/122772
Update: is it possible to forward same user credentials from relay to actual SMTP server?