GeoBL Usage
Zone query structure
Blocking by country or continent
Tracking connection statistics
Putting it all together
List of country codes
List of continents
Test points
Zone query structure
The GeoBL zone has extra options that can be enabled by changing the query itself. The full structure is:<reversed ip>.b[block_list].[server id].geobl.spameatingmonkey.net
- The first part is the ip address reversed. This means the IP 1.2.3.4 becomes 4.3.2.1
- The second part is the blocklist section starting with the letter "b" (optional)
- The third part is the assigned ID for the server performing the queries (optional)
Blocking by country or continent
Optional To block by country or continent you can add a blocking clause. The clause starts with the letter "b" followed by an underscore ("_") separated list of countries and continents. If, for example, you would like to block all of asia, the United States and Brazil then you would use the blocking clause of "basia_us_br" and your query for the IP 1.2.3.4 would look like:4.3.2.1.basia_us_br.geobl.spameatingmonkey.net
This configuration is always done on the client side. See the list of country codes and continents to see which codes to use.
Tracking connection statistics
You can track your server's connection statistics by country or domain by first creating an account. Once you create your account, add the IP address of your mail server to your account. After adding each one you will provided with the GeoBL zone for that specific server. For example, if your mail server's IP is 5.6.7.8, the zone will be:84281096.geobl.spameatingmonkey.net
Putting it all together
Now that you know the structure of each component it is time to combine them into one zone. As in our previous examples, we will use 1.2.3.4 as the connecting client IP, 84281096 as the server ID and we will block all connections from Asia, The United States and Brazil. The zone will look like:basia_us_br.84281096.geobl.spameatingmonkey.net
and the query for 1.2.3.4 will look like:
4.3.2.1.basia_us_br.84281096.geobl.spameatingmonkey.net
To use this config in postfix, add the following to your smtpd_recipient_restrictions section:
warn_if_reject reject_rbl_client basia_us_br.84281096.geobl.spameatingmonkey.net,
Remove warn_if_reject if you want to block the connection instead of just logging a warning.
List of country codes
The full list of countries that GeoBL can block are:| Code | Country | Code | Country |
|---|---|---|---|
| a1 | "Anonymous Proxy" | a2 | "Satellite Provider" |
| ad | Andorra | ae | United Arab Emirates |
| af | Afghanistan | ag | Antigua and Barbuda |
| ai | Anguilla | al | Albania |
| am | Armenia | an | Netherlands Antilles |
| ao | Angola | ap | Asia/Pacific Region |
| aq | Antarctica | ar | Argentina |
| as | American Samoa | at | Austria |
| au | Australia | aw | Aruba |
| az | Azerbaijan | ba | Bosnia and Herzegovina |
| bb | Barbados | bd | Bangladesh |
| be | Belgium | bf | Burkina Faso |
| bg | Bulgaria | bh | Bahrain |
| bi | Burundi | bj | Benin |
| bm | Bermuda | bn | Brunei Darussalam |
| bo | Bolivia | br | Brazil |
| bs | Bahamas | bt | Bhutan |
| bv | Bouvet Island | bw | Botswana |
| by | Belarus | bz | Belize |
| ca | Canada | cc | Cocos (Keeling) Islands |
| cd | the Democratic Republic of the Congo | cf | Central African Republic |
| cg | Congo | ch | Switzerland |
| ci | Cote D'Ivoire | ck | Cook Islands |
| cl | Chile | cm | Cameroon |
| cn | China | co | Colombia |
| cr | Costa Rica | cu | Cuba |
| cv | Cape Verde | cx | Christmas Island |
| cy | Cyprus | cz | Czech Republic |
| de | Germany | dj | Djibouti |
| dk | Denmark | dm | Dominica |
| do | Dominican Republic | dz | Algeria |
| ec | Ecuador | ee | Estonia |
| eg | Egypt | eh | Western Sahara |
| er | Eritrea | es | Spain |
| et | Ethiopia | eu | europe |
| fi | Finland | fj | Fiji |
| fk | Falkland Islands (Malvinas) | fm | Federated States of Micronesia |
| fo | Faroe Islands | fr | France |
| fx | Metropolitan France | ga | Gabon |
| gb | United Kingdom | gd | Grenada |
| ge | Georgia | gf | French Guiana |
| gh | Ghana | gi | Gibraltar |
| gl | Greenland | gm | Gambia |
| gn | Guinea | gp | Guadeloupe |
| gq | Equatorial Guinea | gr | Greece |
| gs | South Georgia and the South Sandwich Islands | gt | Guatemala |
| gu | Guam | gw | Guinea-Bissau |
| gy | Guyana | hk | Hong Kong |
| hm | Heard Island and McDonald Islands | hn | Honduras |
| hr | Croatia | ht | Haiti |
| hu | Hungary | id | Indonesia |
| ie | Ireland | il | Israel |
| in | India | io | British Indian Ocean Territory |
| iq | Iraq | ir | Islamic Republic of Iran |
| is | Iceland | it | Italy |
| jm | Jamaica | jo | Jordan |
| jp | Japan | ke | Kenya |
| kg | Kyrgyzstan | kh | Cambodia |
| ki | Kiribati | km | Comoros |
| kn | Saint Kitts and Nevis | kp | Democratic People's Republic of Korea |
| kr | Republic of Korea | kw | Kuwait |
| ky | Cayman Islands | kz | Kazakhstan |
| la | Lao People's Democratic Republic | lb | Lebanon |
| lc | Saint Lucia | li | Liechtenstein |
| lk | Sri Lanka | lr | Liberia |
| ls | Lesotho | lt | Lithuania |
| lu | Luxembourg | lv | Latvia |
| ly | Libyan Arab Jamahiriya | ma | Morocco |
| mc | Monaco | md | Republic of Moldova |
| mg | Madagascar | mh | Marshall Islands |
| mk | the Former Yugoslav Republic of Macedonia | ml | Mali |
| mm | Myanmar | mn | Mongolia |
| mo | Macao | mp | Northern Mariana Islands |
| mq | Martinique | mr | Mauritania |
| ms | Montserrat | mt | Malta |
| mu | Mauritius | mv | Maldives |
| mw | Malawi | mx | Mexico |
| my | Malaysia | mz | Mozambique |
| na | Namibia | nc | New Caledonia |
| ne | Niger | nf | Norfolk Island |
| ng | Nigeria | ni | Nicaragua |
| nl | Netherlands | no | Norway |
| np | Nepal | nr | Nauru |
| nu | Niue | nz | New Zealand |
| om | Oman | pa | Panama |
| pe | Peru | pf | French Polynesia |
| pg | Papua New Guinea | ph | Philippines |
| pk | Pakistan | pl | Poland |
| pm | Saint Pierre and Miquelon | pn | Pitcairn |
| pr | Puerto Rico | ps | Occupied Palestinian Territory |
| pt | Portugal | pw | Palau |
| py | Paraguay | qa | Qatar |
| re | Reunion | ro | Romania |
| rs | Russian Federation | ru | Russian Federation |
| rw | Rwanda | sa | Saudi Arabia |
| sb | Solomon Islands | sc | Seychelles |
| sd | Sudan | se | Sweden |
| sg | Singapore | sh | Saint Helena |
| si | Slovenia | sj | Svalbard and Jan Mayen |
| sk | Slovakia | sl | Sierra Leone |
| sm | San Marino | sn | Senegal |
| so | Somalia | sr | Suriname |
| st | Sao Tome and Principe | sv | El Salvador |
| sy | Syrian Arab Republic | sz | Swaziland |
| tc | Turks and Caicos Islands | td | Chad |
| tf | French Southern Territories | tg | Togo |
| th | Thailand | tj | Tajikistan |
| tk | Tokelau | tl | East Timor |
| tm | Turkmenistan | tn | Tunisia |
| to | Tonga | tr | Turkey |
| tt | Trinidad and Tobago | tv | Tuvalu |
| tw | Province of China Taiwan | tz | United Republic of Tanzania |
| ua | Ukraine | ug | Uganda |
| um | United States Minor Outlying Islands | us | United States |
| uy | Uruguay | uz | Uzbekistan |
| va | Holy See (Vatican City State) | vc | Saint Vincent and the Grenadines |
| ve | Venezuela | vg | British Virgin Islands |
| vi | U.S. Virgin Islands | vn | Vietnam |
| vu | Vanuatu | wf | Wallis and Futuna |
| ws | Samoa | ye | Yemen |
| yt | Mayotte | yu | Yugoslavia |
| za | South Africa | zm | Zambia |
| zr | Zaire | zw | Zimbabwe |
List of continents
If you would like more aggressive blocking then you may block by continent. The continent codes are: africa, antarctica, asia, europe, north-america, oceania, south-america.Test points
There is a special use blocking flag of 'all' that will return a positive response on all queries. This is useful for testing purposes only. For example, checking the IP 1.2.3.4 using the query4.3.2.1.ball.geobl.spameatingmonkey.net
will return the following:
$dig +short -t any 4.3.2.1.ball.geobl.spameatingmonkey.net
127.0.0.2
"Blocked by admin request, see http://spameatingmonkey.com/geobl/blocked.html?h=1.2.3.4&c=All&m=all"