this post was submitted on 21 Jun 2023
7 points (100.0% liked)

Selfhosted

46677 readers
756 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 2 years ago

Found it. Postfix has a feature called ETRN service. https://www.postfix.org/ETRN_README.html

The SMTP ETRN command was designed for sites that have intermittent Internet connectivity. With ETRN, a site can tell the mail server of its provider to "Please deliver all my mail now". The SMTP server searches the queue for mail to the customer, and delivers that mail by connecting to the customer's SMTP server.

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/