Re: rule problem basing on X-Spam-ASN - not a rule problem - proof

2013-04-25 Thread Frank Gadegast
Hi again, I checked the rule now by inserting a line like ASN: AS3701 140.211.0.0/16 in the test-msg, modified the asn-rule to header TEST_AS3701 ASN =~ /^AS3701 / describe TEST_AS3701Sender IP in AS from friendly SA user score TEST_AS3701 -0.1 tested, and ... X-Spam-Status:

Re: rule problem basing on X-Spam-ASN - not a rule problem

2013-04-25 Thread Christian Recktenwald
I ran some tests which indicate one may not have subsequent '-' after 'X-' in header lines: given this message: X-SpamASN: AS3701 140.211.0.0/16 X-Spam-ASN: AS3701 140.211.0.0/16 body... and those rules: header _LOCAL_XAS1 X-SpamASN =~ /AS3701 /

Re: rule problem basing on X-Spam-ASN - not a rule problem

2013-04-25 Thread Frank Gadegast
Christian Recktenwald wrote: I ran some tests which indicate one may not have subsequent '-' after 'X-' in header lines: Thats a great test, many thnx for it. It simply indicates, that ASN.pm is running nearly at first, before SA does its messurements. And SA surely strips all head-lines

Re: rule problem basing on X-Spam-ASN - not a rule problem

2013-04-25 Thread Christian Recktenwald
On Thu, Apr 25, 2013 at 10:18:43AM +0200, Frank Gadegast wrote: And SA surely strips all head-lines starting with X-Spam- before its doing anything. In Mail/SpamAssassin.pm there is some special handling of X-Spam- prefixed mail headers. So it's really not about subsequent dashes. --

Re: rule problem basing on X-Spam-ASN - not a rule problem

2013-04-25 Thread Frank Gadegast
Christian Recktenwald wrote: On Thu, Apr 25, 2013 at 10:18:43AM +0200, Frank Gadegast wrote: And SA surely strips all head-lines starting with X-Spam- before its doing anything. In Mail/SpamAssassin.pm there is some special handling of X-Spam- prefixed mail headers. So it's really not about

Re: SQL error: Duplicate entry

2013-04-25 Thread Matus UHLAR - fantomas
On 24.04.13 17:01, psychobyte wrote: in the bayes case, the table is bayes_token and indeed Mail::SpamAssassin::BayesStore::SQL is INSERTING into the table via _put_tokens(). my $insertsql = INSERT INTO bayes_token (id, token, spam_count, ham_count, atime)

Re: rule problem basing on X-Spam-ASN

2013-04-25 Thread RW
On Wed, 24 Apr 2013 16:45:42 +0200 Frank Gadegast wrote: Hi all, I like to set extra score on mail coming from some ASns using the asn.pm Lets say I like to reject all mail from BELPAK.BY I wrote header LOCAL_AS6697 X-Spam-ASN =~ / AS6697 / describe LOCAL_AS6697 Sender IP in

Re: SQL error: Duplicate entry

2013-04-25 Thread Matthias Leisi
On Thu, Apr 25, 2013 at 1:47 PM, Matus UHLAR - fantomas uh...@fantomas.skwrote: I don't think so... IIRC the REPLACE INTO deletes existing record and inserts new one, does not update existing. This caused some issues for me some ~10 years ago, so i switched to the update or insert. REPLACE

Re: SQL error: Duplicate entry

2013-04-25 Thread Matus UHLAR - fantomas
On Thu, Apr 25, 2013 at 1:47 PM, Matus UHLAR - fantomas uh...@fantomas.skwrote: I don't think so... IIRC the REPLACE INTO deletes existing record and inserts new one, does not update existing. This caused some issues for me some ~10 years ago, so i switched to the update or insert. On 25.04.13

Re: SQL error: Duplicate entry

2013-04-25 Thread Ben Johnson
On 4/25/2013 11:55 AM, Matus UHLAR - fantomas wrote: On Thu, Apr 25, 2013 at 1:47 PM, Matus UHLAR - fantomas uh...@fantomas.skwrote: I don't think so... IIRC the REPLACE INTO deletes existing record and inserts new one, does not update existing. This caused some issues for me some ~10

PreRBL with spamassasdon

2013-04-25 Thread Blason rock
Hi folks, Curious to know if i can implement prerbl with SA? What i mean is with SA as soon as sombody connects on port 25 SA should check if the connected host is part of any RBL and then process connection accordingly.

Re: PreRBL with spamassasdon

2013-04-25 Thread Raymond Dijkxhoorn
Hai! Grin. Your MTA most likely supports RBL's. Thanks, Raymond Dijkxhoorn, Prolocation Op 25 apr. 2013 om 21:09 heeft Blason rock blaso...@gmail.com het volgende geschreven: Hi folks, Curious to know if i can implement prerbl with SA? What i mean is with SA as soon as sombody

Re: PreRBL with spamassasdon

