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.

  • Hosted in the Barn@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    well I came here to tell you to not even bother trying after my last experiences with trying to get email delivered from my own server - but having read some of the comments in here, I may just be inspired enough to try again myself…

  • grepe@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 days ago

    good luck.

    i tried that many years ago and it is lot of work and it sucks. your important emails will get blocked on recipient servers for all kinds of reasons and their emails will end up in your spam folders… and that was before the gmail, outlook and yahoo (that host most of the addresses with which you might want to interact) went full mafia and started inventing all kinds of non-stamdard rules to block smaller providers out and changing them at random.

    i admire your intention and optimism but hosting is hard.

  • irotsoma@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 days ago

    First get a VPS and an IP address and validate the IP address is either not on black lists, or more likely, start the process of removing it from blacklists. You can find blacklist checkers, just search “SMTP Blacklist Checker”.

    Then while that’s in progress you can start setting things up. I really found Mailcow to be the easiest and most robust since I wanted OIDC integration. It’s not the best integration and takes a little setup, but it works reliably these days to generate mailboxes and set passwords. You have to include the hashed passwords in your OIDC configuration to get the mailbox passwords set automatically. The web UI does integrate with the OIDC provider though. Mailcow comes with fail2ban and helps set up DKIM and other security settings on your DNS records for proper validation by the receiving SMTP servers and all of that. And has built in spam filtering and virus scanning, though I think virus scanning is not worth the resources it requires since it’s pretty easy to just never open attachments unless you were expecting them. Hopefully most of us know that. So, while it’s tedious, it’s not too difficult if you follow the instructions.

    The only issue that I still keep gmail around for is that some companies, especially financial or healthcare companies, will refuse to send email to domains they haven’t white listed and mostly they only white list the big ones webmail sites like gmail or proton or outlook, etc. Not much you can do about that usually since they have a misguided belief that those domains are somehow more secure, even though they are actually selling your mail metadata and sometimes actual content or at least feeding it into AI models which can leak personal information “unintentionally”.

    Overall, though, it’s well worth it since I can store as much as I want or at least it’s cheaper storage space than webmail providers. And I prefer the maildir storage over database storage in newer systems since it’s really easy to split and archive data to cheaper storage space. So mailcow works for my needs.

  • pez34@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 days 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/

  • ArborNode@lemmy.shutes.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 days 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.

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

    Shout-out to stalwart since none have mentioned it and afaik is the most modern solution. Not sure if it’s fully compatible with delta.chat which would be certainly a huge plus!! Mail and instant messenger all in one 🤯

  • ikidd@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days 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.

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

    As someone who used to manage a mail server, I would not do it ever again. Well, Installing and configuring them IS the fun part. Managing them, making sure the domain is not blacklisted, checking spamhaus, getting asked why I don’t reply their email while it was google who dump the email to the spam folder was not fun.

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

    A trick I discovered this month. Use the smtp_address_preference flag on postfix to send over IPv6.

    If you run your home IP address through the blocklist check on MX Toolbox, you’ll find that almost every home (CPE) IPv4 block is blacklisted. It’s simply not the case for IPv6, and all the big players accept mail over v6.

    Apart from that, just make sure to jump through the TLS, DKIM, SPF hoops so other servers don’t reject you. The MX toolbox free stuff has enough to test and verify that it’s right.

    I don’t bother with traditional spam filtering. The SPF/DKIM checks catches enough of it.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    9 hours ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    IMAP Internet Message Access Protocol for email
    ISP Internet Service Provider
    IoT Internet of Things for device controllers
    LTS Long Term Support software version
    NAT Network Address Translation
    POP3 Post Office Protocol v3, for email; contrast IMAP
    SMTP Simple Mail Transfer Protocol
    TLS Transport Layer Security, supersedes SSL
    VPN Virtual Private Network
    VPS Virtual Private Server (opposed to shared hosting)

    11 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

    [Thread #176 for this comm, first seen 22nd Nov 2026, 00:10] [FAQ] [Full list] [Contact] [Source code]