Create a mailing list of Outlook Connector users

I once had a request to populate a mailing list with Outlook Connector users.  Below is the script that was born.

The script assumes a hardcoded listname of “OCusers@example.com”, use Notepad to search and replace OCusers@example.com with the correct list name.

Also, you need to manually create the list in MDaemon first, otherwise the script will fail.  Lastly, be aware that you cannot manually add users to the list, the entire membership list is wiped and replaced each time the script runs.  The intention is to run the script automatically on a schedule to keep the list up to date.

@ECHO OFF
CD C:\MDaemon\App
IF NOT EXIST GroupWareUsers.dat goto ERROR
IF NOT EXIST OCusers@example.com.grp goto ERROR
COPY OCusers@example.com.grp OCusers@example.com.bak
FIND “;” < OCusers@example.com.bak > OCusers@example.com.grp
FIND “@” < GroupWareUsers.Dat >> OCusers@example.com.grp
GOTO END
:ERROR
ECHO Could not find needed file, check and make sure GroupWareUsers.dat and OCusers@example.com.grp exist
:END

CC BY-NC-ND 4.0 Create a mailing list of Outlook Connector users by Dave Warren (everything-mdaemon.com) is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *

*