Sam Varshavchik said the following on 27/09/06 08:20:
Vini Engel writes:
Hi guys,
I am trying to concatenate the subject of an email message with
spamassassin's score. So far I have managed to put the the score in a
variable and the actual subject in another but merging the subject
variable with the score variable isn't working.
"Isn't working" is completely meaningless, and fails to carry any hint
as to the actual problem.
The problem was when trying to concatenate the variables, I was getting
always the first variable.
SUBJECT="$MATCH2 $SCORE"
Was giving me just the first variable not the first + the second.
Below is my code:
if (/score=(.*?)\s/)
{
SCORE=$MATCH1
if (/^Subject: !.*/:h)
{
SUBJECT="$MATCH2 $SCORE"
xfilter "reformail -I \"Subject: $SUBJECT\""
}
}
Any hints on what I am missing will be greatly appreciated!
The only thing you're probably missing is that you are using an old
version of maildrop, and should update to the current version, that uses
an updated regexp syntax.
It is not the very latest one but it is the one before the latest.
Other than that, everything looks correct, and "isn't working" is not a
very useful problem report.
I think the "isn't working" was reasonably well explained. The variables
were not being concatenated and I didn't find anything about
concatenating variables in the docs. So I asked the question...
Vini