On Tue, 2008-10-21 at 07:05 -0700, mathiasadsl wrote: > OK, i've just tried your new regular expression but it doesnt work better. > Nothing happened. The email is still tagged as [SPAM] and is delivered to > user. > That's odd. I've just run the following:
[EMAIL PROTECTED] ~]$ grep '^X-Spam-Status:.*\(No\|NO\)' x.txt X-Spam-Status: No, score=1.9 required=6.0 [EMAIL PROTECTED] ~]$ against a saved copy of your message. Grep requires (, ) and | to be escaped and I reversed the flag state because your message isn't spam. The only thing I can thing of is to repeat the question somebody else asked: how are you invoking SA and are you sure it gets invoked before Postfix forwards the message to [EMAIL PROTECTED] IIRC the Postfix manual doesn't help here, but looking at /var/log/maillog traces Postfix operations and may well show the order in which things are done? I'd look at my log but it will be no help at all because I pick up mail with fetchmail, which pipes it through spamc before sending it to Postfix for distribution. If there's not enough detail in the mail log, try making Postfix more verbose. http://www.postfix.org/DEBUG_README.html shows how to trace individual test messages and how to make all the Postfix daemons generate more logging information. I don't think what gets logged is important - you just need to see the order in which the various Postfix processes and SA act as a message is processed. > How can i write with regular expression the following? > "If [SPAM] is included in the subjet Redirect to [EMAIL PROTECTED]". > Something like: /^Subject:.*\[SPAM\]/ should do that, but my guess is that won't work any better. You need to be certain that SA is run before the message is passed to the re-routing filter before playing round with the regex. Martin