Per olof Ljungmark wrote:
> [snip]
> 
> Also, the docs say "Also for 3.1.0, you can apply a patch [WWW]
> http://bugzilla.spamassassin.org/show_bug.cgi?id=3815 which will allow
> you to add a separate MIME header that shows all the message's relay
> countries, independent of the rules."
> 
>    add_header all Relay-Country _RELAYCOUNTRY_
> 
> this again I don't see, is there amavisd-tweaking involved here?
> 

there's an example in amavisd-custom.conf.

for example, you could add this at the end of your amavisd.conf:

#######
package Amavis::Custom; 

 

BEGIN { 

   import Amavis::Conf qw(:platform :confvars c cr ca $myhostname); 

   import Amavis::Util qw(do_log untaint safe_encode safe_decode); 

   import Amavis::rfc2821_2822_Tools; 

   import Amavis::Notify qw(build_mime_entity); 

} 

 

sub new { 

   my($class,$conn,$msginfo) = @_; 

   my($self) = bless {}, $class; 

   $self;  # returning an object activates further callbacks, 

           # returning undef disables them 

} 

 

sub before_send { 

   my($self,$conn,$msginfo) = @_; 

 

    my($all_local) = !grep { !$_->recip_is_local }
                        @{$msginfo->per_recip_data}; 

    if ($all_local) { 

        my($hdr_edits) = $msginfo->header_edits; 

 

        my ($rly_country) = 
$msginfo->supplementary_info('RELAYCOUNTRY'); 

        $hdr_edits->add_header('X-Relay-Countries', $rly_country) 

                 if defined $rly_country && $rly_country ne ''; 

 

        my($languages) = $msginfo->supplementary_info('LANGUAGES'); 

        $hdr_edits->add_header('X-Spam-Languages', $languages) 

                 if defined $languages && $languages ne ''; 

   } 

 

}

#
1;  # insure a defined return 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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