Hi,

Am evaluating all options for self-hosting my own mailserver. I am probably looking to host it in GCP or AWS, as I don’t want to worry about availability on a really small VM

Would really appreaciate any recommendations from the combined wisdom of this subreddit, on what the most ideal stack to self host would be and any tips to not make any silly security errors.

Would be nice to solve a couple main problems, the main one being, I have older backups in a few different formats, .pst, .olm and .mbox. I want to bring all of these together, in one mail account and have them searchable and syncable to devices.

Is there a mail server that can even import all these formats?

I know email clients can import but I’ve never imported into a server. I’m guessing I could import into a local client then sync to the server somehow?

Did have it so that these mailboxes were imported on one of my PCs in Thunderbird. Oh my god was that awful, the search is absolutely shocking and most of the time, when you need to find an old email you are not at home, sat by the desktop computer.

Am really looking for something with a somewhat decent Web mail interface, I use webmail alot right now. Doesn’t have to be Gmail level smooth, but more than anything I just want search to be good. Fast, presented well and accurate/smart.

Came across AnonAddy Source Code which seems like such an amazing idea that I’ve never come across before, so would love to integrate that into the solution. If anyone is aware of incompatibility between this and certain self host servers would appreaciate the heads up

Not too sure about spam-filters and email AVs. I’m not too clued up on that, obviously I would like to avoid spam and that anonaddy thing might go a long way but if the mail server just has basic rules and sweep features that would be good enough.

Not too worried about the privacy / encryption focus I’ve seen on some self-hosted mailservers. Moving to my own mail server must be somewhat better than what ms/google are harvesting from me data wise at the moment. Even if it is in their cloud.

What is everyone’s experience of these?:

docker-mailserver

iRedMail

Maddy Mail Server

Mailinabox

Mailcow

Mailu

Modoboa

Postal

Also is there any mileage in running the web mail client separately? Do they have better search and UX than any of the built in ones?

cypht
Roundcube

