On 2015-07-18 04:54, Martin Gregorie wrote:
There are lots of possibilities. I test using a big (and growing) spam collection, which I keep so I can regression test my current rule set. Thats quite crude: if everything in the collection is recognised as spam, nothing gets flagged up during the test run and thats a pass.
Thanks for the reply. Having a test server seems like a good idea. I also like the idea of not storing a spam collection on a more expensive production server.
My setup is fairly simple: I run spamc/spamd on a development box and have a collection of bash scripts that can pass one or more spam samples (piped into spamc) through spamd for testing. I maintain local copies of all cf files and a set of bash scripts that can:
I keep local copies on a small production server and run a bash script that moves our .cf files (after linting) to several servers and reloads the rules. It's very simple but does the trick. On a related note, I wish I could pass a message from the quarantine. That is, I'm trying to figure out a way to pass a raw message to my little satester for visual analysis. We use mailscanner/mailwatch and I would like to be able to just click once on a message in mailwatch and be looking at it in satester. To me, that would be cool.
- lint check the cf file collection locally be calling spamassassin - start/stop/status check the local spamd (its stopped except when testing rule changes - move cf files to the local /etc/mail/spamassassin and restart spamd - run selected messages through spamc/spamd showing SA generated headers or - run selected messages through spamc/spamd showing whether the rule under test fires - run a full regression test that displays the messages that AREN'T flagged as spam - load the current cf file collection into my production mail server and restart spamd. I don't pretend this is the best approach, but it works for me and has also been used to test, develop and control the installation of SA plugins.
I like your approach and thanks again for sharing. It definitely gives me some ideas on possible directions to proceed.
Allen
Hopefully this shows that you can run spamc/spamd anywhere, that it doesn't need to be associated with an MTA for rule development and testing and that the test setup can be quite simple - certainly no more complex than you'd use to develop any other single-purpose server. Martin