Friday, October 8, 2021

SnTT - Changing Some, But Not All, User's Mail Templates



You know how to convert one person, you know how to convert a folder or a directory...But do you know how to convert just some people's templates in your company?

Well, here is my story, how I changed 250 out of 450 people's templates.

Feel free to do this another way, but this worked and worked well, once I figured out the syntax and other item details missing from the official documentation.

My hope is you, and future me will be able to benefit from this in the future.

This is the original R12 Detail:

Upgrade all mail databases listed in a text file

You can create a text file listing databases you want to upgrade and use it with the mail conversion utility to upgrade only those databases. For example, you can create the text file MAILLIST.TXT to list all the mail databases you want to upgrade and save it in the directory C:\TEMP. This example finds all databases listed in MAILLIST.TXT, determines whether the databases use a design template name that matches Mail*, and replaces the designs of the matching databases with mail9.ntf), the Notes® 9.0.1 Social Edition mail template.

load convert -f c:\temp\maillist.txt mail*.ntf mail9.ntf

First things to note that is ambiguous or wrong in the above documentation:

1) NOTE:C:\temp is a directory on the server, not your admin client workstation.

2) Instead of mail*.ntf you need to put the name of the template, not the file name(as shown, I think that is a typo copied from a different option on the page and not edited correctly)

3) There are many options for the conversion tool so check the documentation page for specifics you may need.

Now for the fun, how do you do this!

No, wait, before we run the magic convert command, we need to create the .txt file and fill it out properly.

You probably need an export of your Directory people so you can sort out who you need and the right details.

Open your Admin client and go to the Files Tab and find your Mail folder.

Select ALL (Ctrl-A)

Open a spreadsheet and paste it all in there.

Now we really don't need all of the data, right now, but I needed it for my second act.

I need to create IDs for people in the ID Vault as some people are solely web users and TOTP only works if you have an ID in the ID Vault. More from me about TOTP at Collabsphere.

Back to your data, I suggest copying columns A and B for the moment into a new tab of your spreadsheet, so as not to mess with the data in case you need it again.

Now you can remove the people you don't need to fix so the list is just people you need to convert their templates.

Next, add a column in front of the filename column which was column B.

In the first cell of the new column put in the mail folder name, commonly would look like this: mail\

Copy that the length of your list.

Now in Column D at the first cell, use the =CONCATENATE(B1,C1)

 and you will now have a visual entry similar to this:

mail\abbott.nsf

mail\costello.nsf

mail\groot.nsf

Copy the D1 cell the length of your list.

Now select all the concatenated cells and copy them.

Open notepad or a text editor and paste them in there.

Save the file and give it a simple name, like templates.txt and save it to your server.

Now you are ready for the magic!

NOTE: TEST with 2 names and see if they run, if not, you have a typo in the command or a syntax one in the .txt file, or an incorrect directory name problem. Domino is pretty good here to tell you why it failed.

You need to stop the router to prevent any inbound mail issues/corruption.

Server console Type: Tell Router Quit

Next, at the Server Console type (make sure you use the old template name NOT filename followed by the .ntf name for the one you require): 

load convert -f -u e:\up\mailtest.txt stdr10mail mailX.ntf

-u will update the folders the user has created.

-f reads the names to update from the text file.

The server should start processing everyone.

Cool, right? 

UPDATE: Upgrade all previous users' mail designs listed in maillist.txt to Notes mail design if there is no mail template specified. Use: load convert -u -f maillist.txt * mailX.ntf

We also ran a program document to run updall -R overnight (DBMT should fix this but if it only runs on weekends, then you need a program document or just run it at the server console) just in case some people had inbox issues like only seeing new mails, not all of their other emails in their inbox, they may have been replicating at the time.



That's it, a little trial and error on my part to help all of you out there and let you go home earlier than I did the last few days.

2 comments: