amavisd plugin for the geolocation addresses and headers X-Anti-Abuse

fakessh fakessh at
Mon May 2 15:17:56 CEST 2011

Le lundi 2 mai 2011 13:49, fakessh a écrit :
> hello list
> hello gurus
> I would like to write a milter to postfix to achieve a geolocation
> addresses and headers X-Anti-Abuse
> you tell me with mimedefang  is very simple
> I have tried with success
> but when I've put my achievements in production
> the headers X-SenderID disappears
> so I wonder why after having added mimedefang header and X-SenderID
> disappears
> Do you know a milter to the geolocation and X-Header-AntiAbuse
> this may be easily realized with a plugin with amavisd
> thanks ....                            s ///              

I just wrote a small plugin for anti abuse that here but I do not know where 
to start for geolocation with Geo:: IP:: PurePerl

package Amavis::Custom;
use strict;

# invoked at child process creation time;
# return an object, or just undef when custom checks are not needed
sub new {
 my($class,$conn,$msginfo) = @_;
 my($self) = bless {}, $class;
 my($hdr_edits) = $msginfo->header_edits;
 my($cl_ip) = $msginfo->client_addr;
       $hdr_edits->add_header('X-Header-AntiAbuse', "report abuse to 
       $hdr_edits->add_header('X-Header-AntiAbuse', "client addr $cl_ip");
       $hdr_edits->add_header('X-Header-AntiAbuse', "primary hostname");

 $self;  # returning an object activates further callbacks,
           # returning undef disables them
1;  # insure a defined return

can you help me for the geolocalisation plugin

 gpg --keyserver --recv-key 092164A7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the amavis-users mailing list