On Wed, 2014-09-03 at 12:30 +0200, Luciano Rinetti wrote:
> Thank You for the answer Karsten,
> you have right, Phil doesn't exists, (as example.com) but i hide the
> real address for obvious reasons, and it is a "role" email that i want
> will receive only mail with subject "CV" or "Curriculum" and all the
> general mail will be treated and scored as spam.
> My intention are not "top secret", i will be glad even only if you
> address me to the "SA conf docs" or "the rule-writing wiki".

Let me google that for you. The first result should be the SA wiki
WritingRules page as a starter.

  http://lmgtfy.com/?q=spamassassin+rule+writing


> Il 03/09/2014 05:21, Karsten Bräckelmann ha scritto:
> > On Mon, 2014-09-01 at 07:36 +0200, Luciano Rinetti wrote:

> > > I need a rule that, when a message is sento to p...@example.com
> > > and the Subject contains "CV" or "Curriculum", scores the message with -9
> > > and a rule that, when a message is sent to to p...@example.com
> > > and the Subject doesn't contains CV or Curriculum, scores the message 
> > > with 7

> > The specified criteria are trivial, and can be easily translated into
> > rules. Reading the SA conf docs and maybe some of the rule-writing wiki
> > docs should enable the reader to do exactly that. (Hint: meta rules)

Oh well, here goes. Untested.

header __PHIL_TO    To:addr =~ /phil\@example.com/i
header __PHIL_SUBJ  Subject =~ /\b(cv|curriculum)\b/i

meta     PHIL_CURRICULUM      __PHIL_TO && __PHIL_SUBJ
describe PHIL_CURRICULUM      CV for Phil
score    PHIL_CURRICULUM      -2

meta     PHIL_NOT_CURRICULUM  __PHIL_TO && !__PHIL_SUBJ
describe PHIL_NOT_CURRICULUM  Not a CV for Phil
score    PHIL_NOT_CURRICULUM  1

Do note though, that this approach is NOT fool-proof. Messages
containing a CV still can end up classified spam for various reasons.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to