Adaptive spam filter algorithm