On 7/16/2015 8:00 PM, a...@satester.com wrote:
Can you elaborate on the macros any?
Sure. Mutt is a very powerful little mail client and it's perfect for
me for analysis of mbox files.
Creating a .muttrc file, you can add some macros like ctrl-y (why is
this hitting KAM ;-) ):
macro index \cy "<pipe-message>spamassassin -t -D 2>&1 | grep -e KAM --e
Content\\ analysis<enter>\n" "Test Message with Spamassassin for KAM Rules"
or prompt for a string to match with ctrl-v
macro index \cv "<pipe-message>spamassassin -t -D 2>&1 | grep -i -e
Content\\ analysis -e " "Test Message with Spamassassin for Rules
Matching Search"
ctrl-o to look at everything:
macro index \co "<pipe-message>spamassassin -t -D<enter>\n" "Test
Message with Spamassassin for all Rules"
And when you view a message I can hit ctrl v to sha1sum an attachment
for example:
macro attach \cv "<pipe-entry>sha1sum<enter>\n" "sha1sum on an attachment"
Hope this helps and perhaps you can edit our wiki and add any ideas you
find useful for others!
After searching, I'm still having a hard time understanding
conventional SA rule checking/debugging methods. I've been going my
own route so far, but I would like to have a basic understanding how
most folks do it. I'm not finding a much to get me started. (Guides on
regression_tests.cf etc.)
I don't know that I've ever ready any conventions ;-) A lot of what I
do is likely just how I find it good to work
regression_tests.cf is a file you edit with a rule name and strings it
should and should not hit on.
You then run make test and will be told if your rule hits/doesn't hit as
expected. Off-hand not sure exactly which test does it but once you
figure that out you can do prove -v t/testname.t and run just that test.
Without knowing more at this point, do you think there may some
usefulness to a tool that responds to keystrokes/keyphrases in real
time like satester/rubular do? That is why I found the Rubular site
so handy for checking my regex patterns in the first place and was
inspired to write satester. For example, as I bang out a new rule, I
can vary the sample text very quickly to check the pattern.
Add/change/delete a character here or there and see what happens
instantly. But with satester just on a larger scale. Sorry, not trying
to spam my rule tool but just gain insight on where and if it is truly
useful.
I think it is useful for new rule testers. I try and automate my stuff
as much as possible and these days I can pickup spam patterns in my
sleep...
Anyway, a link or two for (basic|convention|intended) rule checking
might be enough to get me started and more familiar with regular
methods of checking/debugging.
Sorry, only thing I would be doing is a Google search... I'm not sure
such a document exists though it should. Perhaps some of the other
people who write rules can share some of their tricks?
Regards,
KAM