On Sat, 2011-04-23 at 18:49 +0100, Niamh Holding wrote: > Hello Karsten, > > Saturday, April 23, 2011, 6:23:51 PM, you wrote: > > KB> Besides, X-Spam-Relays-* are pseudo-headers, not part of the > KB> email unless you specifically add_header them. > > I guess I must have done that to get them into every email :) >
Try these (best suggestion first) 1) Install a copy of Spamassassin on a development host, edit the rule you want to test in /etc/mail/spamassassin/local.cf and run: spamassassin <test_message.txt Benefits: you're testing the rule you'll run in the environment it will run in, can also test meta-rules and can easily test against a real mail message. If you organise things correctly, you can keep all SA settings and local rules on the development machine and export them to the production server via a script and/or scp. I work this way and IME the time needed to set it up and write scripts to make rule development and testing simple is time well spent. 2) Try this online tester: http://www.solmetra.com/scripts/regex/ At least it defaults to PERL regexes, though it won't swallow a whole mail message easily. 3) grep -P 'regex to test' <test_message.txt Benefits: easy to test against a real mail message. Runs on your own box. Demerit: the -P option is described as 'experimental' and may not yet implement all PCRE features. Martin