Friday 14 November 2014

Add Disclaimer to Mail Signature in IBM SmartCloud Notes (Custom Implementation)

Requirement:

A company disclaimer is required to be added to all the Emails sent across the organization and outside using SmartCloud Notes Client and iNotes.

Challenge:

SmartCloud Notes doesn’t support functionality of Message Disclaimer.

 

Solution:

This solution is a work around and not really a Cloud based integration.

We’ll be using a LotusScript Agent to modify the Mail Signature for Notes Client, iNotes – Plain Text and iNotes – Rich Text and append the Disclaimer for all users.

Assumption:

The Administrator has access to all the MailFiles in SmartCloud Notes via Template Modification.

 

Code:

Option Public
Option Declare

Const DISCLAIMER = |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Disclaimer :
This e-mail and any attachments thereto are intended for the sole use of the recipient(s) named above and may contain information that is confidential and/or proprietary to the ABC Pvt. Ltd. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication, or dissemination in any form) by persons other than the intended recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Sub Initialize
    Dim s As New NotesSession
    Dim docP As NotesDocument
    Dim db As NotesDatabase
    Dim dociNotes As NotesDocument
    Set db = s.CurrentDatabase
    Set docP = db.GetProfileDocument("CalendarProfile")
    Set dociNotes = db.Getprofiledocument("iNotesProfile")
    If docP.SignatureInserted Then 'Avoid repeated insert of signature
        'Plain Text Signature
        docP.Signature_1 = docP.Signature_1(0) & Chr(10) & DISCLAIMER
        'HTML iNotes Signature
        dociNotes.HTMLSignature = dociNotes.HTMLSignature(0) & Chr(10) & DISCLAIMER
        'Notes RichText Signature
        Dim rtItem As New NotesRichTextItem(docP, "Signature_Rich")
        Call rtItem.appendtext(DISCLAIMER)
        docP.SignatureInserted = True
        Call docP.Save(True,False)
        Call dociNotes.save(True, False)
    End If
End Sub

Friday 15 August 2014

Configure Offline Replica for Notes Client

Instructions for Notes Client Configuration

Configure Local Replica:

This step will ensure that all the emails are downloaded and synced on local machine. Thus providing faster and offline access to emails. Once downloaded, emails can be instantly opened without relying on server connectivity.

Open the Mailbox and select any mail:

clip_image001[6]

Goto View menu and ensure that “Advanced Menus” is enabled/checked as shown in image below.

clip_image002[4]

Now, goto File -> Application --> “Make Available Offline..” option. It’ll be enabled only if Offline copy is not already been created.

clip_image003[4]

In the next dialog, click OK.

clip_image004[4]

This will create Local replica of your mailbox on your Notes Client. The process will run in background and may take few minutes to complete based on your mailbox size and network speed. For eg. If mailbox size is 100 MB, then you can calculate the time required to download 100MB file from internet. Once downloaded, only delta will be synchronized with server going forward.

To check the progress, open the Replication and Sync tab:

clip_image005[4]

There should be an entry with user’s name and Mailbox Icon as shown below.

clip_image007[4]

Location Settings:

Open Location Settings from Bottom Right corner of Notes Client:

clip_image008[4]

Edit the Location document for user.

clip_image009[4]

In the Edit Location Dialog, Goto 4th Tab - “Mail”

clip_image001[8]

Change Mail File Location to “Local”

Set Transfer outgoing mail if value to 1

clip_image002

Now open the Mail Icon from top bar in Notes Client:

clip_image013[4]

The Mail file opened now should show “Local” in Server Name space in Top left section of Mailbox:

clip_image014[4]


Faster Sync:

Goto File menu --> Preferences

clip_image015[4]

Goto Mail --> Sending and Receiving --> Receiving --> “Check for new mail every -- minutes”

Set the value as 5 minutes or as desired.

clip_image017[4]

Enable Schedule Replication:

Open the Replication and Sync Tab:

clip_image019[4]

Select “Enable Scheduled Replication/Sync” option to enable Scheduled replication.

clip_image020[4]

Open the “Set Replication/Sync Schedule..” option.

Enable Normal-priority Sync Schedule options as shown below.

