Go here and find 'Slap'. I think this should be what you're after.
Word of caution though. Anytime you reply to a port hit or answer spam emails, all you are doing is giving the perps the info they want which is that your IP address is a live one. You could be 'opening a can of worms' if you send a reply by pinging or using Slap.