this post was submitted on 30 Nov 2026
48 points (96.2% liked)

Selfhosted

64175 readers
621 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I started hosting my own email server with stalwart and my dkim dmarc spf etc is all configurrd right but i get sent to spam with all the major providers so any tips to improve ip reputation?

top 33 comments
sorted by: hot top controversial new old
[–] Dave@lemmy.nz 26 points 3 days ago (3 children)

Have to tested with something like mxtoolbox to check if IP is the issue?

Also, others frequently mention that residential IPs are often blocked as most email sent from residential IPs is spam ftom botnets. Are you running at home or on a VPS?

[–] BuckFutter@timeyak.com 8 points 2 days ago

yah, mxtoolbox has all types of neat checks and useful information. Good suggestion.

[–] trojanbark@lemmy.world 3 points 2 days ago (2 children)

Question, is it possible for the IP to be ipv6 or does it have to be 4?

[–] pHr34kY@lemmy.world 3 points 2 days ago (1 children)

See my other comment. You'll have a much better time on v6.

[–] trojanbark@lemmy.world 1 points 2 days ago
[–] frongt@lemmy.zip 3 points 2 days ago (1 children)

For what purpose? A mail server doesn't care about 4 or 6 (assuming it supports the one you're trying to use).

Of course, the remote server will also have to use a 4 or 6 address, or some form of translation layer.

[–] trojanbark@lemmy.world 2 points 2 days ago
[–] DrunkAnRoot@sh.itjust.works 2 points 2 days ago (1 children)

I will look into mxtoolbox stuff thanks!

[–] kossa@feddit.org 1 points 2 days ago

That's a good start. But even when all tests pass you can still have troubles with delivering mail. What helps further is to let Google and Microsoft manually know about your mailserver. They once had at least a form to do so some 10ish years ago. But you kinda have to remind them once in a while, it's shitty. The "big ones" just don't play fair.

That's why I kinda gave up and configured a smarthost in the end. But your send mail hops through external nodes anyway, as long as there's transport security it does not matter for me personally that there's one hop more. Theoretically you could also configure your mailserver to only send to Google and Microsoft via the smarthost and send the rest normally, but I could not be bothered.

As many people say that they do and did not have those problems I described, I feel it's not only about residential IP, but also about, idk, having a US vs. rest-of-the-world IP or such...anyway, YMMV is all I am saying, I wish you good luck 🙏

[–] yuman@programming.dev 11 points 2 days ago (1 children)

I've been in that racket for eons and can't express how glad I am I don't gotta do none of that shit no more.

as to OP, you can't. there is no tech, settings, or guidelines you can follow so that your domain X will reach the inbox of user at gmail or hotmail, every time. even them fishing your thing out of the spam folder and saying "I wanna hear from this fella" won't make that certain. even if there's a thread in their inbox of several messages from you and you replying to them, won't make that happen. and especially not if you're sending from a residential IP CIDR or, dog forbid, a VPS one.

except, if you offload your delivery to 3rd party providers, ala mailchimp, sendinblue, et al. them got a dedicated pipe into google's infra and you're not subject to those harassment tactics, which is basically payola.

that's a choice, made by them. google doesn't want you to to use email, they want you to use gmail.

the solution is simple - you stop talking, sending, receiving mail from them fucks and teach your server to only talk to independent mail servers. dog help you with spam, but resistance gotta start somewhere. what better place than here, what better time than now?

[–] nitrolife@hikki.team 1 points 2 days ago (1 children)

Just set up a PTR record and you will never end up in Google's spam. I've been running my own server for almost 10 years and have never seen this problem once. At the same time, I host my server at home on a residential IP range. I just talked my provider into setting up a PTR for my static IP.

[–] yuman@programming.dev 1 points 2 days ago (1 children)

my own server for almost 10 years

gonna guess OP's is younger than that

[–] nitrolife@hikki.team 3 points 2 days ago* (last edited 2 days ago) (1 children)

So what? Does this somehow cancel out PTR filtering? This isn't the only server I've maintained, and I've never received bans. Moreover, I recently moved and also didn't end up in Google's spam. ¯_(ツ)_/¯

With a normal configuration, you won't get spam marked.

[–] yuman@programming.dev 0 points 2 days ago (1 children)

hear that, OP? here's the solution, if only all the ~~spammers~~ marketing-ers just knew this simple trick!

you're either willfully ignorant or obtuse; either way change your tone if you want serious replies.

[–] nitrolife@hikki.team 2 points 2 days ago* (last edited 2 days ago) (1 children)

It's unlikely you understood my tone through an AI translator. Oh well.

Personally, I still think that it is almost impossible to end up in spam right away from a clean address without engaging in spam. If you config corrent of course.

And I think this is a much more objective piece of advice than something like

the solution is simple - you stop talking, sending, receiving mail from them fucks and teach your server to only talk to independent mail servers.

[–] lemmyvore@feddit.nl 1 points 2 days ago (1 children)

Residential addresses are basically used all the time now by AI crawlers, spammers, malware and all kinds of shit. It's a "known secret" that everybody uses and it doesn't mean anything anymore.

Kudos for having working email for so long but you're the exception.

[–] Lichtblitz@discuss.tchncs.de 1 points 2 days ago (1 children)

I haven't had problems either, though I'm not hosting on residential IPs. It really depends on the hoster and whether they are following up and thus limiting on abuse or not. If they are then it is 99% up to the mail server and DNS and PTR configs. There is only one company I've encountered that requires you to actually message them and get your IP explicitly allow listed even if you've done everything right: the (German) Telekom. But that's also more of a formality and as long as you stay on their good side, it's a once-in-a-lifetime thing.

[–] lemmyvore@feddit.nl 1 points 1 day ago (1 children)

