Re: [exim] Using GeoIP to block spammers - anyone?

Top Pagina
Delete this message
Reply to this message
Auteur: Odhiambo G. Washington
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Using GeoIP to block spammers - anyone?
* On 22/06/06 19:10 +0100, Chris Lightfoot wrote:
| On Thu, Jun 22, 2006 at 08:37:01PM +0300, Odhiambo G. Washington wrote:
| > Hello pple,
| > 
| > I have have a server which is where all deliveries are done. This server 
| > is not advertised "anymore" in DNS, but spammers are still sending to 
| > it in defiance of my TTL from DNS configuration.
| > I know that most of my clients who use this server are located within
| > my country (damn Kenya!).
| > 
| > I now want to block all connections to this server which originate 
| > outside my country.
| > 
| > I have hit google hard and found two projects that were geared towards
| > introducing the complexities (yes) of using GeoIP within Exim.
| > 
| > http://botanicus.net/dw/exim-python/exim-4.60py1.html
| > http://pookey.co.uk/exim-geoip.xml
| > 
| > One seems recent enough, but both seem like they are un-maintained.
| > I am running Exim 4.62 on all my servers.
| > 
| > Is there anyone out there using another variant of GeoIP blocking with 
| > Exim that they'd be willing to share with the community (me ;))?
| 
| this strikes me as a really bad idea, but as with many
| really bad ideas, it's trivial to implement in perl. grab
| the Geo::IP perl module, and then put
| 
|     use Geo::IP;
| 
|     sub get_country_code_from_ip ($) {
|         my $ip = shift;
|         our $geoip;
|         $geoip ||= new Geo::IP(GEOIP_STANDARD);
|         return $geoip->country_code_by_addr($ip);
|     }
| 
| in your startup perl module, then use,
| 
|     ${perl{get_country_code_from_ip}{$host_address}}
| 
| to obtain the country code in a string expansion.



How bad an idea is it. Chris?



        cheers
       - wash 
+----------------------------------+-----------------------------------------+
Odhiambo Washington                    . WANANCHI ONLINE LTD (Nairobi, KE)  |
wash () WANANCHI ! com            . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223            . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121            . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"  
                         --from a /. post