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.
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
ECHO Could not find needed file, check and make sure GroupWareUsers.dat and OCusers@example.com.grp exist