Le lundi 18 juin 2007 à 10:49 +0200, Arne Hoffmann a écrit : > Emmanuel Lesouef wrote: > > > > Yes, if you want to match 'test' in the Subject, you need a header rule: > > > > > > header LOCAL_DEMONSTRATION_RULE /test/ > > > score LOCAL_DEMONSTRATION_RULE 1.000 > > > describe LOCAL_DEMONSTRATION_RULE This is a simple test rule > > > > > > > > > AFAIK there are four different types of rules: body, rawbody, header and > > > full. > > > > In fact, I already tested that. It doesn't work either. > > Well, I was too fast and didn't think. Sorry. It has to be: > > header LOCAL_DEMONSTRATION_RULE Subject =~ /test/ > score LOCAL_DEMONSTRATION_RULE 0.001 > describe LOCAL_DEMONSTRATION_RULE This is a simple test rule > > > > I'm thinking about my local.cf is not read. > > Try with: spamassassin -D --local <testmail.txt 2>&1 | grep local.cf
Ok, moving forward ;) Thanks for your help. Here is more infos : adele:~# spamassassin -D --local <testmail.txt 2>&1 | grep local.cf [1875] dbg: config: read file /etc/spamassassin/local.cf So, when invoking spamassassin from the command line, the local.cf is read. Let's try another command : adele:~# spamassassin -D --local <testmail.txt 2>&1 | grep LOCAL_DEMONSTRATION_RULE [1892] dbg: rules: ran header rule LOCAL_DEMONSTRATION_RULE ======> got hit: "test" [1892] dbg: check: tests=AWL,BAYES_00,LOCAL_DEMONSTRATION_RULE,NO_RECEIVED,NO_RELAYS LOCAL_DEMONSTRATION_RULE,NO_RECEIVED,NO_RELAYS autolearn=unavailable So, the local.cf file is read when using the CLI but not when Amavis invokes SA. -- Emmanuel Lesouef CRBN | DSI t : 0231069671 m : [EMAIL PROTECTED]