Tuesday 25 August 2015

IBM VERSE: Synchronize Recent Contacts from Notes Client to VERSE

Scenario:
Customers appreciate the new User Experience of IBM Verse, but the moment they start using it, the first problem they face is that while typing name, recent contacts are not available, which are there in Notes Client. So, customers were forced to either search customer emails or copy from Notes Client.

To avoid the same, I created a script to copy the Recent Contacts to My Contacts and Sync it to Server.

Steps are as follows: :

1.Create a Notes button using following code to Migrate Recent Contacts in Notes Client to My Contacts.

Sub Click(Source As Button)
    Dim s As New NotesSession
    Dim vw As NotesView
    Dim doc As NotesDocument
    Dim db As NotesDatabase
    Dim doc2 As NotesDocument
    On Err Goto ErrHandler
    Dim total As Integer, cnt As Integer
    msg = "Please ensure that you don't run this code multiple times, else it will create duplicates in your Addressbook. " + Chr(10) & _
    "Are you sure to run this code ?"
    If Messagebox(msg, 36, "Are you sure ? ") = 7  Then
        Msgbox "The action has been cancelled", 64, "Cancelled"
        Exit Sub
    End If
    Set db = s.GetDatabase("", "names.nsf")
    Set vw = db.GetView("RecentCollaborators")
    total = vw.AllEntries.Count
    cnt = 0
    Set doc = vw.GetFirstDocument
    While Not doc Is Nothing
        cnt = cnt + 1
        Print "Processing " & cnt & " / " & total & " document"
        Set doc2 = vw.GetNextDocument(doc)
        RCtype = doc.GetItemValue("type")
        If Lcase(RCtype(0)) = "group" Then
            'Skip the doc
        Else
            'Move to My Contacts
            Call RCReplace(doc, db)
        End If
NextDoc:
        Set doc = doc2
    Wend
    Messagebox "Migration process has completed.", 64, "Complete"
    Exit Sub
ErrHandler:
    Goto NextDoc
End Sub

Sub RCReplace(RCDoc As notesdocument, db As NotesDatabase)   
    On Error Resume Next
    Call RCDoc.replaceitemvalue("Form", "Person")  'DNT
    If Lcase(rcDoc.getitemvalue("Type")(0)) <> Lcase("PeRsOn") Then
        Call RCDoc.replaceitemvalue("Type", "Person")   'DNT
        'this code is in place for Mail-In Database records, with only  hierarchical name in Fullname item
        RCFN = rcdoc.getitemvalue("Fullname")
        If Ubound(RCFN) = 0 Then
            Dim FNname As New notesname(RCFN(0))
            CanonFN = FNname.canonical
            If CanonFN <> "" Then
                Redim NewFN(1)               
            End If
            NewFN(0) = FNname.canonical
            NewFN(1) = FNname.common
            Call RCdoc.replaceitemvalue("Fullname", NewFN)
        End If
        ' /end Mail-In Db specific code
    End If   
    Call RCdoc.replaceitemvalue("$AutoCreatedList", "")
    Call RCdoc.replaceitemvalue("$DPABState", "")
    Call RCdoc.replaceitemvalue("$DPAB_State", "")   
    Call RCDoc.save(False,False)
    Set newContact = RCdoc.CopyToDatabase( db )
    Call RCDoc.remove(True)
End Sub

Note: Click "Yes" if any prompt comes up for Trusting Code.

2. Goto Notes Client --> File Menu --> Preferences.

3. Open Contacts section and ensure "Enable Synchronize Contacts" option is enabled.

clip_image001

4. Goto Replication and Sync Tab and ensure that "Synchronize Contacts Replication is Enabled.

clip_image002

5. Once Synced, All the Recent Contacts will be available in IBM Verse as well !

For more details, refer to IBM Wiki.

IBM VERSE Hybrid Deployment via Pass-thru only environment – without Internet Connection at each Machine

Scenario:
For a BFSI Customer, I recently implemented IBM Verse Hybrid deployment as a PoC. The major requirements were as follows:

  • No Internet connection to be provided at each individual machine.
  • Internet Proxy license not available for majority of users. If needed for Mailing, the cost of Proxy license to be added to TCO.
  • No direct connection from any Domino Server in MZ to Internet

Challenges:
IBM Verse Hybrid deployment System requirement clearly states that Internet connectivity is required from each machine for Notes Client configuration. Also, each Domino Server should be able to reach to Cloud Servers for Mail routing.

Solution:
We addressed the challenge in two parts:

1. Configured On-premise Domino Servers to reach Cloud Servers via Pass-thru.

  • To achieve the same, create Connection document to Cloud Server OU via Pass-thru server.
  • In Pass-thru server, allow “*/CLOUD/<CUSTOMER_ORG>” as Allowed Destination via Pass-thru server. Also, allow all users to access the Pass-thru server by adding “*” to the “Who can access the Server” field.
  • Once done, trace the Cloud Servers from On-premise server. The connection should get established via Pass-thru server.

2.  Configure Notes Client to connect to Cloud servers via Pass-thru:

  • In this scenario, default method of downloading config.nsf and running won’t work, as config.nsf require internet connectivity over port 1352 NRPC to connect to Cloud servers.
  • To overcome this challenge, I created below script, which creates one Connection document to Pass-thru Server, one connection document to Cloud Servers using Pass-thru server.
  • Also, it modifies current location to ensure that Cloud Server is now configured as Home Mail Server in Notes Client. This information is available in On-premise directory (replicated via Directory Sync).
  • Additional Location doc can be created as well to allow users to connect directly to Cloud servers from Home using Internet connectivity from their Laptops.

