Thank you for the clarification; I misunderstood how the whitelist works and, thus, my request is far simpler. Let me step back and rephrase without implementation assumptions.
When loading a blocklist, I would like a filter that effectively “whitelists” various domains in the blocklist by simply filtering them out of the blocklist.
My current workflow:
- update gravity
- go to /etc/pihole as root
- rm whitelist.txt
grep -e "\.apple.com$" list.0.dbl.oisd.nl.domains >> whitelist.txt
grep -e "\.icloud.com$" list.0.dbl.oisd.nl.domains >> whitelist.txt
grep -e "\.me.com$" list.0.dbl.oisd.nl.domains >> whitelist.txt
Then: “cat >> whitelist.txt” and paste a list of one-offs that I keep in a notes file.
When using more than one blocklist, I’d grep on
sort | uniq the whitelist to eliminate dupes.