Create mail databases for 300 users

Hi all,My customer create their 300 users in Nab, with id files but without mail configuration (mail file, server, etc…) for using a worklow application (by web).

Now they would like to migrate from Exchange-Outlook to Lotus Notes. It’s a good idea but…

How can I easily :

  • create the 300 mail databases

  • change all ACL database for each unique user

  • change each personal document in NAB for reflect their mail configuration

Is it possible to do that with a script from a .txt file ?

I don’t want to do this by hand :wink:

Thanks for your help

Jerome

Subject: Create mail databases for 300 users

There is a migration tool to take the Exchange-Outlook (E-O) content and make it into a Lotus Notes mail file.

If there no concern of the E-O content than just have a simple LotusScript again go through the Person view and create a mail file for each one. Be sure to give each person the appropriate access. By default Lotus Notes will create the user and give them Manager ACL access to the mail file.

There are ACL LotusScript classes and you can create the database from the mail temple with the Notesdatabase class. You will have to give a title to each database (which is usually the person common name).

HTH – Cheers – feel free to email me if you have more specific q’s

Subject: RE: Create mail databases for 300 users

Hi Joe,Thanks for your respons.

I searched the forum, sandbox but I can’t find some examples of this script.

Do you know where can I find it ?

Do you have one ?

Jerome

Subject: RE: Create mail databases for 300 users

What I would have is just an agent I made on my own. I don’t think no one has made this for the same box.

My question to you: Are you creating LN databases as new (no Exchange-Outlook content to carry over)?

Subject: RE: Create mail databases for 300 users

Joe,Yes, we would like to create all LN databases as new.

The mail transfert from O-E will be made after by each user.

I’m waiting your agent impatiently :slight_smile:

Thanks

Jerome

Subject: RE: Create mail databases for 300 users

Here is the agent, but I would have to give the disclaimer to use at your risk. I can not be liable for anything you are not understand prior to running the agent. I urge you to test this via the debugger before you do this for all the users in the address book.

With the lawyers satified here is the code:

Dim namesdb As NotesDatabase, maildb As notesdatabase, mailntf As NotesDatabase, ntitem As NotesItem

Dim PeopleVw As Notesview, persondoc As Notesdocument, nameitem As Notesname

Dim mailprofile As NotesDocument, personcollection As NotesDocumentCollection

Dim session As New NotesSession, acl As NotesACL, aclentry As NotesACLEntry

Dim filename As String, NotesDomain As String, InternetDomainSuffix As String

Set mailntf = New NotesDatabase(session.CurrentDatabase.Server, “mail6.ntf”)

Set namesdb = New Notesdatabase(Session.CurrentDatabase.Server, “names.nsf”)

Set PeopleVw = namesdb.GetView(“Mail Users”)

Set personcollection = PeopleVw.GetAllDocumentsByKey(“* No mail file specified”) ’ These are the person documents which do not have a Mail Server specifed

Set persondoc = personcollection.getfirstdocument

NotesDomain = “Domain” ’ You need to put in your domain you configured for the domino mail environment

InternetDomainSuffix = “@Domain.com” ’ You need to put your internet suffix the part on the right side of the @

While Not (persondoc Is Nothing)

'Check to see if the person has a mail file already 100 text value means NONE

If persondoc.MailSystem(0) = “100” Then

Set nameitem = Session.CreateName(persondoc.FullName(0) )

filename = Lcase(|mail| & persondoc.FirstName(0) & persondoc.LastName(0) & |.nsf| )

Set maildb = mailntf.createfromtemplate(Session.CurrentDatabase.Server, filename, True)

maildb.title = nameitem.Common

Set acl = maildb.ACL

Set aclentry = New NotesACLEntry ( acl, nameitem.Canonical, ACLLEVEL_MANAGER)

’ Now you have to set up the calendar profile for the person

Set mailprofile = maildb.GetProfileDocument(“CalendarProfile”)

mailprofile.Owner = nameitem.Canonical

Call mailprofile.save(True,False,True)

’ Now to update the preson document to point to the newly created mail file.

persondoc.MailSystem = “1” ’ Notes mail

persondoc.MailDomain = NotesDomain

persondoc.MailServer = namesdb.Server

persondoc.MailFile = filename

’ this script assumes you want the common name as part of the internet address

’ E.G John Q Public/Org will have an internet address of johnpublic@domain.com

persondoc.InternetAddress = Lcase(persondoc.FirstName(0) & persondoc.LastName(0) & internetdomainsuffix)

Call persondoc.Save(True,True,True)

'Finished with the creation for this document

End If

Set persondoc = personcollection.getnextdocument(persondoc)

Wend

Messagebox (“Script Done”)

The possible error you could get is if the mailfile already exist but the person document was never updated. Be sure to put in your Notes domain and your internet domain for the email address.

HTH – Cheers

Subject: RE: Create mail databases for 300 users

Hi Joe,Thanks fot this great script.

I’ll try it on a test server in one week.

I will go back to you when all tests will be done.

Thansk for your help

Best regards

Jerome

Subject: RE: Create mail databases for 300 users

I would suggest to email me either way. With the number of posts I make to people questions it is going to be hard for me to keep up with them after a week or so.

I hope your tests run well.

HTH – Cheers

http://www.dangsite.com

http://www.dangsite.org

http://www.noteshowto.com

http://www.dominohowto.com

http://www.notrixhowto.com

http://www.notrixguru.com