RE: Exchange Event Sink for copying mails

  • From: "Deshwal, Chand" <CDD@xxxxxxxxxxxxx>
  • To: "[ExchangeList]" <exchangelist@xxxxxxxxxxxxx>
  • Date: Tue, 26 Apr 2005 14:15:12 +0530

I had posted the same quite sometime back. Just have a look. In your
case, you have to use *@yourdomain.com instead of specific mailboxes.

 

Chand

************************************************************************
************************************************************************
**************

************************************************************************
************************************************************************
**************

Enabling Per Mailbox Journaling for External E-mails

Well, we all know how to enable message journaling per mailbox store in
Exchange 2003. Its good for compliance purposes, where you need to
maintain all e-mails generated on your mail server(s). This also helps
in case of a server crash, where you are not able to restore your server
back to the original state (Should not happen!). But, what if we want to
perform selective journaling? There are plenty of third party tools
available and they come on a cost. 

There is a free way to do the same, provided, you have at least two
servers or maintain a border server for mail delivery and receipt. This
is achieved by using SMTP Archive Sink, using a small VBSCRIPT.

The script is available for download from OulookExchange
<http://www.outlookexchange.com/articles/glenscales/caudexp.asp>
written by Glanscales. 

 

How to use the script

I assume that you have a two-server scenario, a sort of front-end,
back-end one, where one server hosts all the mailboxes. Mailbox server
forwards all the e-mails to border server. We will register an event
sink on the border server for Outgoing mails for selective mailboxes
(Could be all as well).

We will register another event sink on the mailbox server for Incoming
e-mails for selective mailboxes. 

 

On the border server (For outgoing mails):

                Make a directory, suppose c:\jrnlarchive

                Download
<http://www.outlookexchange.com/articles/glenscales/caudexp.zip>  the
script and save it at c:\jrnlarchive. I assume, you saved the file as
smtpjrnl.vbs

                Edit the script and replace
Monitormailbox@xxxxxxxxxxxxxx <mailto:Monitormailbox@xxxxxxxxxxxxxx>  by
your monitoring mailbox.

                Download
<http://www.microsoft.com/downloads/details.aspx?FamilyId=5D3475BD-6915-
4110-959D-6E4CB233D79D&displaylang=en>  SMTPREG.VBS provided by
Microsoft to register/un-register event sinks. Save this script in the
same directory as above script.

                Open a command prompt and change directory to
c:\jrnlarchive

                Type cscript smtpreg.vbs /add 1 onarrival smtpjrnlOut
CDO.SS_SMTPOnArrivalSink "Mail From=user1@xxxxxxxxxxxxxx
<mailto:From=user1@xxxxxxxxxxxxxx> ; Mail From=user2@xxxxxxxxxxxxxx
<mailto:From=user2@xxxxxxxxxxxxxx> ; Mail from=userN@xxxxxxxxxxxxxx
<mailto:from=userN@xxxxxxxxxxxxxx> " and press enter.

                Type all on one line

                Note: Where userN stands for N number of mailboxes. If
you want to do journaling for all the mailboxes for outgoing e-mais,
then the command will be cscript smtpreg.vbs /add 1 onarrival smtpjrnl
CDO.SS_SMTPOnArrivalSink "Mail From=*@yourdomain.com"

                7. Type cscript smtpreg.vbs /setprop 1 onarrival
smtpjrnlOut Sink ScriptName c:\jrnlarchive\smtpjrnl.vbs

Test it by sending mails from the any of the specified mailboxes.

 

On the Mailbox Server (For incoming mails):

                Repeat steps 1-5.

                Type cscript smtpreg.vbs /add 1 onarrival smtpjrnlIn
CDO.SS_SMTPOnArrivalSink "Rcpt to=user1@xxxxxxxxxxxxxx
<mailto:to=user1@xxxxxxxxxxxxxx> ; Rcpt to=user2@xxxxxxxxxxxxxx". Press
Enter

                To journal incoming e-mails for every mailbox, use:
cscript smtpreg.vbs /add 1 onarrival smtpjrnlIn CDO.SS_SMTPOnArrivalSink
"Rcpt to=*@yourdomain.com <mailto:to=*@yourdomain.com> "

                 

                3. Type: cscript smtpreg.vbs /setprop 1 onarrival
smtpjrnlIn Sink ScriptName c:\jrnlarchive\smtpjrnl.vbs

Test it by sending mails to the any of the specified mailboxes.

 

Drawback

Bad part is when you need to modify the list of mailboxes to be
journaled. This can be done by remove the sink and re-register it with
modified list of mailboxes. I do it by maintaining a small batch file.

************************************************************************
************
 


-----Original Message-----
From: Fabrice [mailto:emouchet@xxxxxxxxxx]
Sent: Tuesday, April 26, 2005 2:12 PM
To: [ExchangeList]
Subject: [exchangelist] Exchange Event Sink for copying mails

http://www.MSExchange.org/

Hello

I'm working with an exchange 2003 server (standard) I need :
-One.
to make a copy of all mails from Internet (for the internet domaine,
type :
@mydomain.com), passing through the virtual smtp server.
-Two.
to make a copy of mails from the society to Internet.

But not the mails beetween the members of the society.

I think, i must create an event sink. on the smtp server. But i don't
know how !
Do you know a site which is talking about a solution or an add-on.

thanks a lot.
fabrice



------------------------------------------------------
List Archives: http://www.webelists.com/cgi/lyris.pl?enter=exchangelist
Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp
Exchange FAQ: http://www.msexchange.org/pages/larticle.asp?type=FAQ
------------------------------------------------------
Other Internet Software Marketing Sites:
World of Windows Networking: http://www.windowsnetworking.com Leading
Network Software Directory: http://www.serverfiles.com
No.1 ISA Server Resource Site: http://www.isaserver.org Windows Security
Resource Site: http://www.windowsecurity.com/ Network Security Library:
http://www.secinf.net/ Windows 2000/NT Fax Solutions:
http://www.ntfaxfaq.com
------------------------------------------------------
You are currently subscribed to this MSEXchange.org Discussion List as:
cdd@xxxxxxxxxxxxx To unsubscribe visit
http://www.webelists.com/cgi/lyris.pl?enter=exchangelist
Report abuse to listadmin@xxxxxxxxxxxxxx



DISCLAIMER:
*************************************************************************************************************
The contents of this communication are intended/meant only for addressee(s) and 
may contain information that is privileged or otherwise confidential. If you 
are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. The contents of this 
e-mail shall not be forwarded to any third party, without first obtaining 
written authorization from the originator or Kampsax India. If you have 
received this electronic mail transmission in error, please delete it from your 
system without copying or forwarding it, and notify the sender of the error by 
reply email or by telephone, so that the sender's address records can be 
corrected.

Kampsax India (P) Ltd.
809, Phase-V
Udyog Vihar
Gurgaon - 122016
Haryana, India
Tel: +91 124 509 25 00
Fax: +91 124 234 82 63
http://www.kampsaxindia.com

Other related posts: