Re: [AMaViS-user] Using RelayCountry with amavis?
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/
Re: [AMaViS-user] Using RelayCountry with amavis?
Brad White wrote: > It doesn't show up in the amavis generated log entries on my system, but it > is definitely working. I does show up when I run a spamassasin -D --lint: > > [14432] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry from > @INC > > I have the plugin enabled via the init.pre file in my spamassasin directory: > > # RelayCountry - add metadata for Bayes learning, marking the countries > # a message was relayed through > # > # Note: This requires the IP::Country::Fast Perl module > # > loadplugin Mail::SpamAssassin::Plugin::RelayCountry > > > You also need the extra configuration in your spamassassin local.cf file, > something like: > > ifplugin Mail::SpamAssassin::Plugin::RelayCountry > header RELAY_CN X-Relay-Countries =~ /\bCN\b/ > describe RELAY_CN Relayed through China > score RELAY_CN 1.0 > header RELAY_KR X-Relay-Countries =~ /\bKR\b/ > describe RELAY_KR Relayed through Korea > score RELAY_KR 1.0 > header RELAY_RU X-Relay-Countries =~ /\bRU\b/ > describe RELAY_RU Relayed through Russia > score RELAY_RU 1.0 > header RELAY_US X-Relay-Countries =~ /\bUS\b/ > describe RELAY_US Relayed through United States > score RELAY_US 0.001 > header RELAY_PL X-Relay-Countries =~ /\bPL\b/ > describe RELAY_PL Relayed through Poland > score RELAY_PL 0.001 > endif # Mail::SpamAssassin::Plugin::RelayCountry > > This definitely works for me on my installation. Yes you're right, it does not show up until you turn on a higher debug level, thanks! 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? > On 10/3/08 5:08 AM, "Per olof Ljungmark" <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I am fiddling with Mail::SpamAssassin::Plugin::RelayCountry in our >> Spamassassin config, and it seems to load ok from init.pre: >> spamassain -D --lint: >> [85215] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry >> from @INC >> >> However, it does not show up when I start amavisd: >> >> amavis[85275]: extra modules loaded after daemonizing: >> Mail/DomainKeys/Header.pm, Mail/DomainKeys/Key.pm, >> Mail/DomainKeys/Key/Public.pm, Mail/DomainKeys/Message.pm, >> Mail/DomainKeys/Policy.pm, Mail/DomainKeys/Signature.pm, >> Mail/SpamAssassin/Plugin/DomainKeys.pm, Mail/SpamAssassin/Plugin/PDFInfo.pm >> >> Anyone on the list using this plugin that can give me a hint here? Using >> latest stable release. >> >> Thanks, >> >> --per >> >> - >> 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/ > - 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/
Re: [AMaViS-user] Using RelayCountry with amavis?
Per olof Ljungmark wrote: > Hi, > > I am fiddling with Mail::SpamAssassin::Plugin::RelayCountry in our > Spamassassin config, and it seems to load ok from init.pre: > spamassain -D --lint: > [85215] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry > from @INC > > However, it does not show up when I start amavisd: > > amavis[85275]: extra modules loaded after daemonizing: > Mail/DomainKeys/Header.pm, Mail/DomainKeys/Key.pm, > Mail/DomainKeys/Key/Public.pm, Mail/DomainKeys/Message.pm, > Mail/DomainKeys/Policy.pm, Mail/DomainKeys/Signature.pm, > Mail/SpamAssassin/Plugin/DomainKeys.pm, Mail/SpamAssassin/Plugin/PDFInfo.pm > > Anyone on the list using this plugin that can give me a hint here? Using > latest stable release. Maybe the RelayCountry module has not been included in "additional_perl_modules" in amavisd? I think you can add it to your amavisd.conf. From the RELEASE_NOTES for the amavisd-new-2.4.3 section: - added a global configuration variable @additional_perl_modules, which is a list of additional Perl module names or absolute file names that should be compiled/executed (by calling 'require') at a program startup time by a master parent process, before chroot-ing and before changing UID takes place. Its purpose is to pre-load additional non-standard SpamAssassin plugins and similar modules that a standard SpamAssassin initialization would miss, causing them to be loaded later by each child process, which is inefficient and may not work in a chrooted process. Example: @additional_perl_modules = qw( /usr/local/etc/mail/spamassassin/FuzzyOcr.pm /usr/local/etc/mail/spamassassin/ImageInfo.pm /usr/local/etc/mail/spamassassin/WebRedirect.pm String::Approx Net::HTTP Net::HTTP::Methods URI URI::http URI::_generic URI::_query URI::_server HTTP::Date HTTP::Headers HTTP::Message HTML::HeadParser HTTP::Request HTTP::Response HTTP::Status LWP LWP::Protocol LWP::Protocol::http LWP::UserAgent LWP::MemberMixin LWP::Debug ); Make sure these files are owned by root and not writable by unprivileged users such as amavis! Try setting up a .cf file for RelayCountry, for example: = ifplugin Mail::SpamAssassin::Plugin::RelayCountry header RELAY_BR X-Relay-Countries =~ /\bBR\b/ describeRELAY_BR Relayed through Brazil score RELAY_BR 1.0 header RELAY_CN X-Relay-Countries =~ /\bCN\b/ describeRELAY_CN Relayed through China score RELAY_CN 1.0 header RELAY_HK X-Relay-Countries =~ /\bHK\b/ describeRELAY_HK Relayed through Hong Kong score RELAY_HK 1.0 endif = and see if SA reports entries like: RELAY_CN=1, RELAY_CN Relayed through China Bill - 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/
[AMaViS-user] Strange error after upgrade to 2.6.1
I switched my mail filter server yesterday from our older setup running amavisd-new 2.4.2, to an updated system running 2.6.1. Everything appeared to be going fine, but when I came in this morning I have about 15-20 messages stuck in my mail queue displaying the following message: forwarding FAILED: Can't locate object method "is_encoded" via package "Amavis::MIME::Body::OnOpenFh" at /usr/local/sbin/amavisd line 7038, line 5440. (in reply to end of DATA command)) Google hasn't proved very helpful on this one. The only mention I can even find of "Amavis::MIME::Body::OnOpenFH" is in the Amavisd release notes. Thanks. Michael Gaskins Berkeley County Government I.T. Project Manager [EMAIL PROTECTED] 843-719-4759 - 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/
[AMaViS-user] Using RelayCountry with amavis?
Hi, I am fiddling with Mail::SpamAssassin::Plugin::RelayCountry in our Spamassassin config, and it seems to load ok from init.pre: spamassain -D --lint: [85215] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry from @INC However, it does not show up when I start amavisd: amavis[85275]: extra modules loaded after daemonizing: Mail/DomainKeys/Header.pm, Mail/DomainKeys/Key.pm, Mail/DomainKeys/Key/Public.pm, Mail/DomainKeys/Message.pm, Mail/DomainKeys/Policy.pm, Mail/DomainKeys/Signature.pm, Mail/SpamAssassin/Plugin/DomainKeys.pm, Mail/SpamAssassin/Plugin/PDFInfo.pm Anyone on the list using this plugin that can give me a hint here? Using latest stable release. Thanks, --per - 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/
[AMaViS-user] low scoring mens health -- anyone else seeing these?
hi all, i've been getting quite a few mens health spams from yahoo.com and aol.com and aol.co.uk -- there going to various addresses and my client's address is being bcc'd this appears to be abuse, as scores are coming in very low on these messages (less than 1.0) i've increased the following scores by 0.5 (from what's in the file) score DRUGS_ERECTILE 2.872 1.146 0.825 0.782 any other suggestions? cheers charles - 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/