clip_image021[4]

Scheduled Replication is more resource intensive as compared “Check Mail every xx minutes” setting mentioned earlier under “Faster Sync” heading.

Therefore, my recommendations would be not to use value of less than 15 minutes for scheduled replication. For “Check Mail every xx minutes” setting even 5 minutes setting is fine.

This document can be shared with all the End-users to let them configure the Notes Client and let them achieve the best and optimized performance from a fantastic platform !

Sunday 6 July 2014

Customize Domino Login Form to allow only Email Address

Default Domino Login Form allows multiple variants of Username to login:

  • Notes Common Name
  • Notes Canonical Name
  • Notes Abbreviated Name
  • Email Address etc.

If administrator wants to restrict usage of email address only, then following customization can be used:

Assuming SSO is configured on Domino Server and Domcfg.nsf is deployed on server, we’ll create a custom login form:

  1. Open Domcfg.nsf in Domino Designer.
  2. Create a copy of “$$LoginUserForm” Form and rename it. For e.g. “DEMOLoginUserForm”.
  3. Open the newly created form and modify the “Username” field as shown below. Change the name of field to “User” in first and last tab of Field Properties.
    image
  4. Goto the “onChange” Event of “User” field and add following code:
    return onSelectEmail()
  5. Goto the “JSHeader” section of Form and add following code (Please update the domain name in code appropriately): function onSelectEmail(){
             if(document.getElementById('User').value=="") {
                 alert("Please enter username first");
                        document.getElementById('User').focus();
                        return false;
             }
                  document.getElementById('Username').value=document.getElementById('User').value+"@demo.com";
                  return true;
      }
  6. Add the Domain name in front of User field as shown in image above.
  7. Add following code as “Pass thru HTML” in the next line after User field:
    <input name="Username" id="Username" type="hidden">
  8. The form is ready now !
  9. Now open Domcfg.nsf in Domino Admin client and set the mapping for this new form:
    image
  10. That’s all !
    image

 

Let me know if you face any issues.. I’ll be happy to assist.

     

     

     

Monday 3 March 2014

Configuring iNotes in a multiple HomeMail Server scenario with a WebSphere Edge reverse proxy server

This is draft to remember the points.. I'll update the article in few days..

Most important part is to enable Cookies with JunctionRewrite:

JunctionRewrite On UseCookie

Configuration of iNotes Web Redirect Database: Use the MailServer option and configure the Domain name and Proxy Server URL.
The problem with MailServer option in "iNotes Redirect" db is that it only changes the first URL.. The other subsequent HTTP request still try to connect the Proxy server without appending homeserver name, and the error will coming up in normal scenario. Now, with use of Cookie, ReverseProxy server remembers which server was last used.

Therefore, now with this setup the first request will go to Server1.
After authentication, iwaredir.nsf database will redirect the first URL to "http://server.demo.com/server1" OR "http://server.demo.com/server2" based on Homemail server.
At this moment JunctionRewrite will store the server information in Cookie.
All subsequent requests to server without "/server1/" in URL will still be able to reach the correct server because of this cookie.

My server setup: 
Proxy: http://server.demo.com
Domino1: http://server1.demo.com:81
Domino2: http://server2.demo.com:82

Following are the rules that I have used:

map /server1.demo.com/* /server1/*
map /server2.demo.com/* /server2/*

JunctionReplaceURLPrefix http://server1.demo.com/* http://server.demo.com/server1/*
JunctionReplaceURLPrefix http://server2.demo.com/* http://server.demo.com/server2/*

proxy /server1/* http://server1.demo.com:81/*
proxy /server2/* http://server2.demo.com:82/*
proxy /* http://server1.demo.com:81/*

ReversePass http://server1.demo.com:81/* http://server.demo.com/server1/*
ReversePass http://server2.demo.com:82/* http://server.demo.com/server2/*

Please let me know if you want more details on how to setup the Websphere Cache Proxy Server.

Reference:
1. http://www.ibm.com/developerworks/lotus/library/ls-Configuring_IWA_Edge_ReverseProxy/index.html?ca=drs
2. http://www.ibm.com/developerworks/lotus/documentation/apacherproxy4inotes/