Selfhosted email "server" on TrueNAS? reddit / selfhosted ---------------------------------------------------------------------- nefarious_bumpps · 2023-10-14 03:09 IDK if this is possible. But I'd like use a TrueNAS Scale server to manage email for up to 5 users, where the users can use their Outlook, iMail or Thunderbird client or a NAS-hosted webmail client, but send/receive email (using POP3/SMTP) through an email hosting service. I'm currently using a Microsoft M365 Family Plan to host my custom domain, but I'm looking at other options (i.e., Fastmail and Zoho). I can't send outgoing SMTP directly to outside recipients because my dynamic, ISP-assigned IP address would be black-listed by most organizations. My purpose is to reduce my reliance on cloud services. If I can have my own domain and email server, even though it sends and receives through a cloud email provider, I can relatively easily change email providers without changing my actual email address (everything gets sent to/from [user@mydomain.org](mailto:user@mydomain.org) and all messages and attachments stored locally on the NAS). Any thoughts? ---------------------------------------------------------------------- mrpeenut24 · 2023-10-14 04:18 You can certainly build a VM which hosts postfix and dovecot, for SMTP and IMAP. You don't need to run IMAP/POP3 through a 3rd party, you can have the mail delivered direct to your server. You can also setup a VPS for a few bucks a month to use as an outgoing SMTP server. ---------------------------------------------------------------------- s_91 · 2023-10-14 09:50 I'm using [maddy](https://github.com/foxcpp/maddy) hosted on a VPS via docker. Works very well for me. Low memory usage, and I use [Mailspring](https://github.com/Foundry376/Mailspring) as the client. ---------------------------------------------------------------------- phein4242 · 2023-10-14 10:12 The most simple solution is to get a domain and a vps, and run something like mailcow on there. ---------------------------------------------------------------------- nefarious_bumpps · 2023-10-14 23:18 I was thinking that most of the commercial email providers have pretty good spam filtering, so running incoming email through them would save me the effort and expense of doing it myself. Does that make sense? ---------------------------------------------------------------------- nefarious_bumpps · 2023-10-14 23:22 Lol. About 100 years ago (it seems) I ran my own Microsoft Exchange server. Until all the major providers blacklisted residential IP's and the ISP's themselves blocked port 25. It required a lot of care and feeding. ---------------------------------------------------------------------- mrpeenut24 · 2023-10-14 23:41 It does. Though SpamAssassin isn't tough to setup, and works well enough for me. One thing I love about self-hosting postfix, I can add any email address I want in a matter of minutes. I setup one for each site I sign up for, and if I ever see it used for spammy purposes, I just delete the email address and change it on the site I signed up with if I still need to use it. ---------------------------------------------------------------------- watchdog_timer · 2023-10-15 16:15 I set up my filter to accept anything that matches a specific regex (e.g "([a-z]+)xyz@example.com"). Then, anytime I need to create an email address, I replace the generic characters with the domain name associated with the account or web site (e.g. "redditxyz@example.com"). This allows me to have a unique, memorable address for each service I use; allows me to track when an address is compromised; doesn't get filtered out by services that don't allow a "+" in the email address (which is another [common method](https://www.cs.rutgers.edu/~watrous/plus-signs-in-email- addresses.html) of tagging email addresses); and doesn't require creating a new address filter every time I need one ---------------------------------------------------------------------- mrpeenut24 · 2023-10-15 16:25 I'm not understanding. If you have the regex filter, why would you need to add the unique domain name? And if you delete the unique domain name if it's being used for spam, wouldn't the regex filter still allow the mail to get through? Or do you add a block for that email once it's compromised? ---------------------------------------------------------------------- watchdog_timer · 2023-10-16 13:33 The "*xyz@example.com" regex is the penultimate rule in our filter. Anything that matches it is allowed. The rule after it sends everything to junk. This takes care of junk emails sent to "admin@example.com", "office@example.com", etc. If a domain has been compromised or starts sending us too much junk mail, I put it in a rule before the regex rule to block it. This is rarely necessary, but it has occurred. I once had to provide an email address to a county government in order to get payment for a product we provided them. A couple of months later, we started getting phishing emails sent to that address from spammers who apparently had compromised their system.