Beholder wrote:
Hello,
I want to write a spam filter, and for that I have to
listen on the incoming mail port in order to catch the
arriving mail messages (from any server) and filter them.
How can I listen on a port and catch any transportation
going through it?
Thanks.
Why do you have to do that?
Why don't you use an Outlook Interop, and parse through the mail.Body
with a regex parser, looking for spam words. Then if the mail meets
criteria, delete, archive or flag it.
In a Linux/sendmail spam filter they have it arrive on sendmail, then
use a parser called procmail and pass the mail through it to filter and
then forward based on spam rules.