Spam filtering is a classic research topic in network security.This paper proposes a new mechanism
which based on the maximum entropy model for spam identification and can finish real-time blocking method in terms of the characteristics of SMTP.Experimental results demonstrate it is effective for spam identification and real-time blocking.