Email Archive program

  • Thread starter Thread starter Allen
  • Start date Start date
A

Allen

I am interested in writing and email archiving program. Does anybody have
any pointers to info about this type of project?

TIA

--
ats@jbex

When an old lady got hit by a truck
I saw the wicked gleam in your eyes

Adam and The Ants - Whip In My Valise
 
Allen said:
I am interested in writing and email archiving program. Does anybody
have any pointers to info about this type of project?


If I hadn't an idea of how to do something, I wouldn't want to do it.


Armin
 
Allen said:
I am interested in writing and email archiving program. Does anybody
have any pointers to info about this type of project?


If I hadn't an idea of how to do something, I wouldn't want to do it.


Armin
 
Allen said:
I am interested in writing and email archiving program. Does anybody have
any pointers to info about this type of project?

For what mail server, or mail agent?

--
 
Allen said:
I am interested in writing and email archiving program. Does anybody have
any pointers to info about this type of project?

For what mail server, or mail agent?

--
 
For what mail server, or mail agent?

We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.
--
ats@jbex

Don't believe them
Don't believe them
Question everything you're told

SLF - Suspect Device
 
For what mail server, or mail agent?

We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.
--
ats@jbex

Don't believe them
Don't believe them
Question everything you're told

SLF - Suspect Device
 
Allen said:
We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.

Ok, I asked because most mail systems has a way to "hook" into the
process. We write our own mail server with our own hooks, so I am not
100% familiar with the details of EXCHANGE, but I know it has it.

Lets start by understanding the mail flow.

Lets used a legend here:

MUA - mail user agent (OE, Tbird, Eudura, any mail agent, etc)

MTA - mail transfer agent, general label for receiver or sender
generally viewed as ROUTER

MSA - mail submission agent, MTA that owns the user (user login)

MDA - mail destination agent, MTA where recipient is located

From point to point, the typical topology is:

MUA --> | MSA --> MTA | --> | MDA --> [storage] | --> MUA
Sender Domain Receiver Domain

Most mail servers have MSA, MTA, MDA behavior, so you could do the
HOOK into the MSA (OUT) and HOOK into MDA (IN). In general its the
same because the ROUTER determines if its IN or OUT:

Incoming Mail --> MTA

If the mail is for a LOCAL user, the MTA is behaving as a
MDA.

Incoming mail --> MDA --> Storage for Local User

If the mail is for a REMOTE user, the MTA is behaving as a
MSA because the user must login to get authorization to
relay (route) the mail to the outside

Incoming mail --> MSA/MTA --> outgoing --> MDA

So when your Exchange receives the mail, you will know by looking at
the RECIPIENT ADDRESS(es) if they are for LOCAL or REMOTE ROUTING.

SideBar note:

There are some legal considerations of what your can do with
passthru mail (mail that your system is relaying to others,
not meant for a local user). Storage is one thing, by it can
raise privacy concerns. Using this information to your advantage
unbeknowst to the user parties involved can and has raised
legal complaints. It was against the law but the "points" of
ownership has been argue (I own the machine, it passes thru
me, therefore I haver ownership rights the mail, this was
the FACEBOOK argument last month).

What is SMTP?

When mail comes in, you have 5-6 basic commands:

EHLO or HELO sender_computer_name
AUTH scheme if the user is going to login
MAIL FROM:<sender_address>
RCPT TO:<recipient_address>
DATA
... mail transfer ....
QUIT

How you hook into the process depends on the what the mail server
offers.

M1) Hook into DATA, at the point you can capture the mail and
do something with it (even reject it)

M2) Reecive the mail, let the steps end, and the mail server
calls your "OnReceive" event

The above is the basic model, and what you need now is to find out how
to HOOK into the Exchange SMTP process is done:

Exchange Event/Sinks

I believe this uses the M2 method. It might use the M1 method. Like I
said, I know of it but not the implementation details.

Google phrases like:

Exchange SMTP Hooks
Exchange Event/Sinks

Here is one I found using C#

http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx

Try googling

Exchange Event Sinks/Hooks using VB.NET

Hope the gives the basic ideas. :-)

--
 
Allen said:
We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.

Ok, I asked because most mail systems has a way to "hook" into the
process. We write our own mail server with our own hooks, so I am not
100% familiar with the details of EXCHANGE, but I know it has it.

Lets start by understanding the mail flow.

Lets used a legend here:

MUA - mail user agent (OE, Tbird, Eudura, any mail agent, etc)

MTA - mail transfer agent, general label for receiver or sender
generally viewed as ROUTER

MSA - mail submission agent, MTA that owns the user (user login)

MDA - mail destination agent, MTA where recipient is located

From point to point, the typical topology is:

MUA --> | MSA --> MTA | --> | MDA --> [storage] | --> MUA
Sender Domain Receiver Domain

