On 10/9/2015 12:07 AM, AK wrote:
On 20/09/15 03:07, Dave Funk wrote:
Notes:
1) Due to SA pre-processing collapsing body into one long line,
cannot match on '^' repeatedly, need to look for '\n' as line break
indicator.
Find start of a line and then following repeats of ".\n"
Dave,
I've been creating my own regular expressions (*with Regex Buddy
despite some nay sayers here*) and they are working well. However,
there are a few that seem to not hit on my test messages. In order to
troubleshoot further, I need to see the message the way SpamAssassin
see's it; is there a tool that will let me convert my saved email (*I
view the email source in Thunderbird and save to files for testing*)
into the rawbody format so I can test my regex?
This sounds useful to me. There have been a few cases where it would
have been useful to me to see exactly what SA is doing to the message
prior to checking the rule.
A utility which could output the text tested against for HEADER, BODY,
RAWBODY, etc would be useful. What might be more useful to those of us
with a bit of Perl knowledge would be a function call that would return
the strings so we can directly test the regex against the string with a
small Perl program where we could run it with the debugger or capture
and print parts of the match to make sure it's doing what we think it
is. Is this already possible with the API?
--
Bowie