On Wed, 2007-10-24 at 17:54 +0200, Christian Nygaard wrote:
> How do I write a local spamassassin rule that matches received from
> header mail?.example.com . I've tried writing a header matching rule
         ^^^^^^^^^^^^^^^^^
>  but it doesnt seem to work. Can you show a short example of a working
> header matching rule for received from? 
> 
> Received: from mail3.example.com
                 ^^^^^^^^^^^^^^^^^

Just a guess, since you failed to paste any example of the rules you
tried already -- however, given the above, I guess the reason your rules
didn't match is, cause you confused wildcards for REs.

In RE syntax, the question mark means "optional". Thus, a SA rule
containing "mail?" will match "mai" or "mail", but it will *not* match
"mail3"...

Maybe this will help writing your custom rules, in addition to the
already posted examples.


Also, you're not trying to create some rules to subtract points for
trusted SMTP relays, are you? In that case, you should have a look at
the trusted_networks option instead, I guess.

  guenther


-- 
char *t="[EMAIL PROTECTED]";
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