Stefan wrote:
> Hello list,
>
> I'm using SpamAssassin with the URICountry Plugin. Now I would like to add a 
> X-URI-Country: header to the scanned message. Therefore I added the following 
> lines to the URICountry.pm module:
>
>   
put your old uricountry.pm back.

do this in local.cf:

add_header all Relay-Country _RELAYCOUNTRY_

make sure this is in init.pre:

loadplugin Mail::SpamAssassin::Plugin::RelayCountry

use stuff like this in local.cf:

score RELAY_COUNTRY_KR 5
score RELAY_COUNTRY_CN 5
score RELAY_COUNTRY_HK 5

>   # Build a string of all found countries and export it as a tag
>   my $countries = "";
>   foreach my $country (keys(%countries)) {
>     $countries .= uc($country) ." ";
>   }
>   chop $countries;
>
>   $opts->{permsgstatus}->set_tag ("URICOUNTRY", $countries);
>
> Then I added the following lines to amavisd-custom.conf:
>
>   package Amavis::Custom;
>   use strict;
>
>   sub new {
>     my($class,$conn,$msginfo) = @_;
>     bless {}, $class;
>   }
>
>   sub before_send {
>     my($self,$conn,$msginfo) = @_;
>     my($uri_country) = $msginfo->supplementary_info('URICOUNTRY');
>     if (defined $uri_country && $uri_country ne '') {
>         my($hdr_edits) = $msginfo->header_edits;
>         my($all_local) = !grep { !$_->recip_is_local } @{$msginfo-
>   
>> per_recip_data};
>>     
>         $hdr_edits->add_header('X-URI-Countries', $uri_country)  if 
> $all_local;
>     }
>
>   };
>   1;  # insure a defined return
>
> I can use the URICOUNTRY tag with the command 'spamassassin' (e.g. in a 
> template like 30_text_de.cf). But amavisd doesn't add a header because 
> URICOUNTRY is empty (=""). Why doesn't amavisd see the content of URICOUNTRY?
>
> I use: amavisd-new 2.6.2 and SpamAssassin 3.2.5
>
> Greetings
> Stefan
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> AMaViS-user mailing list
> AMaViS-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/amavis-user 
>  AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
>  AMaViS-HowTos:http://www.amavis.org/howto/ 
>   


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to