Solved

Filtering packets and detecting email messages

Posted on 2003-12-06
5
228 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maze travler 6 66
c++ how to tell if the progra is ctl or mfc atl ect 6 99
Create a path if not exists 7 108
object oriented programming comparison 5 86
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

733 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