473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

intercepting smtp email

I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott
Jul 18 '05 #1
13 3939
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

..r!kard

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott

Jul 18 '05 #2
Or maybe you can find it here: http://twistedmatrix.com

Basically i think you have to write your own SMTP-server if nobody else
hasn't done it already...

..r!kard
".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

.r!kard

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott


Jul 18 '05 #3
Even more results of Googeling:
http://www.vex.net/parnassus/apyllo.py?so=d&find=SMTP

..r!kard

".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
Or maybe you can find it here: http://twistedmatrix.com

Basically i think you have to write your own SMTP-server if nobody else
hasn't done it already...

.r!kard
".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

.r!kard

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott



Jul 18 '05 #4

".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

.r!kard
I think he's asking for a mini-firewall. In other words, is something
he doesn't know about sending messages on port 25?

John Roth

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott


Jul 18 '05 #5
Now you got me corious, is that possible in python?
Possibly by extending it with som C of course...

..r!kard
"John Roth" <ne********@jhrothjr.com> wrote in message
news:vn************@news.supernews.com...

".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

.r!kard


I think he's asking for a mini-firewall. In other words, is something
he doesn't know about sending messages on port 25?

John Roth

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.

Any help is greatly appreciated.

Thanks,
Scott



Jul 18 '05 #6

".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
Now you got me corious, is that possible in python?
Possibly by extending it with som C of course...
I've got no idea where you would put that kind of hook
in Windows.

John Roth

.r!kard
"John Roth" <ne********@jhrothjr.com> wrote in message
news:vn************@news.supernews.com...

".r!kard" <rn**@algonet.se> wrote in message
news:bl**********@green.tninet.se...
I'm no star at this but maybe you can check the code in
http://www.gnu.org/software/mailman

.r!kard


I think he's asking for a mini-firewall. In other words, is something
he doesn't know about sending messages on port 25?

John Roth

"Scott Hathaway" <sc***@hcsprogramming.com> wrote in message
news:c6**************************@posting.google.c om...
> I want to write an NT service that will intercept any outgoing smtp
> traffic, like Norton Antivirus does. Can anyone tell me how I can do > something like this in Python? I do not know how to intercept the
> outgoing traffic, specifically.
>
> Any help is greatly appreciated.
>
> Thanks,
> Scott



Jul 18 '05 #7
Woldn't this require something like winpcap? I know some folks have
attempted to call winpcap from within Python, but I don't know if they
succeeded. If my memory serves well, it was Gerhard Häring who did
something with it.

I would also be interested in something similar, but then for MSN
traffic. Decoding the MSN Messenger stream is not the problem, capturing
the traffic from a promiscous nic in Python is where I get stuck.
Now you got me corious, is that possible in python?
Possibly by extending it with som C of course...

I've got no idea where you would put that kind of hook
in Windows.

John Roth

<snip>
>I want to write an NT service that will intercept any outgoing smtp
>traffic, like Norton Antivirus does. Can anyone tell me how I can do>something like this in Python? I do not know how to intercept the
>outgoing traffic, specifically.


Jul 18 '05 #8
Google rules:
http://home.student.utwente.nl/g.v.berg/btk/
http://pycap.sourceforge.net
http://www.ghaering.de/python/unsupported/pylibpcap/
http://aspn.activestate.com/ASPN/Mai...n-list/1578279

*pheew* that was some real hardcore Googeling I can tell you...

..r!kard
"Rudy Schockaert" <ru*************@pandora.be> wrote in message
news:5U*********************@phobos.telenet-ops.be...
Woldn't this require something like winpcap? I know some folks have
attempted to call winpcap from within Python, but I don't know if they
succeeded. If my memory serves well, it was Gerhard Häring who did
something with it.

I would also be interested in something similar, but then for MSN
traffic. Decoding the MSN Messenger stream is not the problem, capturing
the traffic from a promiscous nic in Python is where I get stuck.
Now you got me corious, is that possible in python?
Possibly by extending it with som C of course...

I've got no idea where you would put that kind of hook
in Windows.

John Roth

<snip>
>>I want to write an NT service that will intercept any outgoing smtp
>>traffic, like Norton Antivirus does. Can anyone tell me how I can

do
>>something like this in Python? I do not know how to intercept the
>>outgoing traffic, specifically.

Jul 18 '05 #9
It seems you've looking where I've earlier this week ;-) I'm affraid
there's nothing for Python on Windows yet.

..r!kard wrote:
Google rules:
http://home.student.utwente.nl/g.v.berg/btk/
This one is for unices only, no Windows.
http://pycap.sourceforge.net
From the Todo.txt file:

