No, that’s it. I am f#*&@-ing done. I went from gmail to tuta to proton. Now I hear something like FastMail. Some say privacy, some say security, but what they never say is corpos gonna corpo.

No, I am done using third party services. This may be a Sisyphus task, but I want to self host a mail server even if 60% of it goes to another person’s spam.

I’ve heard about Dovecot and some other services. While searching YouTube, I came across a defunct channel that still has this old video that gives instructions to selfhost email: https://www.youtube.com/watch?v=9zP7qooM4pY

Cherry on top would be to have as many parts with the GPLv3 license as possible.

Any guidance or instructions would be greatly appreciated. I have a domain name and I am currently hosting a small webpage for fun. Nothing serious.

    • cardfire@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      13 minutes ago

      Besides being bound to their web interface or client apps (no thunderbird) I haven’t found any.

      Some folks have complained about service outages or account locks, which is something I haven’t seen in my year and a half using the company, but nearly universally they are revealed to be free users and not subscribed to any tiers of service.

      My one and only complaint about my experience inside of using Tuta is a fairly restrictive rules system, after growing up with robust platforms like Ms Outlook. But it’s worth a few Euros a month for me to not use Google and to have excellent calendaring that functions on par with Gcal for me.

  • pez34@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 hours ago

    I’ve been running my own email server since around 1996. I go old school with sendmail and dovecot on linux, but sendmail isn’t for beginners…postfix or exim are easier to configure with lots of add-ons available, and others have suggested several other MTAs that are probably just as good. Nowadays its more work to get started with sending emails (w/o getting rejected immediately as spam) since you’ll need to configure DMARC, DKIM, and SPF along with reverse DNS, but not that hard if you’re somewhat technical and willing to learn. The big providers get to set the rules here, and they’re incentivized to make it hard for a self-hoster, because that also makes it harder for spammers. The first few weeks your emails will get directed to spam folders until the providers learn your domain and associated IP address aren’t from a brand new fly-by-night spammer but it’ll taper off, you just gotta keep at it.

    The biggest annoyance and work honestly is on the receiving side, with all the spam filtering work you’ll need to do once your email gets onto the spam lists. The big email providers have entire teams set up for this. You’ll also need to set up your own DNS resolver to use spamhaus and spamcop blacklists (which is what everyone uses because they’re so good), because all the public resolvers (and the shared resolvers at your VPS or cloud provider too) are already hitting them so much they get rate limited. Good news is once you get those blacklists configured correctly that’ll take care of probably 80% of the spam, then a standard open source package like spamassassin or spamprobe normallys gets most of the rest.

    Another reality is that your home residential connection won’t let you send email from their network; this really reduced spam as people’s compromised machines can’t be used to send spam anymore. However, there are providers out there intended for home self-hosters that will route you a static IP that you can configure reverse DNS on and enable outbound port 25 connections. https://getrealip.net/ is one of them, see their guide for self-hosting email here: https://getrealip.net/guides/self-host-email-server/

  • canttakeitwithyou@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 hours ago

    I run my own email server. Of all the services, email is the most complicated and weird and fucked up. It’s hardcore doing it yourself. I’m glad I do, but make sure you have the time and energy to get it all going.

    Do serious research first. Make sure you have time. Make sure you have a good VPS or commercial ISP. Don’t be half assed or it will fail.

  • kalpol@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 hours ago

    So what I did has worked great.

    Life is way easier if you are running something like opnsense as your firewall. Then you have really good spam filtering available at the firewall through e.g. pfblocker.

    I learned Exim. It’s super configurable and stable. I got a VPS and put another instance of pfsense on it with wireguard tunneling back home to my dynamic IP (which pfsense handles via dyndns). The static IP and VPS costs about $5 a month. Exim lives on the home machine and haproxy on the remote VPS handles email receipt and forwarding.

    Only a few problems with the IP when new getting blocked by Google. I had my SPF/DKIM/Dmarc set up and requested unblocking and they did it in several days, and that was all.

    The advantages here are that you can easily update without changing configs, the wg tunnel is stable, and your host remains on your own server, and pfsesne along with spamassassin and the native routing and session tools in Exim kill most spam.

    Some investment up front can really pay off. Oh also you can use ACME on the pfsense instance to handle all your certificates through let’sencrypt automatically.

  • binarynoise@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    I’m using maddy. It bundles everything in one program so you only configure one service and not like 5. I’m using it mostly for receiving mail my infra sends me though.

  • The Stoned Hacker@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    9 hours ago

    As someone who has been self hosting my email for years I have some advice: be wary, this is a difficult service to build well and if you dont then maintenance will be difficult, you risk exposing your data publicly, and your mail won’t be delivered. But if you stick with it you will find it to be incredibly rewarding and not really as much of a hassle as everyone thinks.

    If you want something easy that will get you 90% of the way there and make the remaining 10% easy, I cannot recommend mailinabox or iredmail enough. I used MIAB for the first few years I hosted my own mail server, and it did well enough that I’d recommend it if you just wanna host your own mail. However I would recommend against these all in one solutions if you want to actually control, configure, and understand how your mail server works. I was given the same advice when I started and after a year and a half I was working on replacing MIAB with something I built myself.

    Where I would recommend starting is the ISPmail guide1. This is one of the most comprehensive and well written guides for building a mail server. It does not cover everything, but it will get you a secure and reliable mail server with high deliverability if you keep your domain’s reputation clean. This means making sure your emails arent being blocked and that everything else is adequately secured so that no one blocks your domain; afaik I have only been blocked once when I was first starting out, and I haven’t had any issues since getting off that blocklist. The guide covers DKIM (which require DNSSEC as well), SPF, and DMARC. The guide does not include setting up MTA-STS, Fail2Ban, email auto configuration (i recommend automx2), nor webmail or DAV (i recommend Nextcloud), but none of these things are necessary for having good deliverability or a working mail server.

    If you choose to continue, I wish you well and hope you have fun becoming one of the increasingly few self hsoted mail admins left!


    1. https://workaround.org/

  • ArborNode@lemmy.shutes.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 hours ago

    It can be done! If it helps, I have made some comments on my setup and the discussions around those comments are very helpful.

    I’d personally recommend using Stalwart. I managed to get this done at absolutely no extra cost, even behind double NAT.

  • Reven@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    12 hours ago

    I’ve been hosting my email for about 15 years now. And now it’s used by 7 people as their daily. And yes, there have been some issues. And yes, it’s complicated. But it’s also freeing and fun. If you really want to do it, go ahead and learn the ropes. I’ve never understood the people that say “OMG, you never want to selfhost that!”. I have a VPS, and you really don’t need a beefy VPS at all for a couple of accounts and some aliases.

    VPS is a must (or co-location, but that’s more expensive). Check out VPS providers to see which are tolerant with email and how “clean” their IP reputation is. I have the Postfix+Dovecot stack, but I’m already eyeing Stalwart, because the LTS distro on my server is reaching it’s end-of-life, and if I have to go through the setup again (the switch from dovecot 2.3 to 2.4 is bumpy), I’d rather try something new. Btw, I don’t have an IT background, just been tinkering for a long time.

    So buckle up and start planing.

  • youmaynotknow@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 hours ago

    I’m running stalwart for our church, and its been pretty solid for a while. Minimal maintenance required after correct deployment and DNS records. Of course, if anyone has a more user friendly option, with less or no 'enterprises features behind a paywall, I would love to know about those.

  • ikidd@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    9
    ·
    14 hours ago

    I’ve used Mailcow for years, after a couple decades of bespoke systems I built from scratch. I’m a real fan of the ease of it’s docker containers and update process. It beats maintaining your own stack and I haven’t run into any drawbacks. It’s pretty much what I had before but I don’t have to fit the pieces together whenever there’s a patch on one part.

    Up until recently, I never had a problem sending messages but have had to set up a connector to SMTP2GO for Microsoft domains like live.com/hotmail.com since they’ve suddenly decided, after 25 years of no problems, that they don’t want my server to connect. The connector setup for just those domains was very straightforward.

    The key thing is to make sure you have a healthy DKIM/SPF/DMARC dns setup. Most mailservers won’t care about PTR or they’ll just send a warning in your DMARC reports.

    If you are on a resi IP, it’s highly likely you’ll have to relay all outbound traffic. If you don’t have high volume, SMTP2Go works fine under the free plan.

    90% of the responses you’ll see on this is that you don’t want to host it yourself, probably by a bunch of people that woulnd’t even think to try. Ignore them if you’re determined to do it, it’s entirely possible if you’re willing to learn.

    • alibloke@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 hours ago

      +1 for mailcow. I pay a small amount per month for an l2tp connection with a non residential IP which helps a lot.

  • Theoriginalthon@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    12 hours ago

    Fuck yeah! Right first things first are you prepared to learn new stuff and know how to read documentation?

    If you have never hosted email before I want you to go away and look at these topics before even starting. It will help you understand what’s going on Postfix, dovecot, SMTP, DNS records, SPF,DKIM, dmarc, fail2ban, what an open relay is, let’s encrypt, how to use lets encrypt for mail servers, email blacklists.

    Once you get started setting up a server mxtoolbox.com is going to be your new friend.

    Although I’ve never used it there is a mail server in a box https://github.com/mail-in-a-box/mailinabox which just installs and configures everything.