Is there a way to determine if the given message is a spam? For example those who posts on forums and advertise their own sites for various products.
There are many ways, non of which are fool proof.
The current technology that achieves the best results is bayesian inference for statistical analysis.