But that's relying heavily on the IP's history, doesn't it? You're essentially betting both that it's never going to change and that it's never been misused.

Even than, one overzealous list is all it takes to taint it. Or it can end up included inside a block that's blacklisted for unrelated reasons.

I don't see a reason to bother with all this when I can rent reliable SMTP service for a couple of dollars a month. I could understand pushing back if small and medium email providers were on the verge of extinction, but they aren't.

[–] Lichtblitz@discuss.tchncs.de 1 points 17 hours ago (1 children)

You do you. I'm just arguing that self-hosting email isn't nearly as bad as the reputation makes it out to be.

[–] lemmyvore@feddit.nl 1 points 15 hours ago (1 children)

I'm just interested in the practical aspects.

If I were to set someone up for email right now, from scratch, using my approach, it's 100% achievable and straightforward, just have to pick a provider with the ratio of features/price you like.

The other approach hinges on the IP. You have to get one, it has to be clean, and it has to be kept clean going forward. The latter might be not as hard as people think, but the former?

To put it in practical terms, If you didn't have your IP, would it be easy to get another one? And how much of a sure thing would it be to find a clean one? As easy as opening an account with an email provider?

[–] Lichtblitz@discuss.tchncs.de 1 points 1 hour ago* (last edited 1 hour ago)

I believe the IP is secondary to the IP block. If you have a reputable hoster who takes care of their business, IPs are likely not deny-listed. With the hosters I've used, changing the IP is trivial. Order a new one and cancel the previous. I never needed it, though. There is just one thing I would strongly recommend: never go the self hosted setup route for someone else if you're not using the same setup as well. That's setting someone up for disaster. If you are your own client and something breaks, you can easily fix it. If they have to rely on you, your availability and responsiveness in case they want to send or receive something urgent, it can be very frustrating. Always go the route with a service that provides support when setting someone else up.

If you love tinkering, the self hosting route is very viable and once everything is set up properly, the only thing you'll have to do for many years is regularly patching the system, preferably automatically.

Also check the reputation of neighbouring ips in your block. Unfortunately if someone else in your block is spamming, you will get score added just for being in the same block.

[–] Brkdncr@lemmy.world 12 points 2 days ago (1 children)

Get a better IP address.

A port reflector service would work.

A secure email gateway service would also work and also helps deal with spam.

[–] Dave@lemmy.nz 3 points 2 days ago

My home PC sends via Mailgun for transactional mail and something like that might work for half-self-hosted email too. But one thing I learnt doing this is that the originating IP is passed on. I had mine through a VPN, and didn't realise Mailgun passes my IP through to the receiving mail server. So I had emails getting rejected when the VPN IP was passed to the end mail server.

Took a lot of sending test emails and reading headers to work that one out. But I mention this because I'm curious to know of sending via a service like this can build up reputation for your IP, so that eventually you'll get a good reputation and be able to send without it?

I guess reputation is not some universal thing anyway so different mail providers may handle it differently.

[–] frongt@lemmy.zip 10 points 2 days ago

For your current IP address, not really, the only way is to gain trust by sending mail that gets marked as not spam. Else, see the other comments.

[–] tramdan@piefed.social 2 points 2 days ago

My IP address was on Spamhaus's list just because it's residential but it was easy to get it removed by filling in their online form.

[–] pHr34kY@lemmy.world 4 points 2 days ago* (last edited 2 days ago)

Prefer IPv6 for delivery.

There's a postfix smtp_address_preference flag for it. The blocklists over IPv6 are very much smaller.

Also, register your IP address to be excluded on spamhaus. It's free, and it's something that has to be done annually. MXtoolbox lists blocklists that charge money for removal from their list (UCEProtect in particular). They're scams and absolutely nobody uses their lists.

This is my home IP address check on MXToolbox. It's fine. There are only 4 providers that even implement a v6 list.

Gmail and outlook both support v6 delivery, and that's a decent chunk of it these days.

I also signed up for a static IP from my ISP. With that, I could get a PTR DNS record as well.

[–] BuckFutter@timeyak.com 4 points 2 days ago (1 children)

only other suggestion is to check your PTR record (reverse dns) and make sure that the domain matches the mail server name

[–] ikidd@lemmy.dbzer0.com 3 points 2 days ago

Not many providers will drop you for a missing PTR. I've ran without it for most of a decade and not had an issue.

[–] communism@lemmy.ml 2 points 2 days ago

Basically contact spam list maintainers to remove your IP address or domain, and keep using your mail server. New domains and new mail servers have low reputation. Mine has been running for several years and despite neighbouring IP addresses having bad reputation, my IP address doesn't seem to appear in blocklists anymore.

[–] helix@feddit.org 1 points 2 days ago

Check the spam headers of the mails you sent to the major providers. I have several gmail, hotmail etc. accounts just for this purpose.

[–] hendrik@palaver.p3x.de 1 points 2 days ago

I think the main thing to do is, go to the usual blocklists and make sure to remove your IP there, in case the previous owner of the IP address got listed as a spammer. Other than that I'm afraid there isn't much you can do. Test your server with the free email server checkers and make sure you score 10/10. But other email servers will likely also calculate an overall score for your internet service provider's address range. Depending on what other customers do. It'll also penalize you if you're on a residential internet connection or one of the spammy cloud providers.

[–] Decronym@lemmy.decronym.xyz 0 points 2 days ago* (last edited 1 hour 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
ISP Internet Service Provider
SMTP Simple Mail Transfer Protocol
VPN Virtual Private Network
VPS Virtual Private Server (opposed to shared hosting)

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

[Thread #196 for this comm, first seen 30th Nov 2026, 11:00] [FAQ] [Full list] [Contact] [Source code]