?
Solved

Filtering packets and detecting email messages

Posted on 2003-12-06
5
Medium Priority
?
230 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 500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

800 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