* Make this work on Windows. I briefly struggled with compiling using
VC7 under Win XP
using winpcap_ and LibnetNT_. No luck, and was getting some rather
interesting errors
about missing header files which appeared to be where they should be :-/.
http://www.ghaering.de/python/unsupported/pylibpcap/
This could be a candidate if it were available for Python 2.3.x . It's
for Python 2.2 only now.
http://aspn.activestate.com/ASPN/Mai...n-list/1578279 Further down the thread:
http://aspn.activestate.com/ASPN/Mai...n-list/1578500
Gerhard Häring wrote: http://www.ghaering.de/python/unsupported/pylibpcap/
I'll check if the sniff.py example will work, too.
It doesn't look like it does. I may have introduced a subtle bug or some
more changes are needed to make it useful under win32.

If anybody wants to continue the win32 port, it's open source and you
can continue where I stopped.

-- Gerhard

Out of luck again :-(

*pheew* that was some real hardcore Googeling I can tell you...

.r!kard

<snip>
>>>I want to write an NT service that will intercept any outgoing smtp
>>>traffic, like Norton Antivirus does. Can anyone tell me how I can

do

>>>something like this in Python? I do not know how to intercept the
>>>outgoing traffic, specifically.



Jul 18 '05 #10
Thanks for the suggestions. My second alternative is to simply use the api
in outlook and be bound to that client. Worse things have happened.

:)

Scott

"Rudy Schockaert" <ru*************@pandora.be> wrote in message
news:7t*********************@phobos.telenet-ops.be...
It seems you've looking where I've earlier this week ;-) I'm affraid
there's nothing for Python on Windows yet.

.r!kard wrote:
Google rules:
http://home.student.utwente.nl/g.v.berg/btk/
This one is for unices only, no Windows.
http://pycap.sourceforge.net


From the Todo.txt file:

* Make this work on Windows. I briefly struggled with compiling using
VC7 under Win XP
using winpcap_ and LibnetNT_. No luck, and was getting some rather
interesting errors
about missing header files which appeared to be where they should be

:-/.
http://www.ghaering.de/python/unsupported/pylibpcap/


This could be a candidate if it were available for Python 2.3.x . It's
for Python 2.2 only now.
http://aspn.activestate.com/ASPN/Mai...n-list/1578279

Further down the thread:
http://aspn.activestate.com/ASPN/Mai...n-list/1578500
Gerhard Häring wrote:
> http://www.ghaering.de/python/unsupported/pylibpcap/
> I'll check if the sniff.py example will work, too.


It doesn't look like it does. I may have introduced a subtle bug or some
more changes are needed to make it useful under win32.

If anybody wants to continue the win32 port, it's open source and you
can continue where I stopped.

-- Gerhard

Out of luck again :-(

*pheew* that was some real hardcore Googeling I can tell you...

.r!kard

<snip>

>>>>I want to write an NT service that will intercept any outgoing smtp
>>>>traffic, like Norton Antivirus does. Can anyone tell me how I can

do

>>>>something like this in Python? I do not know how to intercept the>outgoing traffic, specifically.


Jul 18 '05 #11
On Tue, 30 Sep 2003 19:04:35 GMT, Rudy Schockaert
<ru*************@pandora.be> wrote:

http://winpcap.polito.it/

Grab SWIG and you can probably get something working in a few hours.
Last time I did this it took about 40 minutes to get working, and a
few hours to push it out so others could use it as well.

Extra bonus points for making it use either winpcap or libpcap
depending on the OS built on. ;)

-Geoff
It seems you've looking where I've earlier this week ;-) I'm affraid
there's nothing for Python on Windows yet.

.r!kard wrote:
Google rules:
http://home.student.utwente.nl/g.v.berg/btk/


This one is for unices only, no Windows.
http://pycap.sourceforge.net


-Geoff Howland
http://ludumdare.com/
Jul 18 '05 #12
Scott Hathaway wrote:

I want to write an NT service that will intercept any outgoing smtp
traffic, like Norton Antivirus does. Can anyone tell me how I can do
something like this in Python? I do not know how to intercept the
outgoing traffic, specifically.


Normally a mail program does not connect directly to the receiving
server, but sends all mail via a "relay" server which talks SMTP.
For example, if you have an ISP connection, your mail would go through
their server, which would forward it to the appropriate final destination.

Why do you need to *intercept* SMTP traffic, when you could simply
modify the "outgoing server" setting for your mail program, and then
run a proxy SMTP server which would receive your mail, do the processing
you want, then forward the results to the original server?

-Peter
Jul 18 '05 #13
Peter Hansen fed this fish to the penguins on Wednesday 01 October 2003
10:46 am:

Why do you need to *intercept* SMTP traffic, when you could simply
modify the "outgoing server" setting for your mail program, and then
run a proxy SMTP server which would receive your mail, do the
processing you want, then forward the results to the original server?
I vaguely recall a comment in this thread to the effect that the
original poster wanted a method that was transparent to any mail client
in use -- ie, users would /not/ have to change their configuration.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Bestiaria Home Page: http://www.beastie.dm.net/ <
Home Page: http://www.dm.net/~wulfraed/ <


Jul 18 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy Turner | last post by:
Hi, I'm trying to setup PHP so it will use a remote SMTP server. I'm going to sound like a newbie but how? I know you need to alter php.ini, change SMTP from localhost to the SMTP server and the...
2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us†page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.