Sub Click(Source As Button)
    Dim Workspace As New NotesUIWorkspace
    Dim UIDdoc As NotesUIDocument
    'Create Connection Doc to Pass-thru Server
    Set uidoc = workspace.composedocument("","names.nsf","Connection")
    Call uidoc.fieldsettext("ConnectionType","Local Area Network")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("PortName","TCPIP")
    Call uidoc.fieldsettext("LanPortName","TCPIP")
    Call uidoc.fieldsettext("ConnectionLocation","*")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("Destination","<PASS_THRU_SERVER>/<OU>/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("OptionalNetworkAddress","<IP_ADDRESS_OF_PASS_THRU>")
    Call uidoc.fieldsettext("Source","*")
    Call uidoc.refresh
    Call uidoc.save
    Call uidoc.close
    Set uidoc = workspace.composedocument("","names.nsf","Connection")
    Call uidoc.fieldsettext("ConnectionType","Passthru Server")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("PassthruServer","<PASS_THRU_SERVER>/<OU>/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("ConnectionLocation","*")
    Call uidoc.refreshhideformulas
    Call uidoc.fieldsettext("Destination","*/CLOUD/<CUSTOMER_ORG>")
    Call uidoc.fieldsettext("Source","*")
    Call uidoc.refresh
    Call uidoc.save
    Call uidoc.close
    'Modify Current Location Document
    Dim session As New NotesSession
    Dim pnab As New NotesDatabase("", "names.nsf")
    Dim dbNab As NotesDatabase
    Dim currlocdoc As NotesDocument
    Dim vw As NotesView
    Dim doc As NotesDocument
    ' Pick out the second argument in Location INI variable (i.e. the Note IDof current location)
    'Following string extraction cannot be done with R5 StrLeft() StrRight() fcns b/c it won't work in R4 client, hence good old @formula Evaluate() to the rescue...
    CurrLocation$=session.GetEnvironmentString("Location", True)
    CurrLocationNoteID=Evaluate( { @Left(@Right("} & CurrLocation$ & {"; ",");",") } )
    Set currlocdoc=pnab.GetDocumentbyID( CurrLocationNoteID(0) )
    'Get the new Home Mail Server information from the Directory. Since directory is synchronized with Cloud, therefore On-premise directory will also contain the new Server information in updated person document of user.
    Set dbNab = session.GetDatabase("<IP_ADDRESS_ANY_ON_PREMISE_DIRECTORY_SERVER>", "names.nsf")
    Set vw = dbNab.GetView("People")
    Set doc = vw.GetDocumentByKey(session.UserName, True)
    If Not doc Is Nothing Then
        Call currlocdoc.replaceitemvalue ("MailServer", doc.MailServer(0))
        Call currlocdoc.save (True,True)
    Else
        Messagebox "Person Document not found. Please configure Location Document Manually.", 48, "Error Occured"
        Exit Sub
    End If
    Messagebox "Notes Client Configuration has completed successfully.", 64, "Configuration Complete"   
End Sub

 

Please feel free to reach me if any clarification required for the above description.

Notes Client: Insert Image Banner for All Outgoing Emails

 

image

Functionality: Insert Banner image for each new Mail in Notes Client.

Steps:

1. Insert Banner into CalendarProfile.

Create Agent in Mailfile and name it like “Insert Banner”

Ensure that the banner image is available on Local machine. Update the path in below code before running the agent.

Run the code one time. It’ll create a RichText item in CalendarProfile and it’ll be used for inserting in new mails.

%REM
    Agent Insert Banner
    Created Aug 25, 2015 by Vikas Tiwari2/India/IBM
    Description: Comments for Agent
%END REM
Option Public
Option Declare

Sub Initialize
    'Dim w As New NotesUIWorkspace
    Dim s As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Set db = s.Currentdatabase
    Set doc = db.Getprofiledocument("CalendarProfile") 'CalendarProfile
    If EmbedPictureIntoRichText(doc, "D:/banner.jpg") Then
        MsgBox "success"
    Else
        MsgBox "error"
    End If
End Sub

Sub Terminate
End Sub

Function EmbedPictureIntoRichText(doc As NotesDocument, strFilePath As String) As Boolean
    EmbedPictureIntoRichText = False
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim body As NotesMIMEEntity
    Dim header As NotesMIMEHeader
    Dim child As NotesMIMEEntity
    Dim stream As NotesStream
    Dim fileFormat As String
    Dim rtitemA As NotesRichTextItem
    Dim rtitemB As NotesRichTextItem
    Set db = doc.Parentdatabase
    On Err GoTo ErrHandler
    'Delete DummyRichText
    Set rtitemB = doc.GetFirstItem("BannerField")
    If Not rtitemB Is Nothing Then
        Call rtitemB.Remove()
    End If
    Set stream = session.CreateStream
    'Call stream.Open(strFilePath)
    Set body = doc.CreateMIMEEntity("BannerField")
    Set header = body.CreateHeader("Content-Type")
    Call header.SetHeaderVal("multipart/mixed")
    Set child = body.CreateChildEntity
    Call stream.WriteText(Chr(10) & Chr(10))
    Call child.SetContentFromText(stream, "text/plain", ENC_NONE)
    Call stream.Truncate
    Call stream.close()
    REM Create another child entity
    Set stream = session.CreateStream
    Call stream.Open(strFilePath)
    'Set body = doc.CreateMIMEEntity("BannerField")
    'Set header = body.CreateHeader("Content-Type")
    'Call header.SetHeaderVal("multipart/mixed")
    Set child = body.CreateChildEntity()
    fileFormat = "image/jpeg" 'Other formats are "image/gif" "image/bmp"
    Call child.Setcontentfrombytes(stream, fileFormat, 1730)
    'Call child.EncodeContent(ENC_BASE64)
    'Call stream.Truncate
    Call stream.Close()
    Call doc.save(False, False) 'JUST TO REFRESH
    EmbedPictureIntoRichText = True
    Exit Function
    'not required
    Set rtitemA = doc.GetFirstItem("Body")
    Set rtitemB = doc.GetFirstItem("BannerField")
    Call rtitemA.AppendRTItem( rtitemB )
    Call rtitemB.Remove()
    Call doc.save(False, False)
    EmbedPictureIntoRichText = True
    Exit Function
ErrHandler:
    MsgBox "Error occurred: " & CStr(Err) & " : " & Error & " at line no. " & CStr(Erl)
End Function

2. Modify InsertSignature Function by inserting following code as per screenshot below:

If profileDoc.HasItem("BannerField") Then
        Call uiDoc.ImportItem(profileDoc, "BannerField")   
End If   

image

This code is just a starting point to help someone trying to achieve the desired functionality. If more automation is required, let me know I can guide for next steps.

Wednesday 12 August 2015

Migrate your mail data using imapSync

Recently tried IMAPSync tool to migrate some mails off a google account to a local domino server as well as to my Connections cloud account. I used the below steps for the migration. Note that I used a windows machine to run the batch file and the syntax mentioned below apply to a windows desktop environment and would differ for a linux client.

1) Download and unzip the latest imapSync utility.
2) Edit the batch file with the below:

