I’m planning to migrate my email to a different provider, but they don’t give much storage, so I was wondering what people would recommend for this kind of setup: basically I’d like to use the new provider as something like a relay. I’d want them to only store an email or two at a time and have some kind of self hosted solution that just grabs the emails from the provider and stores them after deleting them off the provider so it’s never storing my entire email history, and also keeps my sent emails somewhere so that I have a copy of it. Ideally I’d wanna be able to set this up with a mail client like NextCloud’s.
Found it. Postfix has a feature called ETRN service. https://www.postfix.org/ETRN_README.html
From what I know about it you might be able to configure the “cloud” Postfix server to deliver all incoming email into your local / self-hosted Postfix instance using
relay_domains
http://www.postfix.org/postconf.5.html#relay_domains and http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall and then setup ETRN to deal with your local server being offline / unavailable.The following links may also be of interest so your local / self-hosted email server can send email. http://www.postfix.org/STANDARD_CONFIGURATION_README.html#dialup https://linuxhint.com/configuring_postfix_relayhost/ https://www.cyberciti.biz/faq/how-to-configure-postfix-relayhost-smarthost-to-send-email-using-an-external-smptd/