Re: [AMaViS-user] Using RelayCountry with amavis?
mouss wrote: Per olof Ljungmark wrote: mouss wrote: Per olof Ljungmark wrote: OK, thanks. I've gotten so far now that amavisd reports the header but it is not inserted into the actual message headers. I tested the snippet I sent you and it worked. amavis[1968]: (01968-01) header: X-Relay-Countries: VN\n The X-Relay-Countries header is present in ham mail but not in messages marked as spam. What is the additional parameter then for including it with spams as well? same reply: I tested the snippet I sent you and it worked, for both ham and spam. so please provide more information. In particular: - show the headers of a message where the relay info isn't added - show what you actually did to add the header (did you use the snippet as I sent it or did you modify it? if you modified it, show the result) PS. the header won't appear if the recipient is not local (same as for X-Spam-* headers). Yes, I suspect the recipient is not regarded as local in this case. I use the unmodified snippet you provided (thanks). All spams end up in [EMAIL PROTECTED] which I presumed was a local recipient because inter-sonic.com is in the local domain list and inter-sonic.com is $MYDOMAIN. I will turn on debug and see what that gives. Here are the headers from a spam: Return-Path: Received: from imapserver.example.com ([unix socket]) by imapserver.example.com (Cyrus v2.3.12p2) with LMTPA; Sun, 05 Oct 2008 11:16:26 +0200 X-Sieve: CMU Sieve 2.3 Received: from mail-router.example.com [IP here]) by imapserver.example.com (Postfix) with ESMTPSA id 04D196EB011 for [EMAIL PROTECTED]; Sun, 5 Oct 2008 11:16:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail-router.example.com (Postfix) with ESMTP id CBF9A2EB824 for [EMAIL PROTECTED]; Sun, 5 Oct 2008 11:16:25 +0200 (CEST) X-Envelope-From: [EMAIL PROTECTED] X-Envelope-To: [EMAIL PROTECTED] X-Envelope-To-Blocked: [EMAIL PROTECTED] X-Quarantine-ID: zTMoKYKJANeW X-Spam-Flag: YES X-Spam-Score: 28.37 X-Spam-Level: X-Spam-Status: Yes, score=28.37 tag=-999 tag2=4.8 kill=5.1 tests=[ADVANCE_FEE_2=1.234, ADVANCE_FEE_3=1.432, ADVANCE_FEE_4=0.639, BAYES_99=5, DCC_CHECK=3, FORGED_MUA_OUTLOOK=3.116, J_CHICKENPOX_37=0.6, MILLION_USD=1.528, MSOE_MID_WRONG_CASE=0.82, RELAY_ES=0.1, RELAY_FR=-0.01, SARE_FRAUD_X3=3.5, SARE_FRAUD_X4=1.667, SARE_FRAUD_X5=1.667, SUBJ_ALL_CAPS=2.077, US_DOLLARS_3=2] local received headers hidden Received: from smtp20.orange.fr (smtp20.orange.fr [193.252.22.31]) by station.inter-sonic.com (Postfix) with ESMTP id AAFAB13C41E for [EMAIL PROTECTED]; Sun, 5 Oct 2008 11:16:21 +0200 (CEST) Received: from User (unknown [84.77.136.111]) by mwinf2021.orange.fr (SMTP Server) with ESMTP id 2D1EF1C0009D; Sun, 5 Oct 2008 11:16:06 +0200 (CEST) X-ME-UUID: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] From: Lloyds TSB Pacific Bank [EMAIL PROTECTED] Subject: **LLOYDS TSB PACIFIC LIMITED/ URGENT ATTENTION NEEDED** Date: Sun, 5 Oct 2008 11:16:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600. Message-Id: [EMAIL PROTECTED] To: undisclosed-recipients:; - 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=100url=/ ___ 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?
mouss wrote: Per olof Ljungmark wrote: OK, thanks. I've gotten so far now that amavisd reports the header but it is not inserted into the actual message headers. I tested the snippet I sent you and it worked. amavis[1968]: (01968-01) header: X-Relay-Countries: VN\n The X-Relay-Countries header is present in ham mail but not in messages marked as spam. What is the additional parameter then for including it with spams as well? - 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=100url=/ ___ 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?
mouss wrote: 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 OK, thanks. I've gotten so far now that amavisd reports the header but it is not inserted into the actual message headers. amavis[1968]: (01968-01) header: X-Relay-Countries: VN\n --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=100url=/ ___ 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?
mouss wrote: Per olof Ljungmark wrote: OK, thanks. I've gotten so far now that amavisd reports the header but it is not inserted into the actual message headers. I tested the snippet I sent you and it worked. amavis[1968]: (01968-01) header: X-Relay-Countries: VN\n Yup, I'm getting there now. I had the (wrong) impression that the actual country was looked up separately but reading the code again proved the opposite, it is dug out from the RELAYCOUNTRY variable in SA. Thanks a lot for your kind help. --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=100url=/ ___ 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=100url=/ ___ 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=100url=/ ___ 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=100url=/ ___ 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] Syslog warnings: 1 x No buffer space available (FreeBSD)
Mark Martinec wrote: Per, I get this warning in the amavisd log daily and cannot seem to find the knob to twist to get rid of it. Happens on both FreeBSD-6 and -7. Raising kern.ipc.nmbclusters did not fix it and I'm not sure what buffers the message refers to. Apart from the message everything is dandy. or at least seems to be. The message is inserted immideately before the TIMING [total xxyy ms] report. amavisd-new-2.5.3,1, postfix-2.4.6,1 Everything is normal. The syslog(3) ensures the message gets to syslogd, if necessary by retrying a send. The syslog(3) has a void return value, so there is no way for the application to check the status, it is implicitly successful. amavisd checks the errno nevertheless, and counts the number of failures withing syslog(3), just to give you an estimate on how busy syslogd is and how often syslog(3) needed to re-send a log entry. Now that is what I call an explanation! Mark, thanks a lot for clarifying. --per - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Syslog warnings: 1 x No buffer space available (FreeBSD)
Hi list, I get this warning in the amavisd log daily and cannot seem to find the knob to twist to get rid of it. Happens on both FreeBSD-6 and -7. Raising kern.ipc.nmbclusters did not fix it and I'm not sure what buffers the message refers to. Apart from the message everything is dandy. or at least seems to be. The message is inserted immideately before the TIMING [total xxyy ms] report. amavisd-new-2.5.3,1 postfix-2.4.6,1 Thanks for any hints. --per - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] Ignore first upstream client
Mark Martinec wrote: Per, The incoming servers ARE listed in @mynetworks, the line SPAM FROM LOCAL ... is correct in a sense but not really interesting, obviously ALL incoming mail passes throughthe MX's first. You are right, the FROM LOCAL becomes useless information in such setup. The IP address of the client comes from Postfix in XFORWARD command, and in your case it is always the IP address of your front end MTA. Either concede and accept that any amavisd config setting based on @mynetworks (such as policy bank MYNETS) becomes useless, or somehow persuade first MTA to relay its information on IP client to the second MTA - the mechanism would be XCLIENT Postfix protocol extension, although I'm not sure what other implications it would have. Or invoke your content filtering by a front end MTA. The SA notion of trusted_networks and internal_networks is still useful and should still work in yuour setup. SA bases its DUL and SPF checks on information from Received header fields. Make sure the trusted_networks and internal_networks are correctly configured in local.cf. Mark, Thank you for your response. I have indeed noted that the actual filtering works flawlessly, one could argue that it is a cosmetic issue and the first upstream external server is present in the header information anyway. How difficult would it be to make this an option in amavis? I am not a coder so I would not know. If there is a wishlist I would like to add this feature (being able to consider external hosts only in reporting), if not I guess I have expressed myself here and now. Thank you for all your efforts and a great piece of software! Per olof ___ 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] Ignore first upstream client
Stuart Johnston wrote: Per olof Ljungmark wrote: Hi all, I'm moving our content filtering from the frontend smtp-servers to an inside relay. After a test, I can see that while it seems to work ok, all spam is marked Spam from local ip-of frontend smtp. How can I tell amavisd to ignore our incoming servers and report the first external relay instead? All are running postfix 2.2 or 2.3 and amavisd-new-2.4.1. ext-smtp-smtp/amavis-mail server port 25 10024 25 Try adjusting your @mynetworks setting in amavisd-new. The incoming servers ARE listed in @mynetworks, the line SPAM FROM LOCAL ... is correct in a sense but not really interesting, obviously ALL incoming mail passes throughthe MX's first. ___ 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] Ignore first upstream client
Clifton Royston wrote: On Fri, Jun 09, 2006 at 01:16:46AM +0200, Per olof Ljungmark wrote: Hi all, I'm moving our content filtering from the frontend smtp-servers to an inside relay. After a test, I can see that while it seems to work ok, all spam is marked Spam from local ip-of frontend smtp. How can I tell amavisd to ignore our incoming servers and report the first external relay instead? All are running postfix 2.2 or 2.3 and amavisd-new-2.4.1. ext-smtp-smtp/amavis-mail server port 25 10024 25 If I understand the question correctly, I think you want to configure internal_networks in the correct location for your SpamAssassin local.cf file. Yes, it definitely looks like it but I still get SPAM FROM LOCAL [frontend-ip] [EMAIL PROTECTED] even with internal_networks in local.cf. When you say correct location, does it mean it has to go into a certain place in local.cf? Also, I assume this parameter is SA and not amavis so the proper place to ask should be the SA-list... ___ 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] spamreport.pl stopped working
Hi, After upgrading to amavisd-new 2.3.3 my spamreport script http://flakshack.com/anti-spam/wiki/index.php?page=Spam+Report+ala+Kris ceased to work with several errors. In the release notes I read: COMPATIBILITY - replaced 'hits=' with 'score=' in inserted X-Spam-Status header field (and in some internal log entries) for compatibility with a changed default in SpamAssassin 3.1; which looks like a possible cause? I would be very grateful if someone could point me to a fix to the script or setting that made it work again. Thanks, Per olof --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ 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] spamreport.pl stopped working
Thomas Hochstein wrote: Per olof Ljungmark schrieb: - replaced 'hits=' with 'score=' in inserted X-Spam-Status header field (and in some internal log entries) for compatibility with a changed default in SpamAssassin 3.1; which looks like a possible cause? I would be very grateful if someone could point me to a fix to the script or setting that made it work again. Why don't you replace every occurence of hits with score? yes indeed. I thought I had already tried it but had apparently issued the wrong replace command. Thanks a lot! --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ 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/