Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site

   

Subscribe to OutlookExchange
Anderson Patricio
Ann Mc Donough
Bob Spurzem
Brian Veal
Catherine Creary
Cherry Beado
Colin Janssen
Collins Timothy Mutesaria
Drew Nicholson
Fred Volking
Glen Scales
Goran Husman
Guy Thomas
Henrik Walther
Jason Sherry
Jayme Bowers
John Young
Joyce Tang
Justin Braun
Konstantin Zheludev
Kristina Waters
Kuang Zhang
Mahmoud Magdy
Martin Tuip
Michael Dong
Michele Deo
Mitch Tulloch
Nicolas Blank
Pavel Nagaev
Ragnar Harper
Ricardo Silva
Richard Wakeman
Russ Iuliano
Santhosh Hanumanthappa
Steve Bryant
Steve Craig
Todd Walker
Tracey J. Rosenblath
 
 
Making Distribution Groups Interactive Columnist's Index
Page 1
Making Distribution Groups Interactive

Posted 12/10/2003
Introduction
Recently some of the members of the church I attend approached me and asked if I knew of an alternative for using Yahoo Groups. Now I know there are 3rd party applications that will do this very function for Exchange, however, the churches IT budget is a whopping zero. After pondering for a few moments, I told them to give me a week or two to find something. Well the two week timeframe is up and here is the solution we needed.

Yahoo Groups, for those of you who are not familiar with them, is basically a listserver that many people can send messages to. For example, if you send a message to group001@yahoogroups.com then each person that has a membership to that group will get the message. This is great for churches and other non-profit groups, as well as collaboration of large groups in a business environment; however, there is one drawback to using Yahoo groups. There is an advertisement at the bottom of each message that goes through the group. Of course there is an advertisement in each message. How else would Yahoo be able to provide this service free of charge? These ads, however, could open the door in a church setting for inappropriate content being sent to the members. Now granted Yahoo does not let any very dirty ads come through, the church had decided that they didn’t want to take the risk that some may as some of the messages are directed to the youth of the church.

Being an Exchange guy, I was certain there had to be some way that this could be done from Exchange. So I got out my pen and paper and logged on to outlookexchange to read some wisdom from the greatest Exchange gurus. After some reading, I quickly realized I must have a plan of attack and here is the plan.

The Plan
In the first step of my plan I must determine what exactly I need. Of course, immediately Distribution groups came to mind, however they have some noted shortcomings when compared to the Yahoo groups. When replying to a distribution group, you reply to the sender, not the group, however Yahoo is just the opposite. Furthermore I would like to add a nice little disclaimer at the bottom of every mail, letting the users know how to unsubscribe which also is a limitation of distribution groups. Next, I would like to only allow ‘accepted’ members access to send messages to the group. Finally I would like to add something to the subject line of the message so that members could quickly identify the message as being from the group. So now we currently have the first step of the plan completed.

The second part of the plan is how to implement the desired functions we need. After some searching and pondering, I found Jason Sherry’s article on Spam. The complete article is great and a must read, but the only part I needed to see was the OnArrival event. I then found a little help from Microsoft with their KB article 317680, where it is described how to add a disclaimer to an outgoing message. With these two articles in hand, I knew that I had my solution; I just needed to put it all together.

The third and final part of the plan is testing. As with any script writing or augmentation of any part of a production server, we must do thorough testing.

Putting together “1.) What We Need”
I now had my plan (Include 1), and needed to get started. The first section in my plan would require me to start writing my visual basic script (vbs) file (File 1). Please see the file for explanation of each step. With my vbs file complete, I was ready to move to step 2 of my plan.

Putting together “2.) How to implement”
Once I had my script written, I proceeded on to step 2 in my plan. First I had to create a distribution group in Active Directory on my Exchange server. When doing this I was sure to allow only members of the group bethany to send messages to this group. This feature would allow only ‘approved’ members to send messages to the group (Figure 1).

Figure 1. Setup Message Restrictions To Allow Only The Group.

I identified that I wanted my script to reside on my C drive to easily find it. Then I built my Event Sink and first needed to initialize it the following from the command line.
cscript smtpreg.vbs /add 1 onarrival SMTPBethanyAddon CDO.SS_SMTPOnArrivalSink "mail from=*"
This basically states that I want to use an OnArrival event sink on each message on my system. Then I need to set the sink using the following from the command line.
cscript smtpreg.vbs /setprop 1 onarrival SMTPBethanyAddon Sink ScriptName "C:\disclaimer.vbs"
This basically states that the SMTPBethanyAddon sink script is located on my c drive (C:\disclaimer.vbs).
Now I had all my events registered and Exchange was officially looking to my disclaimer.vbs file for guidance in its SMTP needs, and I was ready to move to step 3.

Putting it together “3.) Testing”
Finally, after a few hours of work, I have all my scripts and event sinks in place. Now comes the fun part, testing. I sent various messages to the group to test my code, and of course I had to make some adjustments, but in the end it worked like a charm. I was sending messages to the group and then the group was acting just as my plan needed.

Additional Features
You can add any host of additional features you like. For my install, I added a nice looking interface on the church website where I can go on and look at who is a member of the group, add new members, and remove members. I also added a page that members can request to be added or removed. With Yahoo groups, to subscribe to the group you can send a message to groupname-subscribe@yahoogroups.com or to be removed a message to groupname-unsubscribe@yahoogroups.com will do. This feature was not something that the church liked, so in my case I left it out, but it is a function that can be easily added to your script.

Final Thoughts
Using Exchange, some reference material, and most importantly some good ole brain power, we can effectively mimic the actions of Yahoo groups in our own Exchange organizations. We can also use the power of this feature in Exchange, to further our scripts to do virtually anything we want.

Making Distribution Groups Interactive Columnist's Index
Page1

Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Stephen Bryant or Pro Exchange. OutlookExchange.Com, Stephen Bryant and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

Copyright Stephen Bryant 2008