this post was submitted on 19 Oct 2023
3 points (100.0% liked)

Self-Hosted Main

502 readers
1 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.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hello all, i am not sure if plain webmail is the right category for what i'm looking for.

I already have a mail server running in a hosting VPS that has been running for years and handles sending and receiving emails without issues or being flagged as spam, what I'm trying to accomplish is:

  • Handling the storage of very old and large mailboxes (imap 20gb+) to my local server since my VPS is runing out of space.
  • Continue using the VPS email server to receive/send emails. Since i'm not at all interested in selfhosting the email server and dealing with all those issues.
  • Multiuser since several family members have the same issue.
  • Selfhosted so we can check/send email from any device/mobile.

Something that works similar (but obviously not selfhosted) is adding a POP3 account to Gmail/Outlook/etc and then adding the "send mail as" SMTP credentials of the server. I would like to replicate the same but selfhosted if possible.

Is there anything that works like this?

top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 11 months ago (1 children)
[–] [email protected] 1 points 11 months ago

Thank you, i'm reading the documentation to see if i can figure out how to make it work mostly as a client that sends emails thru the VPS email server.

[–] [email protected] 1 points 11 months ago (1 children)

IMO, you're overcomplicating things a lot. You already have a working mail server, which is not easy to setup and maintain. Adding another mail server and redistributing mail storage / routing mail between the two will drastically decrease stability and may affect deliverability of your mail as well.

Why not just add storage to the existing VPS? If your hosting provider doesn't provide such option, you can mount third-party S3-compatible storage (rclone mount works great, a few hundred Gb on Backblaze cost virtually nothing) and store your mail there.

[–] [email protected] 1 points 11 months ago (1 children)

You may be correct and it looks like this might be the cleanest solution to my problem.

I could even try to mount my local storage using wireguard and NFS. But I imagine network issues or downtime while receiving mails could mean big trouble, but that's only an issue if I selfhost the storage and not pay for third party storage.

In my mind i was so sure that something already existed that was both a webmail client and also supported local storage of email lol, for some reason still it just makes sense to me.

[–] [email protected] 1 points 11 months ago

You call it "webmail client", but if it stores email and serves it to other clients - it's already server anyway :)

And you mentioned you need to "check/send email from any device/mobile". You're probably not going to use webmail from mobile (it must be a disappointing experience)... so you need IMAP on this "client-server" too. At least you can keep SMTP part unchanged on your VPS and send via it directly... But if you have something like ActiveSync (SoGo etc.) - things get more interesting. Even without ActiveSync, CalDAV/CardDAV also can be an additional problem if you need to archive old calendars as well as mail... etc.

Considering all these nuances that may arise in course of implementing your idea, I've suggested an easier way.

[–] [email protected] 1 points 11 months ago (1 children)

You could do what I did and move the mail server to a local machine or VM then use Wireguard on the VPS which tells iptables to route incoming mail traffic ports to the now local mail server. Then you can use as much space as you want.

[–] [email protected] 1 points 11 months ago (1 children)

How do you deal with outages on the local mail server VM do you queue mail?

What about sending mail as I know outbound smtp can be difficult to avoid getting spammed

[–] [email protected] 1 points 11 months ago
  1. https://serverfault.com/questions/117906/what-happens-when-a-mail-server-goes-down

"The SMTP protocol is very resilient in design. Most modern MTAs will attempt to resend a message every 4 hours for up to 5 days though this is configurable by the particular systems admin there is usually very little need to change from this."

  1. Get a clean IP, there are many online sites that offer to check an IP: http://www.mxtoolbox.com/

Then make sure your server is configured well so it doesn't get a bad rep: https://www.linuxbabe.com/mail-server/setup-basic-postfix-mail-sever-ubuntu by setting up SPF, DKIM and DMARC.

[–] [email protected] 1 points 11 months ago

Are you looking for a way to archive older mails like Mailstore ?

[–] [email protected] 1 points 11 months ago

I use fetchmail to grab mail from an email provider and deliver it to my dovecot instance hosted at home. My mail provider is just used to store mail temporarly (up to a minute unless my server is down) and send email (I use their SMTP server).

That way, my data is stored at home but I don't have usual 'selfhosted mail server' issues. I can be down for days and my email will be received by my provider and I don't need to do/setup/maintain anything to ensure my mail will be deliverable!

With a custom domain and nothing that stay on their server, I can switch provider within a few minutes by updating the nameserver to point my domain to another server