Preventing Email Spam? [closed]
开发者_如何学C
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this questionI am working on an email program and I want to add a basic way to detect spam based on the domain/sender of the mail. One service that I was looking at was gossip (http://gossip-project.sourceforge.net/) but I don't want to go to the hassle of setting up a dedicated Gossip server. I know that there are a lot of email blacklists (DNSBL's) and stuff out there that can give you an estimate of whether or not an email is spam based on the domain it was sent from. I'm wondering if anyone knows of one that I can just query from within a program by passing it the sender's domain and having it return the likelihood that the email is spam. I don't want a service that requires me to set up a server for it.
Anti-Spam Blacklists do list only IPs not domains. They can't list domains (of the sender) as the sender address can be (and usually is) forged.
So you can either lookup an IP in a DNSBL from where the mail was originating. Or you have to determine the probability of spam by analyzing the mail content. The latter is "expensive" in CPU cycles and other resources. In both cases you do not need a special server for that.
The better solution to prevent spam is at the server level. Block the mail before it enters your mail system. Then you don't have to mess with mail filters.
精彩评论