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

fakessh fakessh at fakessh.eu
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 
postmaster\@fakessh.eu");
       $hdr_edits->add_header('X-Header-AntiAbuse', "client addr $cl_ip");
       $hdr_edits->add_header('X-Header-AntiAbuse', "primary hostname 
r13151.ovh.net");

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


can you help me for the geolocalisation plugin

-- 
 http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
 gpg --keyserver pgp.mit.edu --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: <http://lists.amavis.org/pipermail/amavis-users/attachments/20110502/252df6fc/attachment.pgp>


More information about the amavis-users mailing list