I have been developing an ANTI SPAM system that I call NSA (No Spam Accepted) written in C (going on for 10 years).
My system works on net not content filtering & I have always wanted to add a feature which tries to open a socket to the inbound SMTP server (port 25), while it is attempting to deliver mail to our servers (thus in real time).
I have tried googling:
c program open socket port 25 -command -linux -c# -c++ -perl -excel -php -java -ce -script -vb -autostart.bat
plus many other variations, but no joy. Does anyone have a code snippet that would get me started?
I do not want to 'communicate' with the SMTP server. I just want to confirm that the socket is live. I have found over the years that programs are sending the spam, not SMTP servers. Thus, you cannot telnet to the inbound server & have an SMTP conversation - HELO ...