|
-
May 1st, 2004, 11:13 AM
#1
How to listen to SMTP trafic
I'm programing an email "sidekick" program. The program needs to automatically collect the addresses of anyone I email to from my normal email program. I figure I need to listen to my outgoing smpt traffic and pull out the "To:", "CC:" and "BCC" addresses. I plan to leave the program running all the time. It checks my mail for me and deletes any mail that isn't from my whitelist. But I don't want to have to add addresses to my whitelist manually. I'm hoping on giving this program to my friends so they can use it with whatever email program they are using.
I've tried a few sniffer programs before, but they don't pick up what I need.
If anyone out there knows of some code that will help me out, I'd be thankfull.
-
May 2nd, 2004, 11:51 AM
#2
There is no real code that would suit your needs.
But I had programmed a Mail server in Visual Basic so I can give you a clue how to handle that problem.
You could program a SMTP gateway. Something similar to a simple tunnel that just listens to connections on the SMTP port (25) and forwards it on another winsock connection to your email provider.
you program has to implement parts of the SMTP protocol to handle that task.
You just need to read the SMTP rfc and implement that into your program.
If that is done you just have to change your outgoing server to the address of where the program is running, and emails will be sent first to you program. you may scan the mail for To:, CC:, BCC etc and if you want to for viruses (commandline virus scanner) and then send it.
same thing would work for POP, but the POP protocol is easier to implement 
greetings UNI
-
May 2nd, 2004, 12:17 PM
#3
Thanks Illuvatan,
I'll try that. Of course I would like something simpler. But if there is no easier way to do it, I've got no choice.
I'll keep checking back to see if anyone else has an idea.
Now all I have to do is find out how to program a SMTP gateway.
Thanks.
Last edited by Magison; May 2nd, 2004 at 12:21 PM.
-
May 2nd, 2004, 05:51 PM
#4
probably not the simplest case.. but that would work with every mail client out there.
You could just specify on Microsoft Outlook and program a plugin for that.. but I don't really know how good these plugins work and they are not portable to let's say a linux mail client.
using a SMTP gateway would work with linux as well, you just have to setup a machine somewhere on the internet that runs the gateway and you can use whatever email client or platform you want to use it
greetings UNI
-
May 3rd, 2004, 08:42 PM
#5
Sounding less and less like the way I want to go.
I suppose I can just have users enter the whitelist in manually. I wanted this program to be as simple as possible.
I'll keep looking, but it looks like I may have to do without.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|