Hi,
I'm writing a pretty involved spam filter in awk ... so far so good, for the most part.
Basically, the program reads in a queued mail file, stores each line in an array:
tempMail[i++] = $0
... then scans each line against several spam regexps, and then in the END portion of the script...