Live data from Hacker News

How to run your own mail server (2017)

c0ffee.net

171–180 of 270 posts

Re: How to run your own mail server (2017)

#171
post #22

Then 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.

I have the same problem. I've been running my own mail server since 2000, and last year my sister's account started being used to send spam (I assume she reused her email credentials in another site that got hacked, and spammers used the credentials to authenticate as her in my SMTP server to send spam).

Google shows that my domain has a bad reputation, but I can't fix it because it doesn't have enough traffic. https://www.mail-tester.com gives me a 10/10 (I have DKIM, DMARC, SPF, everything), but my email still gets flagged as spam by Google.

Re: How to run your own mail server (2017)

#172
One 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

[2] https://github.com/roehling/postsrsd

Re: How to run your own mail server (2017)

#173
Great 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.

Re: How to run your own mail server (2017)

#174
In 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

Re: How to run your own mail server (2017)

#175
Before 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.

Re: How to run your own mail server (2017)

#176
post #22

Then 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.

However if you can get a correspondent to also set up their own mail server, then you may realise the pleasure of emailing directly from sender's server to recipient's, without using third party email "services" and third party email servers. First party to second party. No third party.

Every time these posts about setting up a mail server reach the HN front page, there are usually complaints and they always center around third party email services. Perhaps it is the use of those services that is the problem, not the process of setting up a mail server.

Spam is probably made easier by the fact that so many people use the same third party email providers. Spammers have less servers to target. (Not the same situation if every user had their own server.) As HN commenters oft point out, email, the protocol and software, is "decentralised". But the widespread "centralised" use of the same third parties to send and deliver mail has negated the benefits of being (theoretically) decentralised.

Re: How to run your own mail server (2017)

#177
post #161
post #22

Then 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.

There is no one secret you can google. There is also no need to perpetuate the fear of running your own email. Decentralization of core internet services helps us all, not just the person doing it. So to anyone seriously interested and willing to learn, I highly recommend running your own email servers. If you expect 100% delivery rate, you won't necessarily get that, no matter who is running your email infrastructur…

I'm doing the same for exactly the same reason (afraid of bad ML from Google wiping my whole digital life)

Re: How to run your own mail server (2017)

#178
post #56

Earlier quoted context omitted.

gandi.net doesn't support external domains. I'd be thankful for any recommendations that aren't totally overpriced and allow for external domains.

Personally, 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

I 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.

Re: How to run your own mail server (2017)

#179
post #74

Earlier quoted context omitted.

I don't have any problems with Gmail, but there is no way to know why :) As far as I know the most important factor for deliverability is your IP address: my /24 have been clean for many years because the network operator actually respond to abuse@ reports. If you have problems my first advice (aside from checking that SPF+DKIM+DMARC+PTR+banner+etc... are OK) would be to find a better ISP.

This is a physical server (at Datacate [1] in Santa Clara), so switching ISPs is not a small undertaking, especially given that I'm only using 1U of space. Last I looked the netblock reputation seemed fine, so I'd only be inclined to switch if I had clear evidence that was the real problem. [1] in this block if it matters: https://rdap.arin.net/registry/ip/198.167.232.0

Yeah, the IP address of your MX looks clean indeed, and your config looks good too... I wonder, have you ever tried sending from @scissor.com instead of @williampietri.com?
Post reply on HN