Most mail servers have MSA, MTA, MDA behavior, so you could do the
HOOK into the MSA (OUT) and HOOK into MDA (IN). In general its the
same because the ROUTER determines if its IN or OUT:

Incoming Mail --> MTA

If the mail is for a LOCAL user, the MTA is behaving as a
MDA.

Incoming mail --> MDA --> Storage for Local User

If the mail is for a REMOTE user, the MTA is behaving as a
MSA because the user must login to get authorization to
relay (route) the mail to the outside

Incoming mail --> MSA/MTA --> outgoing --> MDA

So when your Exchange receives the mail, you will know by looking at
the RECIPIENT ADDRESS(es) if they are for LOCAL or REMOTE ROUTING.

SideBar note:

There are some legal considerations of what your can do with
passthru mail (mail that your system is relaying to others,
not meant for a local user). Storage is one thing, by it can
raise privacy concerns. Using this information to your advantage
unbeknowst to the user parties involved can and has raised
legal complaints. It was against the law but the "points" of
ownership has been argue (I own the machine, it passes thru
me, therefore I haver ownership rights the mail, this was
the FACEBOOK argument last month).

What is SMTP?

When mail comes in, you have 5-6 basic commands:

EHLO or HELO sender_computer_name
AUTH scheme if the user is going to login
MAIL FROM:<sender_address>
RCPT TO:<recipient_address>
DATA
... mail transfer ....
QUIT

How you hook into the process depends on the what the mail server
offers.

M1) Hook into DATA, at the point you can capture the mail and
do something with it (even reject it)

M2) Reecive the mail, let the steps end, and the mail server
calls your "OnReceive" event

The above is the basic model, and what you need now is to find out how
to HOOK into the Exchange SMTP process is done:

Exchange Event/Sinks

I believe this uses the M2 method. It might use the M1 method. Like I
said, I know of it but not the implementation details.

Google phrases like:

Exchange SMTP Hooks
Exchange Event/Sinks

Here is one I found using C#

http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx

Try googling

Exchange Event Sinks/Hooks using VB.NET

Hope the gives the basic ideas. :-)

--
 
Allen said:
We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.

Ok, I asked because most mail systems has a way to "hook" into the
process. We write our own mail server with our own hooks, so I am not
100% familiar with the details of EXCHANGE, but I know it has it.

Lets start by understanding the mail flow.

Lets used a legend here:

MUA - mail user agent (OE, Tbird, Eudura, any mail agent, etc)

MTA - mail transfer agent, general label for receiver or sender
generally viewed as ROUTER

MSA - mail submission agent, MTA that owns the user (user login)

MDA - mail destination agent, MTA where recipient is located

From point to point, the typical topology is:

MUA --> | MSA --> MTA | --> | MDA --> [storage] | --> MUA
Sender Domain Receiver Domain

Most mail servers have MSA, MTA, MDA behavior, so you could do the
HOOK into the MSA (OUT) and HOOK into MDA (IN). In general its the
same because the ROUTER determines if its IN or OUT:

Incoming Mail --> MTA

If the mail is for a LOCAL user, the MTA is behaving as a
MDA.

Incoming mail --> MDA --> Storage for Local User

If the mail is for a REMOTE user, the MTA is behaving as a
MSA because the user must login to get authorization to
relay (route) the mail to the outside

Incoming mail --> MSA/MTA --> outgoing --> MDA

So when your Exchange receives the mail, you will know by looking at
the RECIPIENT ADDRESS(es) if they are for LOCAL or REMOTE ROUTING.

SideBar note:

There are some legal considerations of what your can do with
passthru mail (mail that your system is relaying to others,
not meant for a local user). Storage is one thing, by it can
raise privacy concerns. Using this information to your advantage
unbeknowst to the user parties involved can and has raised
legal complaints. It was against the law but the "points" of
ownership has been argue (I own the machine, it passes thru
me, therefore I haver ownership rights the mail, this was
the FACEBOOK argument last month).

What is SMTP?

When mail comes in, you have 5-6 basic commands:

EHLO or HELO sender_computer_name
AUTH scheme if the user is going to login
MAIL FROM:<sender_address>
RCPT TO:<recipient_address>
DATA
... mail transfer ....
QUIT

How you hook into the process depends on the what the mail server
offers.

M1) Hook into DATA, at the point you can capture the mail and
do something with it (even reject it)

M2) Reecive the mail, let the steps end, and the mail server
calls your "OnReceive" event

The above is the basic model, and what you need now is to find out how
to HOOK into the Exchange SMTP process is done:

Exchange Event/Sinks

I believe this uses the M2 method. It might use the M1 method. Like I
said, I know of it but not the implementation details.

Google phrases like:

Exchange SMTP Hooks
Exchange Event/Sinks