.\imapsync.exe ^
           --host1 imap.gmail.com ^
           --user1 "username@gmail.com" ^
           --password1 "gmailsecretpassword" ^
           --ssl1 ^
           --authmech1 LOGIN ^
           --host2 imap.notes.na.collabserv.com ^
           --user2 "collabservuser@collabservdomain.com" ^
           --password2 "collabservsecret" ^
           --ssl2 ^
           --maxbytespersecond 500000 ^
           --useheader="X-Gmail-Received" ^
           --useheader "Message-Id" ^
           --automap ^
          
--addheader ^
           --sep2 "/"  ^
           --prefix2 ""


3) Save the batch file
4) Run the batch file by double clicking the file

*** Edit Notes ***
Added the --addheader to synchronize the sent folder to Gmail/Sent folder
Added the --sep2 and --prefix2 to synchronize the nested folders.
Removed --skipcrossduplicates to make sure that messages marked with multiple labels appear in separate folders
*** End Edit Notes ***

To test the connections you could first use the --dry and --justfolders options..
Some points to take care..
A) Your google account should allow less secure devices to connect --> Link
B) Your google account should not be set for application passwords --> Link
C) You should have IMAP enabled on IBM Connections account

To test out the settings you can try telnet to the hosts on port 993.
To further test out the settings you could try to connect the two account using a mail client such as outlook / thunderbird over imap.

If you wish to migrate emails to a local domino server which doesn't use SSL, you would need to telnet on port 143 and the option --ssl2 will need to be removed in the above batch file.

The batch file for migrating mails to a local domino server over imap would look as below:

.\imapsync.exe ^
           --host1 imap.gmail.com ^
           --user1 "gmailuser@gmail.com" ^
           --password1 "gmailpassword" ^
    --ssl1 ^
        --authmech1 LOGIN ^
           --host2 domino.server.fqdn ^
           --user2 "dominouserid" ^
           --password2 "dominopassword" ^
                      --maxbytespersecond 500000 ^
           --useheader="X-Gmail-Received" ^
           --useheader "Message-Id" ^
           --automap ^
           --skipcrossduplicates


Thanks for great documentation provided by author of imapsync Gilles LAMIRAL -> http://imapsync.lamiral.info/

Wednesday 5 August 2015

Connect to Multiple Networks simultaneously using Windows 7

 

I struggled to setup multiple networks working simultaneously.. Sharing my findings and steps involved:

1. Set Manual Metric Setting for all Network interfaces. Lower value takes the preference! So, set lowest value for the network which should be opened for most requests like Internet connection.

image

Detailed steps:

1. Open Command Prompt and type: route print - you will see a list of active routes, the last column displaying their "metric". Lower metric routes are preferred over higher ones.
2. Open the Network Adapter Properties (Control Panel > Network and Internet > Network Connections > right-click on adapter and choose Properties)
3. Open the properties of Internet Protocol Version 4 (TCP/IPv4).
4. Click on Advanced.
5. Untick "Automatic Metric" and set the interface metric to a number.
6. Hit OK until you close the Network Adapter properties.
7. Repeat steps 2-6 for your other network adapter(s) choosing different metrics. Remember lower metrics are preferred over higher ones.

