Listening to incoming and outgoing email

Hi,

I would like to determine if there is a way to listen on the email ports of a server for incoming and outgoing email messages, without interfering with the already existing mail server processing. I would like to retrieve some information from certain incoming and outgoing emails and save it to database.

I believe that if I use the JavaMail API, then I'm in effect reading the emails as they are received by the mail server. My aim is to read the emails prior to them reaching the server application.

Can anyone tell me if this is possible in java?

Thanks!

[594 byte] By [mrmirmira] at [2007-11-26 17:53:54]
# 1
You should capture network packets, assemble TCP stream from fragments, detect POP3 and SMTP then save captured data. Very easy.
Michael.Nazarov@sun.coma at 2007-7-9 5:06:56 > top of Java-index,Core,Core APIs...
# 2
Thanks for your reply. I'm glad that there is a way of doing this in Java. But how do I capture the network packets? Do I use sockets to listen to a specific port?
mrmirmira at 2007-7-9 5:06:56 > top of Java-index,Core,Core APIs...
# 3
No, java sockets will not help you. You should use special capturing library.
Michael.Nazarov@sun.coma at 2007-7-9 5:06:56 > top of Java-index,Core,Core APIs...