Configure
The CryptoMail Email System can operate with minimal configuration, but you might want to customize some features of the Email system to fit your website. The Email system allows you to customize your website for sign up, login and change passphrase functionality. You edit HTML files to customize the server generated pages of the Email server for validating Email accounts, loading the Java Applets and posting error messages. For the client, you modify a HTML file to guide your users back to you website after logout.
If you want to limit access to the CryptoMail Administration Modules, you should consult your web server documentation about limiting access to files in the web server.
<host_name> - domain name of the hosting server <html_publish> - HTML publish directory <cm_cgi> - the CryptoMail Server CGI
Customizing Sign Up, Login and Changing Passphrase Pages
You customize several web forms of the CryptoMail Server for your users to sign up, login and change passphrase by editing the default HTML files in the <html_publish>/CryptoMail/ or by inserting the FORM tag to your webpage. If you decide to insert the FORM tag to your webpage, you must use the POST method and point the action to location of the CryptoMail Server CGI as following.
<FORM ACTION="https://<host_name>/cgi-bin/<cm_cgi>" METHOD="POST">
<INPUT TYPE="text" NAME="UserName" SIZE="16" MAXLENGTH="16">
<INPUT TYPE="submit" NAME="Submit">
</FORM>
Interactive with CryptoMail Server CGI
| Function |
Description |
Default HTML |
CryptoMail Server CGI |
| Sign Up |
Users use it to sign up a new Email account. |
NewCryptoMailAccount.html |
CryptoMailNewUser.cgi |
| Login |
Users use it to login to their Email account. |
Login.html |
CryptoMailSession.cgi |
| Change Passphrase |
Users use it to change their passphrase of their Email account. |
ChangePassphrase.html |
CryptoMailChangePassphrase.cgi |
Customizing Server Generated Pages
The CryptoMail Server CGI reads HTML templates from its current working directory to generate pages for validating Email accounts, loading Java Applets and posting error messages. The customized server generated pages are useful to make the Email client fit the style of your website. The HTML templates contain replacement tags and the server CGI will substitute all replacement tags with all neccesary elements into a webpage.
Server Generated Pages
| Page |
Description |
HTML Template |
CryptoMail Server CGI |
| Bad User Name Message |
Server responds to an invalid user name for a new Email account during sign up, because the user name has used character(s) other than alpha or/and number. |
BadUserName.html |
CryptoMailNewUser.cgi |
| User Name Exists Message |
Server responds to an unavailable user name for a new Email account during sign up, because another user has taken the user name. |
UserNameExists.html |
CryptoMailNewUser.cgi |
| No Users Message |
Server responds to a non-exist user's account during login and changing passphrase, because the user name (Email account) does not exist. |
HokeyUserName.html |
CryptoMailSession.cgi and CryptoMailChangePassphrase.cgi |
| Session Fail Message |
Server responds to a session fail and substitutes a replacement tag {{WHY}} with a fail reason. |
SessionFail.html |
CryptoMailSession.cgi |
| Maximum User Session Message |
Server responds to user for reaching the maximum number of session. |
MaxUserSessions.html |
CryptoMailNewUser.cgi, CryptoMailSession.cgi and CryptoMailChangePassphrase.cgi |
| Maximum Database Session Message |
Server responds to user for reaching the maximum number of database session. |
MaxDBSessions.html |
CryptoMailNewUser.cgi, CryptoMailSession.cgi and CryptoMailChangePassphrase.cgi |
| Internal Error Message |
Server responds an internal error in the Email server. |
InternalError.html |
CryptoMailNewUser.cgi, CryptoMailSession.cgi and CryptoMailChangePassphrase.cgi |
| New Account Applet |
Server substitutes all replacement tags for loading a Java Applet to create a new account during sign up. |
NewAccount.html |
CryptoMailNewUser.cgi |
| Session Applet |
Server substitutes all replacement tags for loading a Java Applet to run the Email client after login. |
Session.html |
CryptoMailSession.cgi |
| Change Passphrase Applet |
Server substitutes all replacement tags for loading a Java Applet to change passphrase. |
Passphrase.html |
CryptoMailChangePassphrase.cgi |
You must use the same HTML template name, HTML template location, replacement tag name and replacement tag location to make your customized pages work.
All replacement tags are enclosed with "{{" and "}}" to create a general form of {{<variable>}}. You employ the replacement tags for providing a session fail reason, username, session ID, session key, Blowfish key and Elgmal key, or basically, when the server CGI needs to output CryptoMail related information dynamically. For the New Account Applet, Session Applet and Change Passphrase Applet pages, you have basic elements in the HTML templates.
<cm_app> - Java Applet name (e.g. CryptoMailApp)
<cm_app_url> - URL of the Java applets (e.g. /CryptoMail/JAVAClient)
<SCRIPT LANGUAGE="JavaScript">
if (navigator.appName == "Microsoft Internet Explorer") {
appletstring = '<APPLET CODE="<cm_app>" WIDTH=700 HEIGHT=475 NAME="CryptoMail" ID="CryptoMail" ALIGN="top">';
appletstring += '<PARAM NAME="cabbase" VALUE="<cm_app_url>/<cm_app>.cab">';
} else {
appletstring = '<APPLET ARCHIVE="<cm_app_url>/<cm_app>.jar" CODE="<cm_app>" CODEBASE="<cm_app_url>" WIDTH=700 HEIGHT=475 NAME="CryptoMail" ID="CryptoMail" ALIGN="top">';
}
appletstring += '<PARAM NAME="USERNAME" VALUE="{{USERNAME}}">';
appletstring += '<PARAM NAME="HTTP_CRYPTOMAILHOME" VALUE="{{HOME}}">';
appletstring += '<PARAM NAME="HTTP_CRYPTOMAILSESSIONID" VALUE="{{SESSION}}">';
appletstring += '<PARAM NAME="HTTP_CRYPTOMAILSESSIONCLOAKID" VALUE="{{SESSIONCLOAK}}">';
appletstring += '<PARAM NAME="HTTP_CRYPTOMAILSESSIONCLOAKBLOWFISHKEY" VALUE="{{SESSIONCLOAKBLOWFISHKEY}}">';
appletstring += '<PARAM NAME="SESSIONBLOWFISHKEYINHEX" VALUE="{{SESSIONBLOWFISHKEYINHEX}}">';
appletstring += '</APPLET>';
</SCRIPT>
A client side script is necessary to create HTML tags for different browers during loading, because browsers load Java Applets differently. IE likes to deal with CAB files, while Netscape likes JAR files. The key issue is to have two different Applet tags in your customized pages. By customizing the Server Generated Applet pages, you will able to combine the key elements (a client side script to write a Java Applet) with other scripting of your website. For detailed information about customizing the CryptoMail Server Generated Applet pages, please read Client/Server Manual.
Customizing Client Referral Pages
The CryptoMail Client points at the URL address of the HTML files for login failure, logout page and error message. For example, when the users log out from the Email system, the client will load a HTML file. For other client referral pages, you should place them inside the default directory for the URL - https://<host_name>/CryptoMail. You edit those referral pages, LoginFail.htm, Logout.html and Error.html to customize the Email system for your website.
Client Referral Pages
| Page |
Description |
HTML File |
CryptoMail JavaApplet |
| Incorrect Passphrase Message |
Java Applet reponds to an incorrect passphrase for an Email account during login. |
LoginFailure.html |
CryptoMailApp and CryptoMailChangePassphraseApp |
| Logout Message |
Java Applet reponds to a logout command from users. |
Logout.html |
CryptoMailApp |
| Error Message |
Java Applet reponds to a hard failure due to server side internal error. |
Error.html |
NewCryptoMailAccount, CryptoMailApp and CryptoMailChangePassphraseApp |
|