2. Only Single Gateway Interface configuration required. i.e. For most preferred Interface, define the Gateway, for rest of the Network Adaptors, use Static IP Configuration without Gateway setting.

image

3. For Accessing Internal Servers, either access them first and then change the Metric setting else specify the Static Route using following commands:

route –p add destination mask subnetmask gateway metric costmetric if interface

For eg.

route -p add 192.213.64.20 mask 255.255.255.0 192.213.40.254 metric 2

4. Now, you can access both networks from single machine !

Reference:

http://windows.microsoft.com/en-in/windows/configuring-multiple-network-gateways#1TC=windows-7

http://www.speedguide.net/faq/how-to-tell-windows-7-to-use-a-different-default-350

Tuesday 21 July 2015

Tivoli Directory Integrator: Sync AD Password with Domino

How to configure TDI for User Registration and Password Syncronization
  1. Infrastructure: (Ensure Firewall is turned off or allow the required ports to be opened)
    1. Machine 1: Active Directory
    2. Machine 2: TDI
    3. Machine 3: Domino Server
  2. Installation:
    1. Machine 1: Install TDI Plugins for Change Password Detection.
      1. Install the plugin as per the guidelines :
        • Copy the file tdipwflt.dll to the System32 folder of the Windows installation folder. Note that on 64-bit Windows operating systems, the 64-bit DLL of the Password Synchronizer must be put in the System32 folder.
        • List the name of the Windows Password Synchronizer DLL (without the ".dll" file extension) in the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\Notification Packages" Windows registry key. Make sure you put in the name of the 64-bit DLL on a 64-bit Windows platform.
        • Execute the registerpwsync.reg file, which is shipped with the Password Synchronizer. This will create a key for the Windows Password Synchronizer in the Windows registry: "HKEY_LOCAL_MACHINE\SOFTWARE\IBM\Tivoli Directory Integrator\Windows Password Synchronizer". It will also set a string value "ConfigFile" that contains the absolute file name of the configuration file of the Windows Password Synchronizer.
        • Restart the machine and few extra files like “proxy” should be created in Plugin folder
      2. Configure following settings in pwsync.props file in TDI Plugin directory
        • syncClass=com.ibm.di.plugin.pwstore.jms.JMSPasswordStore
        • jms.broker=tcp://<ip_machine2>:61616
        • jms.clientId=client1
      3. Use the pwsync_admin.exe utility to restart the proxy.
    2. Machine 2: Install TDI and then apply FP 1 and FP2 (Note: FP2 installation will fail if UpdateInstaller is not replaced as per the documentation in the maintenance folder)
    3. Machine 3: Domino Server should be installed with ID Vault Configured.
  3. Configuration:
    1. Machine 2: Import the Assembly lines attached with this document in TDI and update the LDAP, Domino and AD settings
    2. For Domino User Connector, try IIOP or Local Client setting. Reference documents are attached along with this document.
    3. Deploy PasswordSync.nsf database which contains Web Service to change passwords for HTTP and ID Vault. (Note: Please ensure to update Web Service properties according to your environment)
      image
    4. Modify the Configuration Document on Domino Server to “Allow LDAP users write access”.
  4. Modify the ID Vault policy to ensure that Notes Client doesn't ask to change password after the password is reset via ID Vault.

    Download attachment from here: Link

Monday 20 July 2015

iNotes Deployment in HA Mode with Multiple Clusters using Apache Reverse Proxy - Part 2

In continuation to my first post: http://xpagesera.blogspot.in/2013/03/inotes-deployment-in-ha-mode-with.html

In the last post, we tried setting up the Apache Reverse Proxy with Multiple Domino Clusters. Last week, we successfully implemented Apache Reverse Proxy in a unique way:

Cluster size: 7 servers - 6 Mail Servers and 1 Admin Server. This setup ensures that all password changes are immediately available to all Servers.

User's Mail file is available on either Server 1, 3, 5 OR Server 2, 4, 6. In this configuration 4 servers are in DC and 2 servers in DR. We want all traffic to land on Server 1 - 4 (DC). In case none of the DC Servers are available, then it should redirect request to Server 5, 6 (DR).

Instead of relying on the Domino Cluster Information, we have written Rules in Apache httpd.conf file to determine which Load Balancer Group a particular request should be redirected to.

First, the formula used for Apache field in iNotes Web Redirect database:

nodecookievalue:= @Name([CN];@NameLookup([NoUpdate];@UserName;"MailServer"));

clustercookievalue:=@DbLookup("":"";@Subset(@DbName;1):"names.nsf";"($ServersLookup)";nodecookievalue;"clustername");

nodecookie:=@SetHTTPHeader("Set-Cookie";"inotesses="+@LowerCase(nodecookievalue));

@Success

This field will write Cookie values inotesses: Mail Server Name in lowercase.

Second, Check if below modules are present & loaded in Apache Reverse Proxy

LoadModule rewrite_module modules/mod_rewrite.so

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

LoadModule proxy_http_module modules/mod_proxy_http.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule proxy_connect_module modules/mod_proxy_connect.so

Third, in the httpd.conf file, add Rules to redirect user request to only that server where user's mailfile is present.

<VirtualHost *:443>

ServerName webmail.demo.com

ProxyRequests off

SSLEngine On

