David said,
As I discussed when similar code came up in another thread, I don't
think that the trailing newline will cause a problem, and the second
condition [to strip the trailing newline from $MATCH] is likely unnecessary:
To which I rejoined,
Frankly, I don't believe that (though I haven't tested it or looked at the
source code) and, if your statement is true, I would consider it a major bug!
And David replied:
Or maybe it's a bug if this drops the trailing newline:
:0
* text\/more_text$
{ variable="$MATCH" }
but not if this does:
:0
* text\/more_text$
{ variable=$MATCH }
Actually, I feel just the opposite. I would be willing to accept it if the
first one would remove the newline, but definitely not the second one. If you
assign the contents of a variable to another variable, it should not go
mucking around with the contents. Whoever heard of a computer language where,
after you do the assignment A = B, the assertion A == B (equality test) would
fail depending upon the contents of B? That's just asinine. (Granted, it may
be debatable whether the procmailrc syntax is a computer languange.)
Later,
Ed