Spam filtering based on Bayesian algorithm