This Microsoft outage being the last drop in the bucket, I’m looking to get my email/calendar/contacts somewhere under my control.

As I already self-host a number of things (e.g. my Linux ISO collection), and have services exposed to the internet, it would make sense to run it at home.

After all, it’s not heavy lifting. It’s not hosting 500+ mailboxes for 100+ people. It’s just little old me, with a handful of domains, catch-all receiving and a few dedicated sending addresses.

However email is a bit more mission critical than my smarthome control or self hosted LLMs. Downtime could be critically bad, and I still don’t trust my home setup to be truly 99.999999% available.

I don’t mind paying for a service but if I do I’d prefer something European, given I’m based in the UK (and otherwise am an EU citizen).

I’m really curious how y’all solve it. I guess I’m interested in some kind of hybrid solution where there’s my own server and a hosted service, latter which acts as a backup solution, but still fully synced, so if my internet or power goes out (or my server goes down), I can still get mail sent and delivered.

So I’m not only just interested in the stack you run for email but the entire infrastructure, especially if you’ve solved this sort of off-site fallback service.

  • SHY_TUCKER@lemmy.mlBanned
    link
    fedilink
    English
    arrow-up
    23
    ·
    7 days ago

    I own a business. We hit 9 years in September. When we started we did O365. At that time, a business as small as us had to go with a Microsoft “partner” because MS wasn’t going to deal with a business as small as us. We were immediately “man in the middle” hacked. We’d been in business 3 months and someone was grabbing our incoming emails and replying as if they were us. We had no idea. They changed payment terms and re-routed our checks as direct payments to some digital accounts in Miami (USA). I have no doubt that it was our Microsoft “partner” that set us up with O365 and Lync (this was a long time ago). When we pressed Microsoft about it they became totally unresponsive or nasty. We lost about $25,000 dollars right at the very beginning of our business. It was a very dark time for me. But, honestly, that was the best $25K I ever spent. Talk about “attack Surface”.!!! Now I do Fastmail, Nextcloud a nd other self hosted services. I am absolutely convinced that losing $25k was an absurd bargain. People on O365/ SharePoint/Teams get hacked every fucking day. But they don’t tell you about it.

  • tatterdemalion@programming.dev
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    1
    ·
    7 days ago
    1. Get cheap Hetzner VPS with redundant volume.
    2. Get a domain name.
    3. Run Stalwart for you mail server.
    4. Run Bulwark for your inbox web app.
    5. Run Kanidm for an identity provider.
    6. Configure these DNS records: MX, SPF, DKIM and DMARC

    There are more details, but those are the basics.

      • Sir. Haxalot@nord.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        Ive been running a very similar setup for a few months now, and haven’t encountered that many issues. This includes using the infra to send registration confirmations for https://nord.pub/ , and the vast majority of registered users are able to validate the mailbox (don’t have any visibility of how many people had to go to their spam box though). I’ve only had one encounter with a smaller email provider that insisted to only accept email from whitelisted domains/sending servers.

        Also, I think it’s key to have a provider that takes at least some steps to keep email free. For Hetzner you’ll need to request unlock of port 25 and have to paid at least one bill. Not a lot but if you find a VPS provider that allows access to port 25 directly no questions asked, it’s probably a lot more likely to have a bad IP reputation.

        • Squizzy@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 days ago

          Yeah I have heard of issues with websites accepting the addresses as legitimate and the like of outlook auto filtering

          • tatterdemalion@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 days ago

            I believe the main thing to consider beyond just correctness of your email server configuration is that large email providers evaluate the reputation of a sender’s infrastructure. So for example, if your mail server has an IP address associated with large-scale spammers, that would hurt reputation. And if you are your own ASN or something, you have to build your reputation from nothing. I believe I mostly dodge this problem by just putting my email server in Hetzner.

  • tremble5218@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    5 days ago

    Instead of hosting your own mail server, use a service like SimpleLogin. It allows you to configure custom domains on the paid plan and it simply redirects any email sent to an email alias to your actual inbox. So you never share your actual email address. Secondly, if tomorrow you change email providers, all you have to do is change the destination behind those aliases for the custom domains. It also does catch-all aliases so you can make them up on the fly.

    • fonix232@fedia.ioOP
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

      yeah, no thanks. my whole goal is to move away from unreliable megacorps hosted email, not make my domains rely on them too.

      • tremble5218@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        You don’t specifically have to use SimpleLogin. I only suggested it because I use it. You could use a number of other services like AnonAddy, Forward Email, Firefox Relay, etc. for aliases. For email hosting, you could choose any provider of your choosing, doesn’t have to be a mega corp.

        Hosting your email servers comes with a lot of administrative overhead like maintaining availability, reputation, certificates, quotas, DNS entries, DKIM, DMARC and SPF, etc. If you’re willing to go that route, then Mail-in-a-box is a good way to do it. There are some other options here that you can look at too - https://github.com/awesome-selfhosted/awesome-selfhosted#communication---email---complete-solutions

        If you happen to successfully run your own mail server, please do report back and tell us your experience.

  • purplemonkeymad@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 days ago

    I moved away for self hosting email, but my advice would be to look at anti spam providers. Most can act as both an incoming and outgoing filter for your emails, and will hold on to email if your mailbox host is down. It also means for outgoing you don’t need to warm up an IP to have your messages accepted.

    Of course you still need to setup SPF/dmarc/etc but it takes out some of the fuzzier parts of email deliverablity…

  • dihutenosa@piefed.social
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    I self-host it with https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.

    • I had to set it up with all these SPF and DKIM and DMARC stuff. Wasn’t too hard, just follow the guide. Test with GMail - the message details view says exactly what you have, what you haven’t, and what’s wrong.
    • Every now and then I have to jump through some hoops to get my IP allowlisted in some weird provider or antispam system.

    Email is a very old protocol, it originates from the time when computers were connected only occasionally. It is very much possible to come an agreement to power up the antennas at something o’clock every day to exchange emails, and the rest of the time they just sit in the queue.

    Practically speaking, if your home lab is down for something like 12h, it should not impact email delivery much at all - the sending servers would just keep retrying. Usually for 48h. From https://www.rfc-editor.org/rfc/rfc5321#section-4.5.4.1

    mail that cannot be transmitted immediately MUST be queued and periodically retried by the sender.

    The sender MUST delay retrying a particular destination after one attempt has failed.

    Retries continue until the message is transmitted or the sender gives up; the give-up time generally needs to be at least 4-5 days.

    Microsoft documents this: https://learn.microsoft.com/en-us/defender-office-365/mail-flow-about#mail-flow-delivery-faq

    Deferred messages remain in our queues for one day.

    I guess technically they’re RFC-compliant, but 1 day is not as much as I’d like…

      • dihutenosa@piefed.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 days ago

        No idea. I keep hearing the term, “IP reputation”, but I don’t know any official registry where I could look up mine.

        • I can deliver to GMail, because I set up SPF, DKIM, DMARC, and that special GMail-only TXT record in DNS: "google-site-verification=<base64-or-what>"
        • I can deliver to Outlook, because I registered by IP in https://check.spamhaus.org/
        • Every now and then, I encounter a new, weird and wonderful kind of spam protection, and I have to figure out how to get my IP listed in the “known legit email servers”

        All told, I can deliver email, AFAICT. If it lands in spam, well, tough luck - email from large providers also does.

  • lsjw96kxs@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    7 days ago

    Mail is a piece of software I won’t bother self-hosting. I already tried, put in it a lot of time, trying to get my IP address considered safe because it was banned 15 years before I had it, to only have a third of my mail sent successfully received. It is not worth the effort and I switched to proton and recently to infomaniak.

  • Appoxo@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    6 days ago

    Just a mailbox at IONOS for 1x Business plan and 25 “free” (2gb) mailbox.
    Costs me 7€ per month. And so far almost zero downtime.

  • ABetterTomorrow@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    I’m going back to my KISS mindset.

    I got the Mozilla ThunderMail invite and using ThinderBird for the client. It’s all basic, direct and just works.

      • ABetterTomorrow@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        True…. But to be fair, some of those ended up coming back and getting integrated within their browser and like the Send, that’s in thundermail now.

        Side note, I didn’t know they made a mobile OS and it’s still alive within another fork.

        I think a James Bond title fits Mozilla, “die another day” :P

  • mattof@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    Mailo.com is a privacy friendly email provider in France. As far as I know they do only email.

    Recently they upped the prices a bit, my account is from before that, and payed 60 euro for five years.

  • gopher@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    I run mailcow on a vps on a smaller, reputable, European host. I started out with Hetzner but there I had problems with delivery due to a bad neighbourhood. It really helps with a host that cares and take abuse seriously.

    After moving it’s mostly been good. I don’t have any issues with outgoing mail, all seems to land fine on both gmail/outlook etc. It’s pretty low effort, just need to stay on top of upgrades since there are internet exposed services.

    Here is also a good post about best practice for smaller servers: https://bridge.grumpy-troll.org/2020/07/small-mailserver-bcp/

    I have a filter that encrypts all incoming mail with my pgp public key, for added security (this is not bullet proof as it has to sit after rspamd but should make it harder to read any mails in case of any kinds of breaches).

  • Pissio@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    Docker mail server dms on hetzner , if you set your dns for multiple mx you can have a fallback at home or another dms in a different data center and replicate it with dovecot sync

  • christov@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    7 days ago

    Agree with most folks here, mail is too hard to self host because of the control larger providers hold around acceptance rules. I use zoho for my email, been pretty solid so far though I’m sure there are others. I use nextcloud for contacts, tried using nextcloud for calendar but had trouble getting it to send invites to people so I just use zoho for calendar as well now.

    Off site fallback I sync email, calendar and contacts to multiple machines but I also use back blaze as an off site cloud backup. One day I’ll get around to syncing the emails to my home server and also backing those up to backblaze.

    This is all for personal use though, if I was doing anything enterprise or mission critical I’d just pay another provider to do it who isn’t a vibe coded nonsense factory.

  • 31ank@ani.social
    link
    fedilink
    English
    arrow-up
    75
    ·
    edit-2
    7 days ago

    Mail is something I don’t want to touch. I use mailbox which is hosted in germany for some years now. For calendar & contacts I use the built-in Nextcloud apps, they also work pretty well

    Edit: I self-host Nextcloud, so contacts & calender are on my private server

    • Esjott@feddit.org
      link
      fedilink
      English
      arrow-up
      14
      ·
      7 days ago

      Same here in terms of don’t want to touch mail. I use migadu, swiss company hosting in france. Works flawlessly. There was a good blogpost some time ago comparing mail services, let me check… there it is: Blogpost

      • NanoooK@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        Where did you find where are they hosted? I couldn’t find it on their website last ve looked them up. Too bad they only accept $, I had considered them heavily because I like their mindset regarding inbox/folder.

        I went with Soverin to have unlimited alias included in my plan.

        • Esjott@feddit.org
          link
          fedilink
          English
          arrow-up
          5
          ·
          7 days ago

          https://www.migadu.com/procon/#in-switzerland-but-servers-are-not

          In Switzerland, but servers are not

          This may come as a surprise, but we do not host our servers in Switzerland. Current data centers are located in France. We may in the near future add Swiss data centers too but this is not our priority.

          We find EU privacy laws much more elaborate and restrictive than the Swiss ones. Switzerland used to be famous for banking secrecy, but that has nothing to do with digital data.

    • vogi@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      7 days ago

      Yea, me aswell. Also in the mailbox and am really happy with their service, but don’t they use Open-Xchange? I don’t think its Nextcloud.

      • cron@feddit.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 days ago

        Mailbox uses Open-xchange, but the user most likely has nextcloud selfhosted.