SSLProxyEngine On

RewriteEngine On

SSLCertificateFile    /etc/apache2/ssl/webmail.crt

SSLCertificateKeyFile /etc/apache2/ssl/webmail.key

SSLCertificateChainFile /etc/apache2/ssl/chain.crt

ProxyPreserveHost On

<Proxy balancer://Cluster1/>

# loadfactor is added to ensure equal requests are sent to server01 and server02, while server03 will have lowest priority.

BalancerMember https://server01.demo.com:443/ route=server01 loadfactor=50

BalancerMember https://server03.demo.com:443/ route=server03 loadfactor=50

 BalancerMember https://server05.demo.com:443/ route=server03 loadfactor=1

ProxySet lbmethod=byrequests

</Proxy>

<Proxy balancer://Cluster2/>

BalancerMember https://server02.demo.com:443/ route=server02 loadfactor=50

BalancerMember https://server04.demo.com:443/ route=server04 loadfactor=50

 BalancerMember https://server06.demo.com:443/ route=server03 loadfactor=1

ProxySet lbmethod=byrequests

</Proxy>

ProxyPass / balancer://Cluster1/ stickysession=inotesses nofailover=Off

ProxyPassReverse / https://server01.demo.com/

ProxyPassReverse / https://server03.demo.com/

 

ProxyPass / balancer://Cluster2/ stickysession=inotesses nofailover=Off

ProxyPassReverse / https://server02.demo.com/

ProxyPassReverse / https://server04.demo.com/

 

RewriteCond %{HTTP_COOKIE} inotesses=server01 [NC]

RewriteRule ^/((mail|iNotes|icons|domjava)/.*)$ balancer://Cluster1/$1 [P]

 

RewriteCond %{HTTP_COOKIE} inotesses=server02 [NC]

RewriteRule ^/((mail|iNotes|icons|domjava)/.*)$ balancer://Cluster2/$1 [P]

 

RewriteCond %{HTTP_COOKIE} inotesses=server03 [NC]

RewriteRule ^/((mail|iNotes|icons|domjava)/.*)$ balancer://Cluster1/$1 [P]

 

RewriteCond %{HTTP_COOKIE} inotesses=server04 [NC]

RewriteRule ^/((mail|iNotes|icons|domjava)/.*)$ balancer://Cluster2/$1 [P]

</VirtualHost>

 

Now, Stop & start httpd service.

Saturday 18 July 2015

Forgot password application for Domino sever

Forgot Password Functionality for Domino


Facing issues with installation ?? : Try the troubleshooting section at the bottom of this article.

Business Case:
This application implements the “Forgot Password” functionality for Domino. This feature is available today for almost any Web application which try to reset the password by sending notification to registered mail address. However, if you forget your Domino Webmail/Notes Client password, then you need to contact Administrators to reset the password. 
If the Organization has set the policy to change the passwords after every 60/90 days, then the password reset requests are more often. For a large Customer, we observed that around 60% Support requests are meant for Password Reset for Notes Client/Web Mail. 
This tools aims at minimizing such Support Calls by encouraging users to Register for Self Password Reset application. Users need to do one time registration and set their secret questions and answers. Once registered, users can use this application to Reset their Webmail/Notes Client passwords without engaging the Support team. 
Features of application:
- Reset password for both HTTP and Notes client (via ID Vault) in a single step.
- Front end application only consists of XPages design elements with total separation from data.
- No direct access to data via web interface/domino URL
- Secret answers secured with MD5 encryption.
- Forced  authentication for Registering/editing the profile.
- Used single XPage for password reset wizard with efficient use of Dynamic content control. Browser back button send use back to the start of wizard. Therefore, application having full control of flow.
- Lockout of Accounts and preventing unauthorized attempt to reset password. If tried to answer incorrectly more than 5 times. Lock-out is cleared automatically after defined interval via a Scheduled agent. 
Assumptions:
- ID Vault should be configured and installed.
- The Signer ID should have access to run XPages application and Password Reset Authority in ID Vault.
Application Architecture: 
wps_clip_image-21961
It consists of two NSF files: 
Front-End Application: The XPages frontend and the other one to store use profiles.
The first database contains configuration information to connect to second db. No other data is stored in it. It contains all the XPages design elements and is available for anonymous access use.
Back-End Data Storage Application: The second database contains all the registered user's profile documents. This database has no URL access and is only accessible by the front-end XPages interface. This approach avoids all URL based quirks to access data in NSF file. The user profile stores questions and secret answers as selected by user. The data is stored with MD5 hashing to ensure even administrators can't get access to user's personal information.
Application flow:
Step 1: Register your profile one time to select three questions from a admin defined list of questions. Provide easy to remember answers for the selected questions.
Step 2: If you have forgotten your password, then go to the application and proceed with password reset wizard. 
- It will ask first to verify email address 
- If the use profile is found for the entered email I'd, the application will prompt to provide answers for 3 questions. 
- If the answers match with the stored one in profile, user is allowed to provide new password. 
- The final screen provides confirmation message with results of password change process.
Installation Instructions:
- Download the application from project Download section and unzip on local machine. 
- Copy the two NSF files to your Domino Server’s Data Directory. 
- Sign the two databases with ID which has got rights to change password in ID Vault and can run XPages application on Server. 
- Open the resetpwd.nsf database in Notes Client and Modify the settings in Keywords view.
wps_clip_image-4648
n DATA_DB_PATH keyword specifies the path of ForgotPasswordData.nsf database. Please ensure a double “\\” to be added to path.
n The other settings specify the Domino Server names where ID Vault is located and where we would like to change the HTTP Password. 
n Few sample questions which can be easily customized in the QuestionList Keyword.
- Open the application resetpwd.nsf via Web Browser and check if it’s displaying the application HomePage. 
- Try to register a user’s profile and then try to reset the password for the same user. 
- The final screen will show status message of password change for HTTP and ID Vault. Fix the permission issues if any with ID Vault.
- Enable the Scheduled agent to Run on Server to UnBlock the profiles. This agent unlocks all such profile which were locked due to multiple failed attempts to reset the password. This is to avoid any person randomly trying to reset the password.
- Change Logos, Banner and Company Name in ccAppLayout Custom Control. 
wps_clip_image-14165


