OpenBSD Journal
Home : : Add Story : : Archives : : About : : Create Account : : Login :

<< Re: Passive Aggressive Spam Filtering | Up: Re: Passive Aggressive Spam Filtering | Flattened | Expanded | Re: Passive Aggressive Spam Filtering >>

Threshold: Help

  Re: Passive Aggressive Spam Filtering (mod -7/31)
by Andreas Vögele ( on Fri Jul 17 19:45:55 2009 (GMT)
  > 3. CIDR is very efficient (even if unfair as we do it for China or Korea).

We get much more spam from Brazil and the US than from China and Korea.

> BTW, I add to spamd.conf(5) some lists from my favorites top spam countries (which I'm not communicating with). Here is my script to get a good country ranking (install GeoIP package before): [...]

BTW, it's easy to add GeoIP lookups to the Exim mailer. I put the following code into /etc/exim/

use Geo::IP;
my $geoip = Geo::IP->new(GEOIP_STANDARD);

sub geoip_lookup_address {
  my $ip_address = shift;
  my $country_code = $geoip->country_code3_by_addr($ip_address);
  return $country_code;
This module is loaded with...
perl_startup = do '/etc/exim/'
...and, for example, later used like this
  # Look up the country the sender host is located in.
    condition = ...
    add_header = X-Sender-Host-Country: ${perl{geoip_lookup_address}{$sender_host_address}}
  [ Show thread ] [ Reply to this comment ] [ Mod Up ] [ Mod Down ]

[ Home | Add Story | Archives | Polls | About ]

Copyright © 2004-2008 Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to April 2nd 2004 as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. Some icons from used with permission from Kathleen. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. Search engine is ht://Dig. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]