2013-04-25 Thread Blason rock
So any clue or if anyone has done it with postfix? On 26 Apr 2013 00:45, Raymond Dijkxhoorn raym...@prolocation.net wrote: Hai! Grin. Your MTA most likely supports RBL's. Thanks, Raymond Dijkxhoorn, Prolocation Op 25 apr. 2013 om 21:09 heeft Blason rock blaso...@gmail.com het volgende

Re: PreRBL with spamassasdon

2013-04-25 Thread Raymond Dijkxhoorn
Hai! Since a couple of years they have something thats called google. :) The first hit on 'rbl and postfix' gives: http://www.cyberciti.biz/tips/postfix-spam-filtering-with-blacklists-howto.html Thanks, Raymond Dijkxhoorn, Prolocation Op 25 apr. 2013 om 21:20 heeft Blason rock

RE: PreRBL with spamassasdon

2013-04-25 Thread Tony Nelson
Recently there was a good thread about postscreen and rbl. I just updated my config and have seen a decent improvement. Here is the starter message: http://archives.neohapsis.com/archives/postfix/2013-04/0468.html Hope this helps, Tony From: Raymond Dijkxhoorn

RE: PreRBL with spamassasdon

2013-04-25 Thread Blason rock
Yeah that was good source of information. Or rather let me rephrase the question, if anyone has tried prerbl with zimbra? I m sure there are usrers who might have implemented prerbl with postfix in zimbra, are there any? On 26 Apr 2013 01:00, Tony Nelson tnel...@starpoint.com wrote: Recently

Re: rule problem basing on X-Spam-ASN - not a rule problem

2013-04-25 Thread Dave Funk
On Thu, 25 Apr 2013, Frank Gadegast wrote: And SA is doing it right, to remove all X-Spam-lines before its starting, so that spammer cannot trick SA. And whatever line is inserted by ASN.pm, it needs to be stripped too, and thats why its programmed like it is. But I have no still no idea how

RE: SQL error: Duplicate entry

2013-04-25 Thread Giampaolo Tomassoni
On 4/25/2013 11:55 AM, Matus UHLAR - fantomas wrote: ... My understanding is that it's better (with respect to performance and atomicity) to attempt the INSERT and have it fail than to check if the ID/token combination already exists and UPDATE it if it does. Please note that it would

RE: PreRBL with spamassasdon

2013-04-25 Thread Karsten Bräckelmann
On Fri, 2013-04-26 at 01:10 +0530, Blason rock wrote: Yeah that was good source of information. Or rather let me rephrase the question, if anyone has tried prerbl with zimbra? I m sure there are usrers who might have implemented prerbl with postfix in zimbra, are there any? Color me

RE: PreRBL with spamassasdon

2013-04-25 Thread Quanah Gibson-Mount
--On Thursday, April 25, 2013 11:19 PM +0200 Karsten Bräckelmann guent...@rudersport.de wrote: On Fri, 2013-04-26 at 01:10 +0530, Blason rock wrote: Yeah that was good source of information. Or rather let me rephrase the question, if anyone has tried prerbl with zimbra? I m sure there are

Re: More longer rules or fewer shorter ones?

2013-04-25 Thread Andrew Talbot
Hi, Martin - Thank you for your response. I like your point about the portmanteau rules (and I award you two Points for using one of my favorite words in a new - yet appropriate - manner!). I never thought about scoring each rule as a 0.001 or something really low then tying them all

Re: More longer rules or fewer shorter ones?

2013-04-25 Thread John Hardin
On Thu, 25 Apr 2013, Andrew Talbot wrote: I never thought about scoring each rule as a 0.001 or something really low then tying them all together with meta-rules. Best practice is to define them as __SUBRULES, which don't score at all, and then tie those together in metas. The only reason

Re: rule problem basing on X-Spam-ASN

2013-04-25 Thread Karsten Bräckelmann
On Thu, 2013-04-25 at 13:57 +0100, RW wrote: I was just looking at the ASM plugin and it defines tags, but not a metadata pseudo-header. With other plugins, header tests run against that metadata header. Doh! Spot on. The metadata pseudo-headers are missing. Header rules can match against

Re: More longer rules or fewer shorter ones?

2013-04-25 Thread Martin Gregorie
On Thu, 2013-04-25 at 18:45 -0400, Andrew Talbot wrote: I like your point about the portmanteau rules (and I award you two Points for using one of my favorite words in a new - yet appropriate - manner!). :-) I never thought about scoring each rule as a 0.001 or something really low then

Re: rule problem basing on X-Spam-ASN

2013-04-25 Thread RW
On Fri, 26 Apr 2013 02:03:30 +0200 Karsten Bräckelmann wrote: On Thu, 2013-04-25 at 13:57 +0100, RW wrote: I was just looking at the ASM plugin and it defines tags, but not a metadata pseudo-header. With other plugins, header tests run against that metadata header. Doh! Spot on. The