How to stop Pi-hole from blocking links in email messages
September 9, 2024 10:00 AM   Subscribe

I'm using Pi-hole to do ad filtering on my home network. It generally works well, but it's had the unfortunate side-effect of disabling a lot of links I get via email messages. How do I fix this?

I get it that the email links have some kind of tracking ability that may violate your privacy, but I don't really care about that. I just want to be able click on the link and see the page, even if the sender then knows I clicked on it.

Are there any Pi-hole block lists I can use that block ads but don't stop email trackers or link trackers? Or can I take a block list and manually remove all the link trackers? Here are the block lists I'm using now:


https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://raw.githubusercontent.com/hagezi/dns-blocklists/main/domains/pro.txt
https://easylist.to/easylist/easylist.txt
https://adaway.org/hosts.txt

I don't actually remember how I settled on those lists. I think I found them in some online discussion a few months ago when I originally configured the Pi-hole.

Thanks!
posted by akk2014 to Technology (14 answers total) 5 users marked this as a favorite
 
The Pi-Hole filters whole domains, so if yours is filtering links in email, it's doing that not because the links have tracking information embedded in them but because the domain-name part of the link points to a host known to do bad things like send spam and/or host malware.

If you're absolutely determined to play fast and loose with your security by clicking on random links in emails, which is like #1 in the list of things that Online Hygiene 101 teaches us all never to do, just copy the domain name part out of the URL in the link and use the Pi-Hole dashboard to add it to the domain whitelist. But when your machine seizes up from ransomware or your identity gets stolen by phisherpholk, don't say you weren't warned.
posted by flabdablet at 10:49 AM on September 9 [1 favorite]


I’m a novice Pi-hole user but I have all those lists without this problem, how annoying! You can whitelist individual domains as needed, if that’s appropriate. Some troubleshooting questions:

* is it every link, or just some? (If it’s just some, I agree with flabdablet above— that’s a very short list of blocked sites and shouldn’t be throwing false positives like this; there’s a good chance the sites are malware.)
* what email client are you using?
* as a troubleshooting step, have you tried having the query log open in one window while you click on an email link to see what specific domain’s coming up as blocked?
posted by peppercorn at 10:56 AM on September 9


Response by poster: Thanks flabdablet, but I was hoping for a way to disable the blocks en masse, rather than adding them one-by-one to a whitelist.

Also, I'm not clicking on random links. I'm clicking links in promotional emails I get from trusted vendors, and from notifications I receive from Substack, Discord, etc. This blocking is a real pain in the butt. My spouse also complains that she can't see deals she gets from Old Navy, etc.
posted by akk2014 at 10:57 AM on September 9 [1 favorite]


Disabling the blocks en masse would pretty much allow advertising to come straight in past your Pi-Hole, because so many of the clickthrough servers are also ad servers. If you keep the Pi-Hole dashboard open in its own tab, it shouldn't take terribly long to get only the sites that are of actual use to you listed in your Pi-Hole's allow list.
posted by flabdablet at 11:22 AM on September 9 [1 favorite]


I don’t have a suggestion on this specifically. What I do when I need to click a link in an email like this (generally in my case it is the Unsubscribe link for entities that I have done business with) I temporarily turn off blocking from the Pi-Hole dashboard.
posted by hilaryjade at 11:24 AM on September 9


If I recall, pi-hole will let you specify domains in an allow-list. Just go in and provide the tracking domains you wish to allow. That list will take precedence
posted by bug138 at 12:09 PM on September 9


I'm not sure this is possible. Pretty much the entire point of sending marketing emails is to generate data about specific people, so when you click any link (or even just open the email) all that stuff is registering on some sort of ad analytics platform which is the sort of intrusive thing PiHole blocks at the network level.

I will say I use PiHole with what I think are very default settings and I have not really noticed this issue to this degree, yeah it blocks a lot of obvious marketing tracking links but not notifications from run of the mill services. Maybe a reset of your setup is in order.
posted by bradbane at 12:24 PM on September 9


I haven't had this problem with links in emails with my pihole, just things like "sponsored links" that google serves up in searches. That said, if you log onto the pihole dashboard page in your web browser you can temporarily turn off filtering. There are one-click options like "turn off filtering for 5 minutes". That will let you click through to whatever link it is you want to see, and the pihole will automatically restart.
posted by fimbulvetr at 1:55 PM on September 9


Best answer: "I was hoping for a way to disable the blocks en masse, rather than adding them one-by-one to a whitelist."

There is no way to do this other than changing the blocklists you use. PiHole can't tell WHY you want to access something behind a domain, so you can't say "allow all trackers when I click via my email".

What you could do is revert to using the default list only - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts - and you would likely find, like the rest of us, that relatively few of the domains used in email click tracking are blocked. My guess is that at least one of the lists you have added blocks more aggressively.
posted by i_am_joe's_spleen at 2:10 PM on September 9


Some email services will rewrite links to run them through another level of “protection”. Could that be the problem?
posted by soylent00FF00 at 9:35 AM on September 10


Best answer: If you switch over to using NextDNS instead of PiHole, there's an option to unblock links in e-mails ("Allow Affiliate & Tracking Links" on the Privacy page). Those domains then point to a server they run which allows the request to proceed if it looks like you clicked the link in an e-mail or search results. (I assume they are sniffing the HTTP referrer.)

No affiliation except as a satisfied customer. I have found NextDNS a far better experience than running my own DNS server, which I used to do. Their Pro service is $20 a year.

You can set up your Pi as a caching DNS server which will help to speed up host lookups on your network, and point it to NextDNS as your upstream.
posted by kindall at 12:18 PM on September 10 [2 favorites]


Also, if you do want to use PiHole, using more blocklists is not better. Most of them will have 90+% the same hosts. Just pick one of Hagezi's and be done with it.
posted by kindall at 5:25 PM on September 10


Response by poster: @kindall: Thanks for the tip. NextDNS looks promising, and $20 per year is quite reasonable. I didn't know the Pi-hole can work as a caching DNS server. I'll look into it.
posted by akk2014 at 8:37 PM on September 10


I didn't know the Pi-hole can work as a caching DNS server.

If you run it without any lists installed, that's pretty much exactly all it is; it's built around a pretty close fork of dnsmasq, a very widely used and rightfully respected caching DNS forwarder.
posted by flabdablet at 10:41 PM on September 10


« Older Unresolved Lyrics   |   Landlord Q: Rental needs repairs - how to... Newer »

You are not logged in, either login or create an account to post comments