All this new excitement with Lemmy and federation has got me thinking that maybe I should learn to run my own instance. What always comes up though is how email is the orginal federated technology.

I am looking at proxmox and see that is has a built in email server, so now I am wondering if it is time to role my own.

I stopped using gmail a long time ago, and right now I use ProtonMail, but I am super frustrated with the dumb limitation of only having a single account for the app. I get why they do it, and I am willing to pay, but it is pricey and I don’t know if that is my best option. I guess it is worth it since ProtonVPN is included. It looks like they are expanding their suite.

Is it worth it? Can I make it secure? Is it stupid to run it off a local computer on my home network?

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Yes, I still run my own email server. It is not for the faint of heart, but once it’s configured and your IP reputation is clean, it’s mostly smooth sailing. I have not had any deliverability problems to date, initial setup/learning period notwithstanding.

    If you’re not scared away yet, here are some specific challenges you’ll face:

    • SMTP ports are typically blocked by many providers as a spam prevention measure. Hosting on a residential connection is often a complete non-starter and is becoming more difficult on business class connections as well (at least in the US, anyway).
    • If you plan to host in a VPS, good luck getting a clean IPv4 address. Most are on one or more public blacklists and likely several company-specific ones (cough Microsoft cough). I spent about 2 weeks getting my new VPS’s IP reputation cleaned up before I migrated from the old VPS.
    • Uptime: You need to have a reliable hosting solution with minimal power/server/network downtime.
    • Learning Curve: Email is not just one technology; it’s several that work together. So in a very basic email server, you will have Postfix as your MTA, Dovecot as your MDA, some kind of spam detection and filtering (e.g. SpamAssassin), some kind of antivirus to scan messages/attachments (e.g. Clamd), message signing (DKIM), user administration/management, webmail, etc. You’ll need to get all of these configured and operating in harmony.
    • Spam prevention standards: You’ll need to know how to work with DNS and create/manage all of the appropriate records on your domain (MX, SPF, DMARC, DKIM records, etc). All of these are pretty much required in 2023 in order for messages from your server to reach your recipient.
    • Keeping your IP reputation clean: This is an ongoing challenge if you host for a lot of people. It can only take one or two compromised accounts to send a LOT of spam and land your IP/IP block on a blacklist.
    • Keeping up with new standards: When I set my mail server up, DMARC and DKIM weren’t required by most recipient servers. Around 2016, I had to bolt on OpenDKIM to my email stack otherwise my messages ended up in the recipient’s spam folder. -Contingency Plan: One day you may just wake up and decide it’s too much to keep managing your own email server. I’m not there yet, but I’ve already got a plan in place to let a bigger player take over when the time comes.
    • phase_change@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yep. I’ve hosted my own mail server since the early oughts. One additional hurdle I’d add to you list is rDNS. If you can’t get that set up, you’ll have a hard time reaching many mail servers. Besides port blocking, that’s one of the many reason it’s a non-starter on consumer ISP.

      I actually started on a static ISDN line when rDNS wasn’t an issue for running a mail server. Moved to business class dsl, and Ameritech actually delegated rDNS to me for my /29. When I moved to Comcast business, they wouldn’t delegate the rDNS for the IPv4. They did create rDNS entries for me, and they did delegate the rDNS for the IPv6 block. Though the way they deal with the /56 IPv6 block means only the first /64 is useable for rDNS.

      But, everything you list has been things I’ve needed to deal with over the years.

      • Admiral Patrick@dubvee.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Yeah, I totally forgot about reverse DNS. Good catch. I probably left out a few other things what with the repressed trauma of it all. lol.

        I had to deal with Suddenlink business, and they were (somehow) surprisingly worse than what you described for Comcast (I didn’t know that was possible, TBH). Suddenlink wouldn’t even unblock the SMTP ports at all let alone delegate rDNS to our static.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      That was a sobering read. We all feel victorious when we see big tech fail after they wronged their users, but fundamental technologies that actually run the world have already been lost, and may never be recoverable for egalitarian use.

  • Thoms@red.cyberhase.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Just take a look at https://docs.mailcow.email/

    This runs from a small box with everything included. It gives you all the tools and config needed for running a secure and feature rich email service. Webmail, some sort of exchange emulation, webcalender on top of a solid postfix/dovecot install with rspamd as spam filter. Everything is configurable via a nice web UI.

    After 15y running my own mail service and editing a lot of config files, I use this piece of free and open software and find it very good. All you need is a box somewhere in the internet. Running from a homelab will instantly fail, expect you have a static ip.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Neato! There seems to be a lot of solutions for running a mail server.

      Yeah, I think it is time, I need to get familiar with Docker.

      Yeah, I was clueless thinking I could run it from my home. Hah. I just wanted to avoid paying for a VPS. Which is silly because I buy too much crap all the the time and have multiple subscriptions.

      This is actually valauable.

      • Thoms@red.cyberhase.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        mailcow lists a small german vps hoster with a fair price and the right sizing. It’s not a big hoster, gmail and microsoft are not blocking the ip-range and the ASN is not listed on any blacklist.

        The support is quick and helpful, rDNS was a matter of minutes to set up. You don’t need any deeper knowlegde of docker, since it is a one-time job to set the things up und get the stack running. The documentation of mailcow is very good.

        You can run it from home, but you will need a forward host like sendgrid and maybe a backup mx. You can set a primary ip and a backup ip wich will get all the mails when the primary host is down. I guess, there a comercial or free backup-mx services out there. No problem. If you have a static ip for your homelab or at least a dynamic dns-name, it will work. Recieving is easy. But you will need a good forward-service for sending.

  • thekernel@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Not worth the hassle - best compromise is to get your own domain but use a provider like fastmail to host it.

    If they turn sour you can move your domain to another mail host.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I think this is the solution I was thinking about in the first place. I was just musing about it being part of a home lab. I have to consider whether this solution is is better than just paying for secure email.

      • thekernel@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        There are advantages to having your own domain - you can use something like [email protected] so each site you sign up to gets their own unique “to” address, that way you can easily send their mail to trash when you dont’ need to deal with them anymore, and will also let you know what company had a data breach if that unique email address starts to get spam.

        • DidacticDumbass@lemmy.oneOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          This is what I want! I want that granular control of having an email address compartmentalized for specific kinds of communication. I mean, I know it is something provided by basically all email providers, but I don’t know, for sure there are limitations. A unique address for each website seems like such a smart thing to do, on top of being stingy with giving out my email address.

          • timbuck2themoon@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Protonmail at certain levels gives you simple login with unlimited aliases. Something to look into. I love it and have been with them for years.

  • sunbeam60@lemmy.one
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Despite my willingness to self-host almost everything, e-mail remains the last frontier for me. Keeping abreast of standards, keeping up today, avoiding implications in abuse and many, many smaller issues abound … and that’s despite my fixed IP and ISP willing to set up a reverse-DNS for me.

    Instead I’ve gone with a paid email provider that I’m REALLY happy with.

  • FluffyPotato@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I used to run my own mail server about 2 years ago but unfortunately the spam got so bad I didn’t have the time to manage all the filters. I moved over to ProtonMail since I can still use my own domain there. So I guess I would say it’s not really worth it also it really sucks if your power is out and not having access to sent your power company a strongly worded email.

  • njaard@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Yes, and I love it.

    I use mailjet as a proxy on outgoing emails so that I get fewer of my sent messages rejected, which works.

    It was a pain to setup but it’s treating me very well.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Neato! I was so concerned about the logistics of sending and receiving emails, it never occurred to me that I could get fancy and make nice looking emails. All I use is text, yet I can do so much better.

      • njaard@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        No, I only write plain text emails, mailjet only has ip addresses that are generally not blocked by the big providers and they do all the DCIM stuff.

        • DidacticDumbass@lemmy.oneOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I get that, I will definitely need to choose a service that helps to not get sending blocked. Still, I was amused that templates were such a big selling point.

  • Number1@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I use Cloudflares email routing.

    Point my domains name servers to Cloudflares and enable email routing. I can then create any email address in that domain and have it forward to any of my email addresses. Works great when signing up for accounts. The only thing you can’t do is fire off email FROM said email address

    Edit: can to can’t

  • Thewanderer@lemmy.one
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’m using openbsd with dovcot, opensmtpd on a pi. I used mailhardener to get it scoring well. I’ve had no issues with it getting flagged.

  • leopardboy@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I used to run my own mail server many, many years ago (early 2000s), but today it’s a lot more difficult. I personally don’t think it’s worth it, but I do have my own domain that I can host anywhere I choose. At the moment, I’m using Fastmail. Lots of nice features, and no complaints.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Yeah, I think getting my own domain is the first step I have never taken. Closest thing to web development I have done is a Neocities I have not messed with since getting an account.

      • leopardboy@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        You definitely don’t need to worry about a web site if you want to just use the domain for email.

        Feel free to hit me up if you have any questions about it. Some providers make it pretty easy I think to setup and manage all of that together, while others require some manual work on your part.

        • DidacticDumbass@lemmy.oneOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Thank you for the offer! There seems to be a lot of packages that automate all the hard stuff, so I think the hardest part is actually getting my own domain and paying for a remote server.

          Any suggestions on that?

    • styraco@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Aren’t you afraid about some important email getting discarded without you knowing about it? Or about unnoticed downtime which results in missed mails?

  • Sascamooch@lemmy.sascamooch.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    As much as I enjoy self hosting my own services, email just seems like more trouble than it’s worth. I let Protonmail take care of that for me.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yeah. I am getting great suggestions, but also a lot of hard truths. I think a basic paid email is probably less than I would ever pay to get the setup right.

  • Tempiz@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Nope. It can’t really be self hosted anymore, as having a residential IP is a straight track to the spam folder. It can be done if you also pay for a mail relay service, but then what’s the point of self hosting when you need to rely on a cloud service anyways.

    • DidacticDumbass@lemmy.oneOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Could you share you solution? You don’t have to! I am just curious how you do it since a lot of people seem to hate it, compared to self-hosting everything else.

      • anders@rytter.me
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        @DidacticDumbass But yeah you’re right. It’s a mess nowadays with email hosting because Google for example just rejects everything except the other big services even if you comply with DKIM etc. Fuck them honestly