Thanks in advance

  • SilverFoxPurple@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Thanks for this thread, I have exactly the same use-case, but I have not yet had the time to actually research too deep into it so I am unfortunately still relying on Google.

    My partial conclusions:
    - I’ve been using the AnonAddy approach for 20 years now with my own domain, like many others have. You do not actually need a full suite for this, just setup your incoming email on your domain with a wildcard, choose a unique email address for everything you sign up for, and that is it. Sidenote: You’ll be amazed at the confused faces you get when “Joe Plumbing Co” requests your email address and you reply "joeplumbing@yourdomain.com".
    - For outgoing mail, just use SMTP2GO on the free tier, it works fine and I’ve never had delivery problems. Ignore everyone that talks about IP reputation making it impossible to self-host, while it is true, there are several suppliers with a free tier or a very low cost that take care of this for you. I use it nowadays with Thunderbird because for some reason I was unable to properly use custom aliases with the Google SMTP server.
    - For incoming mail, you will probably need a better plan than self-hosting. Your server needs to be up 24/7 or you will end up losing email, so it is probably better to have a cloud-based incoming server that holds it and forwards to your server when it actually becomes available. I’m still investigating this part but it would seem that Cloudflare Mail Routing should work.

    I have not yet found what the best solution is to the self-hosted archival search problem, please share your findings!

    • Droophoria@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Mailcow works perfectly fine for me. Even helps you get DKIM/Spf and setup dmarc everything working fine, without dropping mail into spam folders. Your mileage may vary but it is very easy if you can follow simple instructions with great documentation.

  • phein4242@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Have a look at mailcow if you’re new to MTA’s. Use that and a (sub)domain to figure out how to set things up. Once youre satisfied with the setup, reconfigure your domain on the new MTA. Use a mailclient with $yourformat and imap support to import your old email.

    And above all, dont be discouraged by the naysayers that think its an impossible task; Its not, but it is complicated to get right bc all the parts involved ;-)

    • Phantasmagoriosa@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Appreciate the straightforward advice here. I think some people have taken it that I have a burning desire to host email for day to day use but seems like you got it.

      Am more looking for something I guess you could describe as an “email archive”. Do you think this is the only way to get what I’m looking for? All these old emails, making them searchable / syncable to different devices with someway of like periodically importing new batches to them?

  • jusepal@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    If you’re going to selfhost anonaddy (or simplelogin, since both are rather similar) then you wouldn’t need to selfhost a full blown mailserver anymore.

    You pick either one, not both. Anonaddy and simplelogin will act as a relay and would forward the mails to somewhere else, usually the mainstream hosted providers gmail, yahoo, proton, tuta etc and those providers will be the one that actually stored the final mail. Relaying to a full blown mailserver hosted yourself would totally negate the point of both anonaddy and simplelogin.

    Most full blown mailserver also can act as anonaddy/simplelogin with their built-in alias manager so it’ll just overlap.

    • Phantasmagoriosa@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Okay, good to know, I did see some of those mailservers mention alias’ing but hard to know what they do/don’t do.
      I think I maybe didn’t do a good job of emphasising in the post but in a sense it’s not actually a mail server I’m looking for. Its more like a place where I can archive and search through my emails historically if that makes sense? Like all emails older than a year that just get “somehow synced” from my mail big provider email to this place

      But it seems that if I want to have that library of emails syncable and searchable across devices, I have to put them within a mail server. Theres nothing which is the equivalent of nextcloud / syncthing for emails you know?

  • Todd1561@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I’ve used iRedMail hosted at home for the last year or so and love it. Even has ActiveSync integration for mobile devices. The key to selfhosting email IMO is to use a SMTP relay service to send outbound mail. I use SMTP2Go and it just works, even free. Everyone’s complaints about blacklists and reputation go away when you use a reliable relay.

  • madumlao@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    the biggest problem with hosting email is that the main way of contacting everyone you need to contact when someone (your provider, client, client’s network admin, partner, vendor, customer, etc) has broken your email service is also email.

  • rad2018@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I don’t trust anyone to host my email for me, esp. cloud service providers where your data could be ANY…WHERE in the World. I trust ‘me, myself, and I’ sandwiched behind 3-4 firewalls.

    I’m also using ‘ciphermail’ for sending/receiving encrypted emails, too for the more ‘sensitive’ material (nothing illegal; just proprietary projects and don’t want Google sniffing around).

    It also helps that I ‘own’ (and I use that term very loosely) my IP addresses, so it kinda helps with reliability and veracity issues.

  • Mean_Interaction2374@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Personally I think poste.io is a great solution. It’s fairly lightweight, easy to set up and has a great interface. I am surprised it’s not mentioned more often.

  • olluz@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I use Proxmox Mail Gateway (as a mail gateway) and I can only recommend that. It keeps spam at nearly zero and it is very lightweight and easy to set up. Plus it gives you flexibility where and how to host the actual mail server.

    Microsoft has blacklisted most IPs so you’ll most probably need to send them a message to whitelist your mail server or gateway once everything is configured correctly.

    If you’re looking for a more than just plain mail check out solutions like Grommunio and Axigen. Some commercial solutions have free versions with minor limitations.

    Importing old emails can be done via the client and not directly at the server. There are good solutions for mail archiving and searching (like Mailstore). I’d use that for mails older than two years.

    While I like to idea of AnonAddy and I understand your reasons, I just don’t think it is worth the hassle. Eventually your “real” email address will somehow end up in spammers list, but a good spam filter, like the one in Proxmox mail gateway will keep your mailbox clean.

    All in all, self hosting a mail server is a bit of work in the beginning, but definitely doable.

    • rad2018@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Agreed. I use Promox with Mailcow/SOGo. Works beautifully.

      And people who think it’s a ‘one and done’ are gravely mistaken. It’s a constant monitor 'n tweak. Spam doesn’t resolve itself… 😉

  • Ziomal12@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I’ve recently started selfhosting email using docker mail server and honestly it’s quite straightforward. I have it on my server at home, all outgoing mail leaves using my home it (and honestly I’m quite impressed because I am behind CGNAT) and incoming mail goes (as the rest of my incoming traffic) through oracle vps via Haproxy (with proxy protocol)

    This might sound complicated but honestly I had vps setup earlier so the “extra work” I had to put in was adding few ports to haproxy config using my existing config as a template (had to add like 2 ports)

  • xenophonf@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I’ve self-hosted my email for over 25 years now and just finished migrating my ancient Postfix+Exchange setup to Mail-in-a-Box. I couldn’t be happier with how well it worked, all things considered. I used good old ExMerge to dump mailboxes to PST files, and then I used Outlook plus CalDav Synchronizer to import everything. The only things that didn’t transfer cleanly were calendars, but the important calendar items for things like birthdays were all recreated when I transferred the contacts over.

  • jippen@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    You certainly can do this, but email is one of the few things I recommend not self hosting. My experience working at a spam filtering company really taught me how bad this can be.

    Here’s some of the reasons why I recommend against it:

    Not getting an important email delivered because it came from a residential IP range and that alone puts you on several anti spam lists.

    Not receiving an important email because some email admins put the blocklists on in both directions.

    Sudden email issues because your IP changed. And now you have to re apply for all the blacklist removals again.

    Internet/power goes offline at home, and some senders aren’t configured to retry.

    Get hit with a joe job attack and get gigabytes per hour of spam permanently, with no real way to stop it.

    You may be sending and receiving too little email to actually remain in the good behavior cache for many spam filters.

    One overeager cronjob or broken script and now you are on even more blacklists.

    Misconfigure your server slightly and you are now a spam relay. Spammers scan the internet regularly for targets. You are not small enough to escape notice.

    In case of house fire, what is your recovery plan? Have you tested it? Can you send “I’m okay” or insurance docs around if this system is permanently offline? How many weeks do you end up with zero email? How about people who depend on you as their provider?