Let me know if any specific functionality is required to be added to the application.

Troubleshooting:

Pre-requisites:

1. This application require minimum Domino v8.5.3 Upgrade Pack 1 or Domino v9.0. It might not work with prior version of Domino, as advanced features of Extension library have been used.

2. Please ensure Session Authentication is Enabled on Domino Server.

3. Sign both the Databases with Admin Id. Signing with Server ID will not work.

4. Both user and server (on which application is running) should have Password Reset Authority with agent access.


Known errors and resolutions:

1.  403 forbidden errors:
User will get  403 forbidden error if a db is not signed correctly or user/server does not have access to run restricted agent. Therefore, ensure that both databases have been signed properly. Also, ensure that user has rights to run XPages applications on server. To allow user id being used for signing the db, add the same to server document under security--> programability restrictions.

2. Password reset authority errors:
In ID Vault setup please make sure at the end there is @ shows up besides person and server name it comes up when put a tick mark
    In the right box, select an organization or organizational unit of users whose passwords will be reset.
    In the top, left box select the name of a user or server under which the application is authorized to run.
    Click "Add" to give the selected user or server name password reset authority for the organization or organizational unit highlighted on the right.
    If you added a user name, keep the user name highlighted on the right, and select "Self-service password reset authority."
Both user and server (on which application is running) should have Password Reset Authority with agent access.

Monday 18 May 2015

Visio Stencil for IBM Notes v9, Domino v9, Connections v5, Sametime v9 and Traveler v9 Server

 

I have created this stencil which provides Visio users a way to create network diagrams with Domino, Sametime, Connections, and Traveler servers.

I hope this helps to community.

 

image

 

Download Stencil using this link: Link

Learning XPages - Tutorials, References, Videos

Please use the references below to learn about XPages technology. 

Self Paced Learning Workshops/Tutorials: 

 

More references:

Getting started

1. Do the 27 exercises. The needed resources are available on the page for download.
2. If you need more practise do the 53 exercises. Pay special attention to the OneUI stuff
3. Check out the TLCC offerings. There's a free starter class for Xpages and Domino Designer.
6. Learn tips and tricks on NotesIn9 and check out The XPages Cheatsheet app

Core XPages

1. Stop 1 is the Notes Domino Application Development Wiki, which IBM's official XPages documentation
2. On XPages.info you will find tons of examples, ready applications and the famous Extension library. Take a close look at the contributed free custom controls.(Re)use them, don't reinvent wheels!
3. A treasure trove of information is the XPages Wiki (you can log in there and contribute)
4. Find reusable code snippets (and contribute back) in the XSnippets container of OpenNTF
5. Read a book: Mastering XPages: A Step-by-Step Guide to XPages Application Development and the XSP Language
6. Once you go deeper - read this: XPages Extension Library: A Step-by-Step Guide to the Next Generation of XPages Components
7. And keep this one handy: XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language

Java Script

A big part of writing good XPages applications is writing good JavaScript. The upside: regardless what platform you might use in future, JavaScript is here to stay!
1. I found Eloquent JavaScript an invaluable resource to understand JavaScript
2. Equally valuable is the JavaScript Garden
3. Ensure quality of your code with JSHint
4. Excellent online reference on DocHub.io
5. Learn Dojo (it is easier than you think)
6. w3schools JS introduction is easy to follow

HTML / CSS

Knowing and understanding how HTML and CSS play together is essential. It is often neglected
1. Your visual framework will be the IBM OneUI. Make yourself familiar
2. Learn HTML at w3 schools (comes in HTML5 flavour too)

Mobile

There is a lot of fine details, so make sure you cover the bases
1. Learn about the mobile controls in the Extension library
2. Familiarize yourself with Apache Callback. XPages uses that "under the hood"

Java

There will be a point where you want to take a peek under the hood or write system wide components. Then it is time for Java
1. Read a book: Head First Java, 2nd Edition. It is funny like the whole series and gives you a head start.
2. Read online for free Bob's book on Domino with Java. When you are coming from a Domino/LotusScript background, the objects will be familiar and you can focus on the Java syntax
3. Download and install BlueJ. It allows you to interactively work with Java objects. A killer when exploring
4. Look at the source of the Extension library
5. When you are ready to dive deeper: read Thinking in Java
6. Check out the XSP Starter Kit

Community

