If you are using pfBlocker NG, you might eventually end up receiving no more e-mails from Google's Gmail service, depending on which RBL lists you use. For example, spamcop is known to repeatedly block networks that host Gmail SMTP servers. This may be a problem for you, because everyone and their grandmother is using Gmail.
This solution will take considerably more work, now and in the future, but it will keep all your RBL lists intact.
But how do you get this list of IP addresses? Google uses hundreds if not thousands of outgoing SMTP servers to deliver e-mails and you never know which one hits our firewall. You will make use of SPF to compile a list of IP addresses that are currently allowed to send e-mails under the gmail.com domain. For this you will need a linux shell and dig installed. Let's see what's up with the SPF record of gmail.com:
# dig txt gmail.com | grep spf gmail.com. 594 IN TXT "v=spf1 redirect=_spf.google.com"
This appears to be a redirect to _spf.google.com, alright, let's look up google.com's SPF records:
# dig txt _spf.google.com | grep spf _spf.google.com. 599 IN TXT "v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all"
Fantastic, even more redirects, so you have no other chance than looking up all of these:
# dig txt _netblocks.google.com | grep spf _netblocks.google.com. 1820 IN TXT "v=spf1 ip4:22.214.171.124/24 ip4:126.96.36.199/19 ip4:188.8.131.52/20 ip4:184.108.40.206/20 ip4:220.127.116.11/18 ip4:18.104.22.168/16 ip4:22.214.171.124/21 ip4:126.96.36.199/16 ip4:188.8.131.52/17 ip4:184.108.40.206/19 ip4:220.127.116.11/19 ~all" # dig txt _netblocks2.google.com | grep spf _netblocks2.google.com. 2767 IN TXT "v=spf1 ip6:2001:4860:4000::/36 ip6:2404:6800:4000::/36 ip6:2607:f8b0:4000::/36 ip6:2800:3f0:4000::/36 ip6:2a00:1450:4000::/36 ip6:2c0f:fb50:4000::/36 ~all" # dig txt _netblocks3.google.com | grep spf _netblocks3.google.com. 3598 IN TXT "v=spf1 ip4:18.104.22.168/19 ip4:22.214.171.124/20 ip4:126.96.36.199/19 ip4:188.8.131.52/20 ip4:184.108.40.206/19 ip4:220.127.116.11/21 ip4:18.104.22.168/20 ip4:22.214.171.124/19 ip4:126.96.36.199/16 ip4:188.8.131.52/22 ~all"
That is an absolutely shocking number of IP addresses, thanks Google for being so lazy on this one. So you will need to compile a list of all these, in our example you will need an IPv4 list (create another IPv6 list if both your firewall and your mailserver use IPv6 and you use IPv6 RBL lists for mail on PfBlocker NG):
184.108.40.206/24 220.127.116.11/19 18.104.22.168/20 22.214.171.124/20 126.96.36.199/18 188.8.131.52/16 184.108.40.206/21 220.127.116.11/16 18.104.22.168/17 22.214.171.124/19 126.96.36.199/19 188.8.131.52/19 184.108.40.206/20 220.127.116.11/19 18.104.22.168/20 22.214.171.124/19 126.96.36.199/21 188.8.131.52/20 184.108.40.206/19 220.127.116.11/16 18.104.22.168/22
2001:4860:4000::/36 2404:6800:4000::/36 2607:f8b0:4000::/36 2800:3f0:4000::/36 2a00:1450:4000::/36 2c0f:fb50:4000::/36
Updated on: Jan 19, 2020
So this is your custom list, create the RBL Alias exactly as explained in the first paragraph and do not forget force update. Once successful, again send e-mail from Gmail to your local e-mail address and in the end everything will be fine: