Sun Java System Messenger Express 6 2005Q4 Customization Guide

Chapter 4 Customizing Advanced Features in Messenger Express

This chapter describes how to perform advanced customizations. It also provides HTML files and their location and details on features that are fully customizable for the Sun Java System Messenger Express user interface.

This chapter contains the following sections:

Understanding Advanced Customization

In addition to the Messenger Express features discussed in Chapter 2, Customizing General Features in Messenger Express, and Chapter 3, Customizing User Interface Features in Messenger Express, many others are fully customizable. However, to take advantage of these features, an in-depth knowledge of JavaScript is required. In addition, migration problems might be encountered, for example, when attempting to reconfigure JavaScript files.


Note –

This chapter does not provide code samples for the advanced customizations. Also, an advanced knowledge of JavaScript and HTML is assumed.


Locating the Customizable Files in Messenger Express User Interface

Locating the Customizable Files in Messenger Express User Interface lists the features of the Messenger Express user interface that are fully customizable.

Table 4–1 Messenger Express User Interface Customizable Features

Features  

Files  

Attachments 

attach_fs.html

Collection of mail from another server 

collect_fs.html

Message composition 

comp_fs.html

Folder management tab 

fldr_fs.html

Addresses search 

ldap_fs.html

Mailbox management tab 

mbox_fs.html

Message management tab 

msg_fs.html

Personalize option management 

opts_fs.html

Return receipt 

receipt_fs.html

Subscribe Folders 

subscribe_fs.html

Search Messages 

searchmsg_fs.html

Emoticon 

emoticons.html

Modifying Attachments

You can modify the following attachments options:

HTML File Mapping

The HTML file that controls the attachment related features is attach_fs.html.

Collecting Mail from Another Server

You can modify the following when collecting mail from another server:

HTML File Mapping

The HTML file that controls the mail collection feature is collect_fs.html.

Modifying Message Composition

The message composition feature enables basic mail functions. You can modify the following message composition options:

HTML File Mapping

The HTML file that controls the message composition feature is msg_fs.html.

Modifying Folder Management Tab

The folder management tab enables access to server-side folders. You can modify the following folder management tab options:

HTML File Mapping

The HTML file that controls the folder management tab feature is fldr_fs.html.

Modifying Mailbox Management Tab

The mailbox management tab enables access to a mailbox. You can modify the following mailbox management tab options:

HTML File Mapping

The HTML file that controls the mailbox management tab feature is mbox_fs.html.

Modifying Personal Option Management (Options Tab)

You can modify the following Options tab options:

HTML File Mapping

The HTML file that controls the options tab features is opts_fs.html.

Modifying Return Receipt

The return receipt feature enables the management of return receipts.

HTML File Mapping

The file that controls the return receipt feature is receipt_fs.html.

Modifying Shared Folders

A shared folder is folder in which you can store messages that can be accessed by other users. Sun Java System Messenger Express manages access to the shared folders by granting others access to the shared folders.

Sharing folders is a two-step process that involves sharing and subscribing:

ProcedureTo Modify Shared Folders

Steps
  1. A user shares a folder, specifying who has permissions to the folder.

  2. The users who were given permissions to that folder then subscribe to it.

    For more information on Shared Folders, see Sun Java System Messenger Express Online Help, that can be accessed by clicking the Help on Sun Java System Messenger Express.

Customizing the Default LDAP Attributes for Users

The Sun Java System Messenger Express server loads a default set of LDAP attributes for a user at the start of a session. These attributes are as follows:

cn

givenName

mail

mailAlternateAddress

mailAutoReplyMode

mailAutoReplySubject

mailAutoReplyText

mailAutoReplyTextInternal

mailAutoReplyTimeout

mailDeliveryOption

mailForwardingAddress

mailQuota,mailMsgQuota

preferredLanguage

sn

uid

vacationEndDate

vacationStartDate

For more information on the attributes required or allowed by LDAP object classes for Messenger Express, see Chapter 3 Attributes in the Sun Messaging and Collaboration Schema Reference Manual at:

http://docs.sun.com/db/prod/s1msgsrv#hic

You might want to obtain other customized LDAP attributes from the server. For example, an ISP might have a custom LDAP attribute assigned to all users called myuserclass. This attribute could denote different types of users that access services, including Sun Java System Messenger Express. Possible values for this attribute are “regular” and “vip”.


Note –

Before adding custom attributes to the directory, ensure that the directory schema supports these new attributes. The global set of schema for Directory Server can be found in the entry named cn=schema.

For more information on extending directory schema, see Sun Directory Server Deployment Guide at:

http://docs.sun.com/db/prod/s1dirsrv#hic

