Solved

Filtering packets and detecting email messages

Posted on 2003-12-06
5
229 Views
Last Modified: 2011-09-20
Hello, I am an intermediate c++ programmer. What I am looking to do is create a program that basically intercepts e-mail coming in, like a spam filter.

For example, say Microsoft Outlook (or any client) begins to check for new mail. I want to create a program that watches any packets coming in, and if those packets are part of an email, it will filter the email and either continue to pass the packets on to the email client, or dump them.

I really am not sure where to start, and I am looking for someone to point me in the right direction. Can this be done with any part of MFC? Help Help Help!
0
Comment
Question by:jtysco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 9889916
I suspect that this can be done with MFC, but you are in the wrong topic area. This is probably better suited for one of the Windows areas. You want to use MAPI (Messaging API).

This article has some information about how a virus checker does it's job (it does not intercept the messages, it runs after the message is delivered to the user's mail box and scans it from the mailbox).

This page has information about how you would use MAPI: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mapi/html/_mapi1book_mapi_programming_basics.asp (see the navigation links on the left side).
0
 
LVL 30

Accepted Solution

by:
Axter earned 125 total points
ID: 9890662
The only way I can think of that you can do this before the Mail program gets the data is to replace the windows Winsock DLL with your own DLL that would intercept socket functions.

But this would require you to create a DLL that has all the function that are in the winsock.dll.  Then rename the winsock.dll, and call the renamed winsock.dll functions from your replaced functions.

You can then monitor all the data coming in and out via socket functions.

You can intercept the data before a mail program or MAPI receives it.
0
 
LVL 30

Expert Comment

by:Axter
ID: 9890666
FYI:
This can be done with or without MFC.
And (IMHO) the topic is not outside of the scope of this topic area.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question