Here is one I found using C#

http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx

Try googling

Exchange Event Sinks/Hooks using VB.NET

Hope the gives the basic ideas. :-)

Thanks for these pointers. They will be of great help. With regards mail
relayed through our servers, we have relaying turned off so that is not a
concern.

Thanks

--
ats@jbex

No mercy for what we are doing
No thought to even what we have done
We don't need to feel the sorrow
No remorse for the helpless one

Metallica - No Remorse
 
Allen said:
We use Exchange Server with Outlook clients. Basically, I want to
intercept and store a copy of every email in and out as a read only copy on
a different server.

Ok, I asked because most mail systems has a way to "hook" into the
process. We write our own mail server with our own hooks, so I am not
100% familiar with the details of EXCHANGE, but I know it has it.

Lets start by understanding the mail flow.

Lets used a legend here:

MUA - mail user agent (OE, Tbird, Eudura, any mail agent, etc)

MTA - mail transfer agent, general label for receiver or sender
generally viewed as ROUTER

MSA - mail submission agent, MTA that owns the user (user login)

MDA - mail destination agent, MTA where recipient is located

From point to point, the typical topology is:

MUA --> | MSA --> MTA | --> | MDA --> [storage] | --> MUA
Sender Domain Receiver Domain

Most mail servers have MSA, MTA, MDA behavior, so you could do the
HOOK into the MSA (OUT) and HOOK into MDA (IN). In general its the
same because the ROUTER determines if its IN or OUT:

Incoming Mail --> MTA

If the mail is for a LOCAL user, the MTA is behaving as a
MDA.

Incoming mail --> MDA --> Storage for Local User

If the mail is for a REMOTE user, the MTA is behaving as a
MSA because the user must login to get authorization to
relay (route) the mail to the outside

Incoming mail --> MSA/MTA --> outgoing --> MDA

So when your Exchange receives the mail, you will know by looking at
the RECIPIENT ADDRESS(es) if they are for LOCAL or REMOTE ROUTING.

SideBar note:

There are some legal considerations of what your can do with
passthru mail (mail that your system is relaying to others,
not meant for a local user). Storage is one thing, by it can
raise privacy concerns. Using this information to your advantage
unbeknowst to the user parties involved can and has raised
legal complaints. It was against the law but the "points" of
ownership has been argue (I own the machine, it passes thru
me, therefore I haver ownership rights the mail, this was
the FACEBOOK argument last month).

What is SMTP?

When mail comes in, you have 5-6 basic commands:

EHLO or HELO sender_computer_name
AUTH scheme if the user is going to login
MAIL FROM:<sender_address>
RCPT TO:<recipient_address>
DATA
... mail transfer ....
QUIT

How you hook into the process depends on the what the mail server
offers.

M1) Hook into DATA, at the point you can capture the mail and
do something with it (even reject it)

M2) Reecive the mail, let the steps end, and the mail server
calls your "OnReceive" event

The above is the basic model, and what you need now is to find out how
to HOOK into the Exchange SMTP process is done:

Exchange Event/Sinks

I believe this uses the M2 method. It might use the M1 method. Like I
said, I know of it but not the implementation details.

Google phrases like:

Exchange SMTP Hooks
Exchange Event/Sinks

Here is one I found using C#

http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx

Try googling

Exchange Event Sinks/Hooks using VB.NET

Hope the gives the basic ideas. :-)

Thanks for these pointers. They will be of great help. With regards mail
relayed through our servers, we have relaying turned off so that is not a
concern.

Thanks

--
ats@jbex

No mercy for what we are doing
No thought to even what we have done
We don't need to feel the sorrow
No remorse for the helpless one

Metallica - No Remorse
 
Allen said:
Thanks for these pointers. They will be of great help. With regards mail
relayed through our servers, we have relaying turned off so that is not a
concern.

My pleasure. Mail development is one of my passions. :-)

You mean you have the OPEN RELAY disabled (good) and for your users to
send mail to outside users, your users must authenticate with the server.

Out of curiosity, I thought Exchange had an archive facility per
domain, per user? Or that an add-on product? or more advanced
version? The user may have archive features enabled which include the
time a message is expired and 'archived'.

Anyway, glad I can help.

--
 
Allen said:
Thanks for these pointers. They will be of great help. With regards mail
relayed through our servers, we have relaying turned off so that is not a
concern.

My pleasure. Mail development is one of my passions. :-)

You mean you have the OPEN RELAY disabled (good) and for your users to
send mail to outside users, your users must authenticate with the server.

Out of curiosity, I thought Exchange had an archive facility per
domain, per user? Or that an add-on product? or more advanced
version? The user may have archive features enabled which include the
time a message is expired and 'archived'.

Anyway, glad I can help.

--
 
Back
Top