After extending the directory schema, you can add the new attribute to a User or a group entry. To add custom attribute to a User entry you will need to modify the entry in servletsconf section using the ldapmodify command. For more information on ldapmodify command, see Sun Directory Server Configuration, Command, and File Reference at:

http://docs.sun.com/db/prod/s1dirsrv#hic


Depending on the type of user (that is, the value of the myuserclass LDAP attribute), different advertisement are presented to the user when they log into Sun Java System Messenger Express (Sun Java System Messenger Express is customized to display banner advertisement). If the customized client has access to the myuserclass LDAP attribute, the type of user can be determined and the relevant banner advertisement for that user type is displayed.

To obtain other customized LDAP attributes from the server, use configutil to modify the service.http.extrauserldapattrs configuration parameter. The attributes are read-only by default. If the user wants to modify an attribute using the Sun Java System Messenger Express code, that attribute needs to be marked read-write by appending the suffix w.

The example below assumes the user wants to display banner advertisements depending on the class of the user and that the client program allows the user to edit a link to a home page:

configutil -l -o service.http.extrauserldapattrs -v “myuserclass,homepage:w

Customizing Address Search to Return More LDAP Attributes

This section describes how to customize the Address Book Search to return more LDAP attributes.

You need to perform the following tasks to customize the Address Book Search to return more LDAP attributes:

For example, to customize the Address Book Search to return an additional LDAP attribute pager, perform the following steps:

ProcedureTo Include LDAP Attribute on Displayed Address Book Search Result

Steps
  1. Include the LDAP attribute pager to the list of LDAP attributes in the config attribute local.service.http.ldapaddresssearchattrs using the configutil utility:

    configutil -o local.service.http.ldapaddresssearchattrs -v "cn, mail, sn, telephoneNumber, pager"


    Note –

    Restart the Messaging server for the changes to take effect.


  2. Add the following line to the s_SearchCtrl() function in the lookup.fs file:


    ....
    '&nbsp;<select name="attr"\>\\n' +
    ....
    '<option value="'+ main.attr_list['telephonenumber']+
    '"\>Phone #</option\>\\n' +
    '<option value="'+ 
    main.attr_list['pager']+
    '""\>Pager #</option\>\\n' +
    '</select\>\\n' +
    ....
    
                   
  3. Add the following lines to the getSearchResults() function in the lookup.js file:


    if(forGroup) s = '<form name="form"\>\\n' + main.tableStart +
    ....
    '<td width=1% nowrap\><nobr\>' + main.font() + 
    (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
    '<td width=1% nowrap\><nobr\>' + 
    main.font() + (pab ?    i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
    else s = '</form\><form name="form"\>\\n' + main.tableStart +
    '<td width=1% nowrap\><nobr\>' + main.font() +
     (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
    '<td width=1% nowrap\><nobr\>' + 
    main.font() + (pab ?    i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
    
    ....
    
    
                   
  4. Add the following lines to the lookup.js file:


    ....
    if (list[i].telephoneNumber)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].telephoneNumber) + '</td\>\\n';
    else if (list[i].telephonenumber)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].telephonenumber) + '</td\>\\n';
    else
    s += blank;
    if (list[i].pager)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].pager) + '</td\>\\n';
    else if (list[i].pager)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].pager) + '</td\>\\n';
    else
    s += blank;
    
    s += '\\n';
    }
    ....
    
    
                   
  5. Add the following line to the updatePabAttrList() function in the main.js file:


    ....
    attr_list['telephonenumber']=
    pabFrame.attrs?pabFrame.attrs.telephonenumber.name:'telephonenumber';
    attr_list['pager']=
    pabFrame.attrs?pabFrame.attrs.pager.name:'pager';
    ....
    
    
                   

Customizing Messenger Express for a Specific Domain

This section describes how to customize the Sun Java System Messenger Express client interface for a specific domain.

You can perform the following tasks to customize the Sun Java System Messenger Express client interface:

Table 4–2 Directory Structure for the Domain siroe.com

html/...

// default interface 

html/imx/...

// default interface 

html/en/...

// default interface 

html/siroe.com/main.js

// refers to imx/bottle.gif

html/siroe.com/imx/bottle.gif

 

Table 4–3 Linking multiple domains to few distinct brands

html/...

// default interface 

html/sesta.com/...

// customized interface for brand 1 

html/varrius.com -\> sesta.com

// default interface 

Domain From URL

The server listens to all IP addresses and can present a customized interface before the authentication occurs. The server does this by looking at the URL and determines if it contains a known domain and presents the per domain Login screen for the domain.

For example, for the per domain Login screen: http://webmail.sesta.com/, the server presents the page from the location: html/sesta.com/en/default.html.

In this case a user does not have to suffix @domain to the username to login.