Click here to Skip to main content
16,019,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all
I have a problem regarding blocking of email from going.let suppose i sent a email to a recipient which is among the list of banned recipients.So is there any way by which i could block the email from delivering to that recipient by using any kind of email filter application.
please do help the needy..
nay sample code would be a great help.
thanks
Posted

This can be done using a local SMTP server providing such filtering capabilities or a filtering interface (invalid mails are rejected):

  • Setup the SMTP server on a machine in your local network.
  • Configure the server to forward all mails using one or more accounts of your mail provider(s).
  • Configure all mail clients to use your SMTP server for outgoing mail.
  • Configure the filters of the SMTP server.
  • Optional configure your router or firewall to deny outgoing connections to SMTP port 25 from all local addresses except those of your SMTP server to avoid bypassing your server.

Sample code would implement a simple forwarding only SMTP server. I would look for a ready to use one with filtering capabilities.

If you decide to do so, read about SMTP and test it locally before connecting to the net. You may be in trouble with wrong setups that establish a mail loop.
 
Share this answer
 
Comments
vaibhavbvp 28-Mar-12 6:12am    
thank Jochen Arndt for your kind response.i guess that setting a local smtp would not be of help when the email would be going from teh web email clients like gmail,yahoomail so in that case it would be a problem.
Jochen Arndt 28-Mar-12 7:06am    
Of course. When using a web mailer you have no control, because you are pushing data to the web mail server which will generate and send the mail.
vaibhavbvp 29-Mar-12 3:16am    
yeah that's what is my problem,i want to ban it from web-mail .any ways thanks for your kind reply..
yes finally got some hint how it could be tackled.it can be tackled by making a CGi kind of application.that would be a relevant solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900