19 ms·
How to run your own mail server (2017)
- joshmn 7y agoAlways nice to see this posted. Previously discussed in 2017: https://news.ycombinator.com/item?id=16238937 https://news.ycombinator.com/item?id=16238937
- marpstar 7y agoThis topic (though not always this particular article) seems to come up on HN every 6-9 months, and the discussion is ALWAYS the same: "Yeah, you can, but you'll have to deal with X, Y, and Z. Probably not worth it for most people but interesting to know that you can."
- benbristow 7y agoAlternatively pay for a GSuite account for like £3 a month (Or Office 365) and all of this is handled for you with superior spam filtering, search, webmail, no manual administration and no issues with email delivery due to other filters thinking your server is a bit dodgy. It's too much effort to run your own email server well.
- Naac 7y agoBut the very first comment of the article explains exactly why one might want to do this as an alternative to gmail: >> Getting off GMail is one of the best ways to take back your data in the face of dragnet surveillance.
- q3k 7y agoOf even better, use some smaller alternative that is not Google (mailbox.org, protonmail, fastmail, ...). GMail's de-facto monopoly on email (and especially spam filtering) is a threat to the Internet.
- frabert 7y agoIf you don't need IMAP/POP3 access and can live with just the webmail and native apps, Tutanota is great and costs almost nothing
- derrick_jensen 7y agoI'd recommend Rackspace. $3 per user per month, and allowed me to bring my own domain. Haven't had any issues after setting everything up. I tried registering this domain through G Suite and Zoho first, but they both said my domain had a TLD that's commonly used by spammers, and refused to bind it. Zoho eventually made an exception but took over a week for them to get back to me.
- q3k 7y agoHuh, that's the first time I hear of rejection due to a TLD. What is it?
- Boulth 7y agoI guess that would be .tk
- q3k 7y agoOh. Right.
- derrick_jensen 7y agoIt was a .ml domain, wanted to have a play on .ai
- gumby 7y agoSome of us don't use google. Plus you have to use a web browser. I use a variety of clients as Dovecot is standards-compliant unlike gmail. Also I run things over my mail database as I have direct access to it. I'm sure there are some people for whom google is an acceptable option. But it isn't for everyone.
- benbristow 7y agoLife must be hard to not use Google. Too many good services. Search, Mail, Photos, Translate, YouTube, Maps, Drive, Calendar, Docs, News etc. etc. What do you replace them with? In experience Google is usually the best or not far from the best.
- gumby 7y agoIt’s not hard at all, and in fact is Typically easier. Google has degraded search to the point where it rarely gives me a useful result; instead the primary results are ads and “boxes”, so switching to ddg was a pleasure. tools like mail and photo aren’t as fast or convenient as local apps; with local data I can switch from app to app. Yes Apple Maps isn’t as good as google maps, but in some ways is better. I watch the odd YouTube video in private mode but if I watch three videos a month it’s a lot so if it went away I doubt I’d notice. and docs...blech, where to start. I still get new documents from companies I left long ago. The editing tools are primitive. I know people talk about Apple having a “walled garden” but really for me it’s google that has one, now with a shitty web based interface.
- adam12 7y agoI think you might be missing the point.
- blowski 7y agoThe obvious rebuttal here is that not everyone is comfortable having a Google or Microsoft account, or having Google and Microsoft scanning their emails. In that case, Fastmail is a good alternative. It’s not quite as good as Gmail on security and anti-spam, but it’s much better on privacy.
- couchand 7y agoCan you clarify what you mean by "security"? I've found Fastmail's spam filtering to be quite excellent: very few false positives (usually just non-spam marketing messages) and almost no false negatives.
- blowski 7y agoSecurity - I think Fastmail is pretty good at security, but I don't think there's another firm on the planet that does as well at security as Google. Specifically, I found Fastmail's implementation of 2FA to be a bit lacking. I imagine that a determined attacker would find it easier to abuse their support processes, since Fastmail's support is quite helpful whereas Google barely even responds. Spam filtering - I have both Gmail and Fastmail. I'd score Gmail 10/10 on spam preventing, and Fastmail at 8/10.
- brongondwana 7y agoBy the way - I told our support team that you told them they were quite helpful. They are pleased to hear that feedback :) Seriously though, we have been making as much effort as possible to push the account recovery away from being an "agent decides" to following an automated process. We famously got this wrong once many years ago, and have learned from that! So the fact that our lovely support people are very helpful once they have identified a person does not mean they are pushovers for an attacker.
- blowski 7y agoThey genuinely are very helpful. I always get the feeling I'm speaking to a human being that knows enough technology to answer my questions, and has the empathy to try to understand my problem. I remember on one occasion needing to extract billing info from a number of different accounts that were under one master account. The support explained there was no native solution, but helped me come up with a workaround. That kind of support is sadly missing from a lot of vendors.
- curiousgal 7y agoGsuite is at $6 per month.
- benbristow 7y agoI pay about £3.50 or so.
- daffy 7y agoposteo.de is 1 euro/month
- benbristow 7y agoLooks good but doesn't seem to offer custom domain support
- adontz 7y agoAlways wonder if any of these guides will ever include decent web-mail?
- q3k 7y agoRoundcube is _acceptable_ and easy to set up (it's just a PHP web app that acts as a full-fledged MUA and connects via IMAP to your MDA, no different than any other mail client).
- breakall 7y agoRoundcube has come a long way, and they just released a huge update with a responsive design that works great on desktop and mobile!
- pharrington 7y agoWriting one yourself is it's own fun project!
- q3k 7y agoFun is a very curious way of putting it, considering how batshit crazy IMAP is. The rest of the involved email standards are also a huge dumpster fire. I'll let Ricardo Signes do the talking: https://www.youtube.com/watch?v=JENdgiAPD6c https://www.youtube.com/watch?v=JENdgiAPD6c
- pharrington 7y agoI wrote a webmail client (I've apparently long since lost most of the code) to go along with a personal email server I was running about 12 years ago, so it's entirely possible I was just speaking for myself.
- aidenn0 7y agoIf you are going to write your own webmail, use dovecot for your mail-server and then target the maildir store rather than IMAP. You will be much happier.
- 7y ago
- Naac 7y ago2017 should be added to the title.
- breakall 7y agoShould you host your own email server? Yes! It’s a really fun learning project. There are tons of resources out there to make it do-able, so go for it!
- jjirsa 7y agoEVERYONE did this for decades. Then EVERYONE stopped because it's awful. Modern ISPs don't like SMTP floating around, (DKIM, DMARC, SPF) are a pain to maintain over time, exploits will happen, and your free off-the-shelf virus and spam filters suck compared to the big companies seeing billions of messages per day.
- twobat 7y agoMost ISP don't care about it. But there are certain enterprises that know almost nothing about email, they employ "specialized tools" that scan and classify incoming email (read Symantec whatever) and make evereyone's lives harder.
- jjirsa 7y agoIt's not that they dont know or don't care - it's that not being super aggressive with filtering caused people to almost abandon email a decade ago because spam became unbearable for most people. Those "specialized tools" make email viable. Without it, everyone would be spoofing everything and you wouldn't use email anymore.
- twobat 7y agoAt my last place of work one could send as ceo@company. Still, they had crazy (proprietary) filtering. People make things better by accident, in the mean time they tick check boxes.
- big_chungus 7y agoI once got a nasty-gram from my ISP for running a mail server out of my house. Exceptionally low-traffic; two to three messages per week max.
- pixelHD 7y agoI had my own mail server running for close to a year after which i gave up because i started seeing issues delivering mail to gmail and apple mail accounts. I had to keep tinkering with the DKIM/DMARC/SPF entries to make sure i'm compliant with gmail/outlook/etc. At somepoint i gave up because it wasn't worth the investment of time. FWIW, i used mail cow [0], which was a delight to setup and use. And it comes bundled with a decent-ish material design webclient. I would love to go back to hosting my own mail server though. As of now, i shut it down, and use gsuite. [0]: https://mailcow.email/ https://mailcow.email/
- Naac 7y agoA ( somewhat ) happy medium between hosting your own email ( and dealing with getting IP blocked ) and fully entrusting youtself to Google is to use webmail as provided by your domain name registrar. For example, gandi.net provides web mail on your own domain. Even, better, it has support for wildcard email just like google does.
- starbugs 7y agogandi.net doesn't support external domains. I'd be thankful for any recommendations that aren't totally overpriced and allow for external domains.
- deleted 7y ago[deleted]
- cosmojg 7y agoPersonally, I use Migadu[1] for sending and receiving mail with my own domain. I've yet to find anything that provides more bang for my buck. [1] https://www.migadu.com/en/index.html https://www.migadu.com/en/index.html
- kej 7y agoThanks for this; pricing tiers based on outgoing email volume instead of number of domains or mailboxes is perfect for a lot of situations.
- lioeters 7y agoI second your recommendation of Migadu. Earlier this year, I had to move a number of email accounts (my own, family, friends, clients). Based on a fairly extensive comparison of email hosts - with brief stints trying self-hosting as well as Zoho - I migrated to Migadu and have been very happy with their service. Their pricing is clear, structured well to suit my needs, and the service has been reliable.
- cyphar 7y agoMailbox.org is fairly cheap (a few euros a month) and it supports custom domains. It also has some neat features like auto-encrypting all incoming emails to a given PGP key (while not perfect it makes all of your emails more private in storage and makes it harder for a compromise to result in past private information from being stolen -- though of course Mailbox.org could in theory just keep the original messages around). They're also based in Germany.
- thrownaway954 7y agoIf you're running Windows, you can download SmarterMail. It's free for 10 mailboxes. Has mail, calendar, collaboration and a slew of more stuff. https://www.smartertools.com/smartermail/downloads https://www.smartertools.com/smartermail/downloads https://www.smartertools.com/smartermail/business-email-server https://www.smartertools.com/smartermail/business-email-serv...
- jaywalk 7y agoWow, that takes me back. I remember setting up and using all three of the SmarterTools products 15+ years ago. They were fantastic.
- xwdv 7y agoAlthough you can run your own mail server, it’s a bit like rolling your own crypto.
- megous 7y agoIt really is not. At most it can be tedious, because it has large surface area of protocols and formats. Most of them other than SMTP and message format are optional. Minimal mail system involves just postfix with config in a bunch of files, delivering mail to a folder on the server, and pretty much everything on top, like SPF,DKIM,DMARC,... is optional. You can ssh to your server from anywhere and run mutt there, or install a webmail if you're into web stuff. That's pretty much all that's needed for a basic thing. Security wise, there's not much to do wrong in this setup. Mail server is open for reception by default as it should be and submission is only allowed from localhost. Webmail can be protected via HTTP auth and ssl. As long as your password is secure, noone will get there that way. Rolling your own crypto is a much bigger can of worms.
- magashna 7y agoConfirming your emails are getting through to providers like gmail is the hard part
- shirro 7y agoYou can configure your dmarc so the big mail systems all provide you with reports on delivery failures. I get lots of them when I reply to a mailing list that doesn't deal with spf or dkim sensibly.
- megous 7y agoIt's not the hard part, it's simply impossible to ensure from your side. You can have everytrhing righy, and they'll still block you based on IP address.
- clarry 7y ago> Minimal mail system involves just postfix with config in a bunch of files Minimal mail system involves just OpenSMTPD with a few lines of config in a single file.
- dpcan 7y agoThen you realize the true pain of having a near-zero reputation when trying to email anything to people on Gmail, Yahoo, Live, etc, etc. Expect to go to spam even if you have DKIM, SPF, and no relaying. If anyone actually knows the secret to not having your own mail-server's mail go to spam on these bigger systems, please tell, I've Googled it for years with no success.
- curiousfab 7y agoFor some reason I never had problems, even after a recent change of my IP address because I moved to a new VPS. Hetzner VPS, proper reverse DNS, SPF, that's all, not even DKIM. The only big ISP that doesn't like my mails is AT&T and I couldn't care less (in Europe, rarely have to deal with people @att.net).
- xiaomai 7y agoI also have no issues like this (I do SPF/DMARC but not DKIM)
- jstimpfle 7y agoI just do reverse DNS on a cheap VPS. I believe I don't even have encryption. Almost no problems since I switched to that setup 9 years ago. Some mails to Gmail end up in spam, and just yesterday I had my first "refused due to poor reputation" problem due to an unknown problem with Cloudmark. Have been able to reset my score there by filling an HTML form. Of course, there are some mails where I don't know if they landed in spam or I just didn't get a reply.
- the_angry_angel 7y agoIn that case you are very fortunate. I was running my own mail server for nearly 10 years on Hetzner. Prior to that on other hosts and in the distant past at home. Running mail servers is something I have done professionally and successfully. The last time I moved boxes as I had many times before. I was on clean IP range but I had no IP reputation at all. In the past this wasn’t such a problem, especially with SPF, DKIM, rDNS, DMARC, server-to-server SSL etc. Around the same time I started having to deal with organisations (legal, etc for a death in the family and later rent) rather my my own circle of friends. It became extremely apparent that my mails weren’t hitting the inbox. But they were being accepted. This was extremely problematic. I was in the group stating that running your own mail server isn’t hard. I still say that. The hard problem is convincing the big players to let your low volume domains and IPs hit the inbox. I begrudgingly gave up my MX servers last year.
- scarejunba 7y agoUsed to host my own everything. One day went on holiday, thing went down due to complex sequence of events, got no email. Disaster. From then on, MX'd my shit to aspmx.l.google.com. and called it a day. Any hosted solution is probably better than this.
- sjustinas 7y agoI've been running my own email since about 8 months ago. I have Google's MX (that I used before) on backup (with a lower priority). Will not help me with every sort of fuckup possible, but it will at least deliver the mail if my server is down.
- mlrotter 7y agoI feel like if people are gonna take back email this process needs to be easier; like a single application with a web front-end. Hosting email is a pain! This is why everyone seems to outsource their email hosting. Read the comments in the 2017 discussion. Favorite quote: "I run my own mail infrastructure. To say the least I wouldn't recommend it even to my worst enemies. It's horrible." https://news.ycombinator.com/item?id=16238937 https://news.ycombinator.com/item?id=16238937
- AWildC182 7y agoIf that's what you want, look at fastmail or protonmail...
- justusthane 7y agoThis is a kind of interesting product in that arena: https://thehelm.com/ https://thehelm.com/ It's sort of a managed server that lives in your home. I'm not sure whether that's actually better than having your data out in the cloud or whether it's more on the security theater end of the spectrum, but it is interesting.
- black6 7y agoiRedMail rolls everything into a convenient package. The basic tier (no tech support) is free.
- ViViDboarder 7y agoThere are a few tools that offer simplified mail server deployments. iRedMail, MailCow, Mail-in-a-Box, and Cloudron (does more than just mail).
- baroffoos 7y agoI have been running a mailinabox email server for over a year now. You basically just run the install script, tell it your domain name and set the server as the name server for your domain name and its all done. The thing does everything for you including renewing certificates. It then sends you a monthly status email and an email whenever something needs your attention like the certbot renewal failing. So far in the past year the only manual intervention after setting it up was updating it from ubuntu 14 to 18
- clojuremajeur 7y agoHillary Clinton, is that you?
- johnchristopher 7y agoThere's something that isn't really clear to me: Would Google still suspect my mail of being spam If I bring my own domain to Gsuite or rackspace (for instance) ?
- aidenn0 7y agoNot if you use Google's SMTP servers.
- Karunamon 7y agoJudging from some of the experiences upthread, even that isn't enough. Billing messages from google themselves and gsuite-to-gsuite messages getting spammed.
- aidenn0 7y agoAny source can have some fraction their messages treated as spam; I was just saying that if you take a random IP address and set it up as SMTP, you will have trouble getting any messages through, even if DKIM &c. are setup correctly. If you send too few messages, you're untrusted.
- rubyn00bie 7y agoKudos to the author for this, this is an endeavor of madness IMHO... The only thing I've ever failed to setup was a functioning mail server using Postfix and Dovecot (it was like ~2007/8). It was a circle of configuration hell I would wish on no one and since then I've never understood why anyone would want to run their own mail server. Pure, unadulterated, hell... I honestly don't even know why we have email at all it's so shit (obviously I do, but hopefully the sentiment I'm expressing is clear). Granted, if you know how to do it, once it's "running" things mostly work (I've known plenty of people who didn't fail as miserably as I did)... but as others have mentioned actually sending emails and not being labeled as SPAM is almost impossible. Plus, making sure your service is literally ALWAYS available, is really quite tricky. It's pretty damn easy to miss some emails. I keep hoping some other protocol will take off so we can free ourselves from email, but it looks like the chance of that ever happening is probably zero.
- parliament32 7y ago>It was a circle of configuration hell I would wish on no one >actually sending emails and not being labeled as SPAM is almost impossible Anecdotal, but I really didn't have any issues with either of the above. Just don't use a tainted IP (protip: basically every cheap VPS provider's IP space is tainted) and set up SPF/DKIM properly. Following a tutorial is probably the way to go if you're not familiar with Postfix/Dovecot. And as you mentioned, once you have it up and running it's basically zero maintenance. >making sure your service is literally ALWAYS available, is really quite tricky. It's pretty damn easy to miss some emails. Mail standards actually make it really hard to miss emails. Every mail service will, by default, retry delivering mail for 4 days (!). This is the default in MTAs and the big boys (Gmail, etc) do the same. If you want to be more HA you can set up backup MXes but that's overkill for a personal server.
- shirro 7y agoI don't understand people who try and cook 3 star michelin food at home. I would rather buy a kebab. But for any competent pro setting up a mail server is ridiculously easy. After the first few you have a recipe. Changes are incremental and relatively infrequent. It is much easier than keeping up with any programming ecosystem or framework. I don't know that I like some of the deskilling I see. It seems like many people would rather learn a proprietary cloud api or use a prebuilt container than learn the fundamentals of setting up their own services. A personal mail server, tested and refined over decades serves as a template that can be applied to other projects. If I have a web server backend that needs to send emails I have a pre-built and tested low maintenance solution I can deploy very quickly. The main issue people will encounter is that you are at the mercy of a much bigger ecosystem where high volume senders have all the power and your good work implementing best practices is rarely rewarded. In the end your mail delivery is at the mercy of some shody unmaintained commercial abandonware spam solution maintained by someone who failed up and doesn't give a shit and has never read an RFC.
- dddddaviddddd 7y agoI've been doing this for inbound email on my domains, and outbound mail from daemons and system services. I don't think relying on your personal email server for all email is practical (deliverability), but there are good use cases.
- efesak 7y agoThese tutorials are nice but you can just hack https://hub.docker.com/r/analogic/poste.io https://hub.docker.com/r/analogic/poste.io (shameless ad) or any other containerized solution. You will get fully working solution in couple minutes and it will be somewhat easy to keep mailserver updated...
- tacon 7y agoThis. I have been running my own mail server since UUCP bang paths and sendmail. I am slowly preparing to migrate to a containerized solution for exactly this reason. Managing the updates of all the parts going forward is just too heavy a load, while swapping in a new container is easy. The initial configuration is painful, just because there are so many options to decide on, but those decisions are all there anyway, whether you realize them on day one or not. I am planning to use this image[0]. [0] https://hub.docker.com/r/tvial/docker-mailserver/ https://hub.docker.com/r/tvial/docker-mailserver/
- MrCharismatist 7y agoStep 1) Don't. Step 2) Dude, seriously. Don't do this. It not only will drive you crazy, it's getting worse.
- systemfreund 7y agoI'd like to point to another smtp server, which I am using and is much easier to set up than postfix in my opinion, especially for small servers like mine: https://www.opensmtpd.org/ https://www.opensmtpd.org/ I'm running a personal mailserver (opensmptd, dovecot, dkim, spf, dmarc, spamassassin) for some years now and although I initially had problems with deliverability to google there aren't any (apparent) issues so far. Also I don't understand why people keep emphasizing google's spam filter being so much better than anything else. For my personal server SpamAssassin has proved itself to be more than sufficient, its spam filtering performance is on par with Gmail's (I have a Gmail account aswell), at least for me. Of course, Gmails spam filter works better for the billions of accounts they manage, but in order to handle the spam of a tiny mail server I'm probably not the only person who is satisfied with SpamAssassin.
- perlgod 7y agoAuthor here. I actually use OpenSMTPD currently, but I haven't bothered to write a full article about it. Details of my current setup are here: https://github.com/cullum/dank-selfhosted https://github.com/cullum/dank-selfhosted Though this will be out of date soon since I'm moving everything over to Illumos...I have a fondness for dying operating systems I guess!
- pinjiz 7y agoThe key to get high delivery rates to GMail and Office 365 is to setup DMARC. When you have a proper DMARC configuration (and at least SPF) your delivery problems will suddenly go away. Hosting your own mail server is not rocket science, but you need to have solid sysadmin skills and a good understanding of email as a whole. If anyone is interested in doing this: Start simple with only Postfix and Dovecot, don't use a database for username/mailbox configuration as most tutorials suggest (start with text files instead). You can also start with OpenSMTPD and Dovecot if you think that Postfix is too complicated. And if your setup is finally running, make sure to setup proper monitoring (e.g. make sure your mail server is running and answering SMTP connections). You can use free tools like uptimerobot.com for that and get notified before you loose mail.
- garaetjjte 7y agoDMARC is used for reporting and enforcing SPF/DKIM, I doubt it is used by anything as spam/ham signal.
- icelancer 7y agoIt is. Check mail-tester.com for a decent checklist.
- deleted 7y ago[deleted]
- senorjazz 7y ago> Hosting your own mail server is not rocket science, but you need to have solid sysadmin skills and a good understanding of email as a whole. Not really. I had neither and got it up and running. Sure I had some issues, but as long as you have some competence, most things can be sorted out / figured out.
- throwawaymanbot 7y agoWhy is there no mastodon, cept for email?
- sgt 7y agoBeen running my own personal mail server (mostly postfix) for 19 years and 6 months. Low volume, but also extremely few issues.
- chheplo 7y agoI have been using Mail-in-a-Box https://mailinabox.email/ https://mailinabox.email/ successfully for many years now, for both my personal account and my company. The only problem is that occasionally Gmail and Outlook mark my sent email as SPAM to the receiver.
- TMWNN 7y ago>The only problem is that occasionally Gmail and Outlook mark my sent email as SPAM to the receiver. This is exactly the problem people are talking about!
- theonemind 7y agoI've had a relatively trouble-free experience running my own email server for years by just setting up outgoing email to relay through through the gandi SMTP I got with my domain registration. Email providers don't verify the the reputation of what they want to send to very rigorously, so I don't have any problem receiving my mail. It depends on why you want to run an email server, I suppose. I just didn't want google collecting, analyzing, and indefinitely storing my incoming mail (left gmail).
- ram_rar 7y agoHosting email is definitely a pain. You could do all the validations with DKIM , SPF , ARC etc. Its not helpful if the reputation score of the server is low. I have been thinking about this for a while , there should be a way to decouple email server and storage into 2 different services, where I could authorize email server to grab the data from storage. The storage service itself should have zero knowledge encryption. This way, I could just switch between email services.
- nvr219 7y agoFastmail has been better for my emotional well being than self hosting.
- rdevnull 7y agowhy not use https://wildduck.email https://wildduck.email ? I have been using it for years and never had to look back.
- rodrigo975 7y agohttps://poolp.org/posts/2019-08-30/you-should-not-run-your-mail-server-because-mail-is-hard/ https://poolp.org/posts/2019-08-30/you-should-not-run-your-m... My 2 cents.
- sreitshamer 7y agomailinabox ftw. After the first couple of months I've had zero delivery problems.
- mraza007 7y agoI was looking for something like this
- chrisdone 7y agoMy email server (@chrisdone.com) has been running for a year and a half and is written in Haskell, saves all mail into a postgresql database, has a web interface and an Emacs interface. https://github.com/chrisdone/duta https://github.com/chrisdone/duta I redirected my gmail account to forward all emails to this new domain, and changed all my account emails to theservicename@chrisdone.com e.g. for github it’s git@chrisdone.com. Once I’m done, Gmail won’t be receiving any new mail. It has SPF which has captured most spam. I haven’t implemented sending yet. I thought this would be a problem initially, but after a year I’ve realized I rarely send personal email out. But I’ll do it one day just for completeness. I’ve found two bugs of my server, which were easy to debug because mail sending is very robust. I fixed the bug, and the sender server tried again the next day automatically. I did it for exactly the same reasons as the author, to control my own data. I wrote my own because existing open source offferings are silly complicated, but receiving mail is not. Duta is easy to deploy with docker machine and DigitalOcean. My current setup has been deployed like this. It connects to a managed DO Postgres database, which runs separately, has monitoring and backups, so it’s easy to redeploy the mail server without worrying about losing my data.
- Angostura 7y agoI suppose its worth mentioning that there are two kinds of mail server you can run. I've often thought of running my own IMAP server (I like syncing, but I want to retain all my e-mails and not worry about quotas). As for SMTP - I'm happy for my ISP to handle that.
- raimue 7y agoOne thing that would still be missing is SRS [1], in case you want to forward mails to an email address handled by a different mail server. Your mail server must not use the original from address in the envelope from, as that would very likely trigger SPF record checks at the receiving end. When forwarding mails, it is therefore strictly necessary to rewrite the envelope from address with SRS. For this postfix setup, postsrsd [2] can be used to implement SRS with only a few more configuration options. [1] https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme [2] https://github.com/roehling/postsrsd https://github.com/roehling/postsrsd
- gerdesj 7y agoGreat write up. I will almost certainly learn something from it in review. I have run my own company email for around 20 years and other people's for over 30. I'm in the UK. No matter how technically competent your setup, if your IP is blacklisted by one of the big lists eg Spamhaus then you are screwed. So you need to avoid that. Avoidance tactics involve properly configured MX, A and PTR DNS records. Then you'll need a proper SPF TXT record. Can you do DKIM? DMARC? Oh and please avoid sending spam to people - it ticks them off and get's you blacklisted.
- jolmg 7y agoIn the diagram, the program that connects via IMAP to the MDA can also be a standalone MRA[1]. With a standalone MRA, the MUA doesn't need to know the protocol used by the MDA. It just reads the mail from a local mailbox (using formats like Maildir or mbox) where the MRA wrote it. Does anyone know if there are MTAs that can pickup mail from a local directory to send out and MUAs that don't need to use SMTP to send out mail, but have the support to rather just write it to a directory? I was wondering if the sending of email could also be handled by a standalone program separate from the MUA like it can be done with the receiving of mail. [1] https://en.wikipedia.org/wiki/Mail_retrieval_agent https://en.wikipedia.org/wiki/Mail_retrieval_agent
- dev_dull 7y agoBefore you get too far down this rabbit hole (like I did) for a home mail server, make sure that your ISP supports inbound/outbound mail traffic. Mine blocks it permanently, and I've been unsuccessful at getting it changed. In fact, I can't even get the tech support people to understand the traffic is blocked before it reaches my house and it's not a "firewall" thing.
- kuczmama 7y agoI wrote about this back in October 2017, it talks about setting up mailcow. I think it's far simpler than this article. https://blog.mkucz.com/2017/10/how-to-host-your-own-email-server.html https://blog.mkucz.com/2017/10/how-to-host-your-own-email-se...
- jacobsenscott 7y agoOfflineimap + mu + mu4e is my current setup. I use gmail, but pull it all down with offlineimap. So it is all backed up even if I lose access to google. MU indexes your mail and gives you very fast search - much better than gmail's search. And mu4e lets you read your email in emacs.
- linsomniac 7y agoDoes anyone use Hashcash? I haven't run my own personal mail server in 5+ years, but I used to feel like Hashcash really helped keep my messages out of spam folders. It seems like SpamAssassin is really the only filter that implements it, and I don't know how prevalent that is today. But I used to spend 10-60 seconds computing a hashcash on every outgoing message that left my server, and has basically no problem with getting caught as spam. But I also had a domain and IP address with like 20 years reputation behind it...
- OrgNet 7y agoprobably should switch to something like Matrix instead...
- georgeoliver 7y ago> "Getting off GMail is one of the best ways to take back your data in the face of dragnet surveillance." Is running your own mail server one of the best ways to get off GMail?
- akulbe 7y agoRule #1 of hosting your own mail server: Don't do it.
- jakeogh 7y agoI exited gmail a few days before the "hey lets read your mail and generate ads" took effect. It would great if someone someone else decided to use it and fix it up for their use case: https://github.com/jakeogh/gpgmda https://github.com/jakeogh/gpgmda https://github.com/jakeogh/gpgmda-client https://github.com/jakeogh/gpgmda-client Alot and xapian are awesome. Anyone from github: please check #439658 and let me gen the cookie via ssh. I didnt enable 2FA.
- poolpOrg 7y agoHello, Main developer from the OpenSMTPD project here. I also wrote an article a few weeks ago about running your own mail server which is located here: https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-with-opensmtpd-dovecot-and-rspamd/#begintech https://poolp.org/posts/2019-09-14/setting-up-a-mail-server-...
- n3storm 7y agoEvery now and then this comes out. I would like this to be true (really) and it can be true only if only you are the only mail system user. As soon as you give an email account to a non techie and non email politeness aware user you are doomed. Like your windowsxp user mum with a compromised outlook express sending crap to full addressbook. Your friend is sending last penis graphic joke to their (gmail/msn) friends. Dad has used email to register to many dark sites and now all *@yourdomain.com receive viagra offers and they ask you to stop receiving that. Girlfriend is trying to send a 1GB video to her workmates. But then, one user mail system does worth the effort?
- deleted 7y ago[deleted]