1. Make sure you have signed up for a developerWorks accounts, so you can update the Domino WIKI, participate in discussions and communicate with IBMers using Sametime
2. Register on BleedYellow. It gives you access to Blogs, Communities and Sametime
3. Become part of OpenNTF, if it is only for being able to rate and feedback on the content

IBM provided resources

1. Direct help in Domino Designer using Help - Help Contents and hitting F1 - also available as an IBM Information Center. It includes a tutorial on creating an XPages application, a section on designing XPages applications, and a XPages reference guide.

2. Lotus Notes and Domino Application Development wiki (including community articles such as Getting Started with XPages, Tutorial: Introduction to XPages, a whole section with tutorial articles and much more)

3. The Notes Domino Application Development wiki

4. Redbooks wiki: Building Domino Web Applications using Domino 8.5.1

5. Redbooks wiki: Lotus Domino Development Best Practices

Books

1. IBM Press: Mastering XPages: A Step-by-Step Guide to XPages Application Development and the XSP Language

2. IBM Press: XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language

3. IBM Press: XPages Extension Library: A Step-by-Step Guide to the Next Generation of XPages Components (to be released in May 2012)

Free community provided resources

1.XPages.info: lots of links to useful resources

2. XPageswiki.com

3. XPages.TV: Notes In 9 videos, 2 hours of XPages jumpstart, and a introduction to Java for XPages develovers series

4. XPagescheatsheet.com: home of the original XPages cheatsheet and the new Social Tools cheatsheet

Free courses

1, TLCC: Using Lotus Domino Designer 8.5

2. TLCC: Introduction to XPages development

Paid courses

1. IBM.com Notes/Domino courses

2. XPages 101 video training and XPages 201 classroom training

3. TLCC developer courses

IBM XPages Workshop

This course focuses on the fundamentals you need to begin building applications using XPages. You will learn how the latest XPages improvements build on the breakthrough innovation started in Lotus Notes 8 and Lotus Domino 8, how to build applications quicker, and how to reuse existing assets as business needs evolve.

Visit IBM Events - XPages Workshop

Community provided support

1. Lotus Notes/Domino XPages development forum

2. Stack Overflow on XPages

Blogs

1.XPages.info/news section that is updated daily with links to blog entries, wiki articles, OpenNTF projects and more.

Twitter

1. Follow Twitter accounts for XPages related news: XPages.info, All Things XPages, XPages blog, XPages Dev Team at IBM, and OpenNTF.

Download

IBM Lotus Domino Designer and IBM Lotus Domino

Free IBM Lotus Domino Designer
IBM Lotus Domino Designer, an extension of the Eclipse IDE, is the tool to rapidly develop XPages applications.
IBM Lotus Domino Designer is free!

Download Free IBM Lotus Designer
IBM Lotus Domino Evaluation Version
In order to run XPages applications in a production environment an IBM Lotus Domino server is required.
There is a 90 day evaluation version available.

Download IBM Lotus Domino server evaluation
Purchase IBM Lotus Domino
In order to run XPages applications in a production environment an IBM Lotus Domino server is required.
Choose your country below to find about pricing.

See here for more information

 

 

Reference:

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W2f10ed3a0f35_45bc_8146_e8c2a7eff486/page/Learn+XPages

Wednesday 13 May 2015

LOTUSSCRIPT: Clear Documents from Trash Folder after SoftDeletion Expiry time (if not cleared in due time)

Scenario:

By default, the Soft Deletion setting “Permanently delete documents after” is set to 48 hours. If someone try to set it to lower value like 1 hour, the mails doesn’t get cleared after 1 hour. instead it remains in Trash folder until updall command is executed on the database.

 image

Issue:

Running “updall” command every hour on mailboxes is not possible, instead a script is required which can perform the same operation.

Workaround:

Following script performs the operation as desired to clear the documents from Trash folder after Soft deletion expiry time. Once deleted, documents are moved to ($SoftDeletions) view.

    Dim s As New NotesSession
    Dim hours As Integer
    Dim db As NotesDatabase
    Dim vw As NotesView
    Dim doc As NotesDocument
    Dim doc2 As NotesDocument
    Set db = s.Currentdatabase
    If db.getoption(dbopt_softdelete) Then
        hours%=db.undeleteexpiretime
        On Error Resume Next
        'MsgBox hours% & " hour(s)"
    End If
    Set vw = db.Getview("($SoftDeletions)")
    Set doc = vw.Getfirstdocument()
    Dim dtDeleteCheck As NotesDateTime
    Set dtDeleteCheck = s.Createdatetime(Now())
    Call dtDeleteCheck.Adjusthour(-1 * hours%)
    Dim dtDeleted As NotesDateTime
    While Not doc Is Nothing
        Set doc2 = vw.Getnextdocument(doc)
        Set dtDeleted = s.Createdatetime(doc.Lastmodified)
        MsgBox "dtDeleteCheck.Timedifference(dtDeleted): " & dtDeleteCheck.Timedifference(dtDeleted)
        If (dtDeleteCheck.Timedifference(dtDeleted) > 0) Then
            MsgBox "Message to be cleared.. " & doc.subject(0) & " : " & doc.Lastmodified
            Call doc.Removepermanently(true)
            'MsgBox doc.subject(0) & " : " & doc.Lastmodified
        Else
            MsgBox "Message NOT TO BE DELETED YET.. " & doc.subject(0) & " : " & doc.Lastmodified
        End If
        Set doc = doc2
    Wend

