coding antispam

Giganews Newsgroups
Subject: coding antispam
Posted by:  Lucian (
Date: Sun, 17 Dec 2006


I am trying to reduce the spam I get and so far what I understood is
that I should be verifying the email address from the actual spam
email, the field reply-to. I thought of doing this:

1. use TIdDNSResolver and a querytype = [qtMX]. I did that using
various DNS Servers for the Host property, however I am not clear which
exactly DNS server I should use?

2. Anyway, I can get the mail servers from the TMXRecord.

3. With that mail server, I understood I should be using a TIdTCPClient
and than try to: connect to port 25, than send HELLO, MAIL FROM and
RCPT TO commands and examine the results for each of them. If they
return ok than the email addresss would be a valid one and I would
delete any other email having invalid an email address.

However, hardcoding port 25 into the equation is not realy a solution
since many servers outthere probably don't use that.

Anyone knows how I can solve this?