Belette wrote:
hello there !
IS there a way to get SA scores using a shell command :
e.g. :
# spam -score < mail.txt
# .045
depends on which headers you SA adds.
*) X-Spam-Score
(usually added with:
add_header all Score _SCORE_
).
If it looks like:
X-Spam-Score: -0.1
then:
sa_score=`grep -m 1 "^X-Spam-Score: " $file | sed 's/X-Spam-Score: //'`
*) with a header of the form:
X-Spam-Status: No, score=-99.999 required=5 tests=[HTML_MESSAGE=0.001,
USER_IN_WHITELIST=-100]
sa_score=`grep -m 1 "^X-Spam-Status: $file |\
awk -F"[ =]" '{print $4;}'`
you can "sed" if you prefer (sed 's/.* score=//' | sed 's/ .*//' instead
of the awk cmd).
adjust to match your headers.