Friday 10 April 2015

Migration to Cloud Strategies for IBM Connections Mail and IBM Verse Mail Customers

For existing Notes/Domino customer:

Customers need Cloud Hybrid deployment to use the IBM provided tools

  • OPT – Onboarding Planning Tool
  • OTT – Onboarding Transitioning Tool

These tools ensure that data is migrated from On-premise to Cloud without issues.


For new Customer of IBM Verse or IBM Connections Mail (IBM SmartCloud Notes earlier)

  • Server to Server Migration

Use IMAP Sync Tools to migrate all the mailboxes Server to Server

Reference link: http://notessensei.com/blog/2014/01/gmail2notes-in-less-than-300-lines.html

 

For any query related to migration, please feel free to write to me.

Thursday 9 April 2015

Migrating from Outlook to Notes using nupgrade.exe

Installation of Migration Tool:

To use the nupgrade.exe tool, please ensure to select Migration Tools while installing Notes Client.

clip_image001

Once installed, the nupgrade.exe tool will be available in the Notes Installation directory i.e. where you have selected to install the Notes Client. (By default, it gets installed to C:\Program Files\IBM\Lotus\Notes directory)

clip_image002

 

Steps to use nUpgrade.exe:

·Ensure that both Notes Client and Outlook/Outlook Express are installed and configured on same machine.

·Open a command prompt window and change the directory to Notes Installation directory (eg. c:\Program Files\Lotus\Notes).

·Once there, in the command prompt:

·For Outlook, type: nupgrade 3, and press enter.

·For Outlook Express, type: nupgrade 4, and press enter.


clip_image003

 

·This will launch the “Lotus Notes Upgrade Services” splash screen. Click Next.
clip_image004

 

·Select the appropriate profile that you created for Outlook and click Next. Make sure that Outlook is set as default client on machine, otherwise, following error might occur:
clip_image005


Once Outlook is set as default Mail client, the Outlook profiles should be populated properly:
clip_image006

 

·Make sure Express is selected, and click Next.
clip_image007

·This will start the conversion process.

·Email will be saved to the a_PersonalFolders.nsf file and contacts will be inserted into the Personal Address book (names.nsf),

 

Setting up the Migrated Emails as Archive:

·Open the Notes Client and goto Actions -> Archive -> Settings Option in menu.
clip_image008

 

·Create a new Archive Profile.
clip_image009

·Specify Name of Archive Profile, Click the Enable button and specify the relative path of .NSF file saved from the Migration process (IMPORTANT!)

clip_image010

clip_image011

·Specify the Archive Selection Criteria and set it to "selected by user".

clip_image012

Once done, click OK button.

clip_image013

The Archive Mailbox should be available in Notes Client Left Menu now.

clip_image014

Click the link to open the Old Emails.

Also, use the Advanced Search functionality to search across Mailbox and All Archives in single click !!

clip_image015

The Search will show results from all different Archives and Mailfile:

clip_image016

Wednesday 11 March 2015

2015 - ISA ESS Enablement Plan in India

Location - India
Training Mode: Class-room training (Lecture, Show-Tell and Hands-on)
Registrations open for India Business Partners and Customers only.

NORTH - GURGAON
Training location: IBM Silokhera Office, Gurgaon

Topic
Duration
Mode
Audience
Dates
Register
IBM Domino Deployment - Basic
1 day
Hands-on
Admin
11-Mar
IBM Portal Deployment and Administration
2 days
Show-Tell
Admin
17-Mar
18-Mar
IBM  Xpages Development - Advanced
2 days
Hands-on
Dev
24-Mar
25-Mar
IBM xDx and Social Business Value Proposition
0.5 day
Show-Tell
Customers
31-Mar
IBM Connections - Business Value Proposition
0.5 day
Show-Tell
Customers
9-Apr
IBM Connections UI Customization and Application Development Workshop
1 day
Show-Tell
Admin
14-Apr
IBM Domino Deployment - Advanced
1 day
Hands-on
Admin
21-Apr
IBM Sametime Deployment
1 day
Show-Tell
Admin
12-May
IBM Connections Cloud (Social Mail) - Business Value Proposition
1 day
Show-Tell
Admin
14-May
IBM Portal Application Development Workshop
1 day
Hands-on
Admin
26-May

WEST - MUMBAI
Training location: IBM BKC Office, Mumbai

Topic
Duration
Mode
Audience
Dates
Register
IBM Connections - Business Value Proposition
0.5 day
Show-Tell
Customers
10-Mar
IBM Domino Deployment - Advanced
1 day
Hands-on
Admin
13-Mar
IBM Connections Cloud - Business Value Proposition
1 day
Show-Tell
Admin
27-Mar
IBM Portal Application Development Workshop
1 day
Hands-on
Admin
7-Apr
IBM  Xpages Development - Basic
1 day
Hands-on
Dev
30-Apr
IBM Connections Deployment and Administration
2 days
Show-Tell
Admin
5-May
6-May
IBM  Xpages Development - Advanced
2 days
Hands-on
Dev
19-May
20-May
IBM Connections UI Customization and Application Development Workshop
1 day
Show-Tell
Admin
9-Jun


Note*: Limited seats only.. Only confirmed participants will be able to attend the sessions.