Dovecot + Postfix + Rspamd can do it. Instead of pulling emails you can simply forward those providers to your homeserver account. You may also setup Postfix in a way that would allow you to use our @gmail@hotmail addresses as “from” addresses / aliases to your local account and it will automatically submit the email through the provider SMTP server when you send something.
If you really want to pull email instead of setting up forwards (have your server offline more time and whatnot) there are a few options:
Now when you send and email and the from is set as [email protected] Postfix will route the email through Gmail’s SMTP server with credential stored on that table. If done correctly (smtpd_sasl_authenticated_header = no) no references to [email protected] will show up on the email headers.