>K  soyMAIL> 2 0 1  &

&

¨

soyMAIL

y

Enterprise-classWeb-mail for OpenVMS

(





Installation

D

3and

Administration

R

!Copyright

I

Copyright ©2005,2006 Mark G. Daniel

>

This program, documentation, and associated0resources, come with ABSOLUTELY NO WARRANTY.

@

This is free software, and you are welcome to>redistribute it under the conditions of the GNU GENERAL PUBLICLICENSE, version 2

_

http://www.gnu.org/licenses/gpl.html

@

All trademarks within this document belong totheir legitimate owners.







U

Author

0

Mark G. Daniel

c

Mark.Daniel@wasd.vsm.com.au

=

A pox on the houses of all-SPAMers. Make that two poxes.

x

http://wasd.vsm.com.au/







W

Download

A

The latest release of soyMAIL is available fordownload from

http://wasd.vsm.com.au/wasd/







O

Publication$date and software version

F

Published 18 April 2006. Based on soyMAIL v1.1







]

OpenOffice.org

8

This document has been produced usingOpenOffice.org 2.0

Q

http://openoffice.org/

G
-
T

2 Table of Contents


n

1' Introduction 1

n

2' Installation 3

2.1' Apache (SWS) 4

}

2.2 OSU 5

2.3# Purveyor 5

~

2.4 WASD 7

2.5% SMTP Relay 7

o

3( Configuration 9

3.1% Directives 9

Œ

3.2. [html-editor-load] 11

ˆ

3.3* [logout-realm] 12

Š

3.4, [private-access] 13

3.5- [private-request] 14

3.6+ [public-access] 15

Š

3.7, [search-control] 16

3.8/ [smtp-default-host] 16

3.9/ [update-last-login] 17

3.105 Conditional Configuration 17

3.117 Regular Expression Overview 18

o

4) Customization 21

4.1" Locale 21

~

4.2 Site 21

~

4.3 User 22

t

5. soyMAIL User Files 23

v

60 Miscellaneous Topics 24

6.14 Run-time Problem Solving 24

6.23 Inconsistent State Data 24

6.38 Site Contact / Mailing Lists 24

6.42 General Access To Help 25




[

1 Introduction

=

soyMAIL is a native VMS applicationA(written using the C programming language) that executes as a CGICscript and allows authenticated Web access to an accounts VMS Mail.?All that is required at the client end is a (relatively) modern>browser supporting CSS2 (Cascading Style Sheets 2). JavaScript>significantly enhances the functionality of soyMAIL but is notessential to its use.

E

soyMAIL has been built on experience gained@hacking about with its progenitor yahMAIL but unlike yahMAIL wasDdesigned from the start to satisfy all the basic requirements for anEenterprise-class Web-based email interface. It is the authorsE(perhaps) humble opinion that soyMAIL is a more than worthy successorGas the 'son of yahMAIL'.

B

soyMAIL has been developed against these browsers

9

additionally reported to work with

8

these VMS Web server environments

B

designed to be suitable for building and use onall VMS platforms

=

and versions of VMS from V6.0 onwards.

+

soyMAIL supports 

2




H

soyMAILAhas a private accessDmode that allows authenticated access to an underlying VMS account'sAemail facility. This is where it provides the 'classic' web-mailBfunctionality. It also provides a public access mode whichBrequires no authentication (though it is not forbidden either) andCprovides controlled access to a specific folder, in a specific mailDfile, in a specific VMS account, intended to allow general access to,a managed subset of a users Mail.

D

soyMAIL has been carefully and extensivelyEoptimized to perform well within the general VMS environment and whenusing callable Mail.

B

It uses VMS callable mail to access an accounts8mail repository and to perform native VMS messaging.

A

Messages are originated via SMTP by connecting>directly to an SMTP server (usually but not necessarily on theElocalhost), and therefore requires access to an (at least local) SMTPErelay, in much the same manner as many client-based email agents.

[

2 Installation

D

soyMAILDrequires some configuration before use. It is recommended that thisDentire document be read and carefully considered before installation(and attempted usage.

C

soyMAILCis distributed as a source-code/run-time resource ZIP archive, with?optional supplementary object code archives for each of the VMS9platforms. For example, version one would be packaged

/
SOYMAIL100.ZIPSOYMAIL100-AXP.ZIPSOYMAIL100-IA64.ZIPSOYMAIL100-VAX.ZIP

CIt may be built from the primary archive using DECC 6 and later, or@link-only using in addition one of the supplementary object code archives.

D

Brief installation and other relevant informationAcan be obtained from the archive using the UNZIP “-z” option.

X

Link-Only

@

A link-only build has the following alternate?steps which can be used in any environment described below.

T
$ UNZIP “-V” device:[dir]SOYMAILnnn.ZIP@$ UNZIP “-V” device:[dir]SOYMAILnnn-<arch>.ZIP$ @BUILD_SOYMAIL LINK=

Update

:

An update (which does not overwrite the?configuration file) has the following alternate step and can be9performed in any of the environments described below.

~
$ @INSTALL UPDATE <server>

+Run-time Components

=

The following table describes the run-timeDcomponents. The installation procedure described below places theseEin the default locations the startup procedure expects to find them. AOf course the default location and procedures are not mandatory. @Components can be placed anywhere the site requires and a small,=local startup procedure developed to use them from there.

L                                


Component




Purpose


)

[.OBJ_<arch>]SOYMAIL.EXE


=

Architecture appropriate soyMAIL script executable, to6 [CGI-BIN], [BIN], etc. depending on the server




[.HELP]


H

Help documentation, located via the logical name SOYMAIL_HELP




[.LANG]


C

Language files located via the logical name SOYMAIL_LANG




[.THEME]


C

CSS and other thematic resource files located by the logical5 name SOYMAIL_THEME and by the script via the path /soymail/-/theme/




SOYMAIL.CONF


I

Configuration file located by the logical name SOYMAIL_CONFIG.




SOYMAIL_STARTUP.COM


E

Startup procedure to define required logical names and install SOYMAIL.EXE image








D

The contents of the [.LANG], [.HELP] and [.THEME]Csubdirectories in the soyMAIL distribution must be available to theserver and script.

E

The INSTALL.COM procedure should provide a defaultErun-time installation for each of the listed server environments.

E

2.1 Apache (SWS)

C

This installation information is per SWS versionB2.1. If you have a different version the requirements may requireadjustment.

C
$ SET DEFAULT APACHE$ROOT:[000000][$ UNZIP “-V” device:[dir]SOYMAILnnn.ZIP$ SET DEFAULT [.SOYMAIL]$ @BUILD_SOYMAIL$ @INSTALL INSTALL APACHE

4After installation files are located as follows.

L                        


File




Location




SOYMAIL.EXE


"

APACHE$COMMON:[CGI-BIN]




SOYMAIL_APACHE.COM


-

APACHE$COMMON:[CGI-BIN]SOYMAIL.COM




SOYMAIL_STARTUP.COM


!

APACHE$COMMON:[000000]




SOYMAIL.CONF




APACHE$COMMON:[CONF]








>

Apache requires the extra, script 'wrapper'=procedure SOYMAIL.COM, so that the process-level logical nameDDECC$FILE_SHARING defined in the Apache scripting environment can beCdeassigned before the C-RTL is activated by the soyMAIL executable.>This setting interferes with some soyMAIL file operations.

:

Mapping and authorization examples:

V
Alias /soymail/-/ "/apache$common/soymail/"5<Location ~ “^/cgi-bin/soymail/\~”>AuthType Basic+AuthName "OpenVMS authentication"AuthUserOpenVMS Onrequire valid-user</Location>

<Depending on the planned authorization source it may also be;necessary to check that the OpenVMS authorization module isconfigured.

^
LoadModule  auth_openvms_module  modules/mod_auth_openvms.exe

Private access URI:

}
/cgi-bin/soymail/~

3SWS 2.0 and 2.1 Note

Q

BAs at the publication date of this document there is an issue withDSWS 2.0 and 2.1 when POSTing request bodies greater than 64kB. This?potentially affects the uploading of attachment files, personalEnewmail audio files, and possibly editing the text of extremely large@messages. This issue is currently under investigation by the HP3OpenVMS Secure Web Browser/Server Project Team.

>

2.2 OSU

A

It is suggested to place the soyMAIL kit underWWW_ROOT:[000000].

@
$ SET DEFAULT WWW_ROOT:[000000][$ UNZIP “-V” device:[dir]SOYMAILnnn.ZIP$ SET DEFAULT [.SOYMAIL]$ @BUILD_SOYMAIL$ @INSTALL INSTALL OSU

4After installation files are located as follows.

M                    


File




Location




SOYMAIL.EXE




WWW_ROOT:[BIN]




SOYMAIL_STARTUP.COM




WWW_ROOT:[SYSTEM]




SOYMAIL.CONF




WWW_ROOT:[CONF]








:

Mapping and authorization examples:

R
protect /htbin/soymail/~* www_system:soymail.prot%pass /soymail/-/* /www_root/soymail/*

Private access URI:

K
/htbin/soymail/~

42.3 Purveyor

;

The Purveyor Encrypt Web Server has beenBunsupported by its vendor since 1999. This places it very much onBthe margin and soyMAIL support for the platform is provided on the=basis that it requires close to zero extra development time. DFortunately the CGILIB used by soyMAIL is aware of Purveyor and onlyCone other change to soyMAIL was required. The development platform=was “Purveyor Encrypt Export/v1.2.2 OpenVMS”.

?

Test-bench?installation placed soyMAIL in PURVEYOR_ROOT:[PURVEYOR.SOYMAIL]Balthough the actual location is of little consequence provided the-server can access the run-time resources.

G
$ SET DEFAULT PURVEYOR_ROOT:[PURVEYOR][$ UNZIP “-V” device:[dir]SOYMAILnnn.ZIP$ SET DEFAULT [.SOYMAIL]$ @BUILD_SOYMAIL

:There is no installation procedure provided for Purveyor. ?Installation must be performed manually. Some files need to be<copied to their required locations. The SOYMAIL_STARTUP.COM>procedure may also require customization or a local equivalentgenerated.

>

Possible file locations are as follows.

L                    


File




Location




SOYMAIL.EXE


5

PURVEYOR_ROOT:[PURVEYOR.DOCUMENTS.SCRIPTS]




SOYMAIL_STARTUP.COM


#

PURVEYOR_ROOT:[PURVEYOR]




SOYMAIL.CONF


#

PURVEYOR_ROOT:[PURVEYOR]








@

It is expected that the Purveyor installer of?soyMAIL will have a good understanding of how to administer theHPurveyor requirements. This is only a short synopsis of the basics.

:

To configure soyMAIL under Purveyor theEconfiguration DB must be edited manually or via the RSM. Two changesEare required. These map the soyMAIL run-time resources via a virtual/mapping. Assuming the example installation

¯
Key Name:  SYSTEM\CurrentControlSet\Services\Purveyor\Parameters\VirtualPathMapValue 99Name:            ~soymailType:            REG_SZ1Data:            purveyor_root:[purveyor.soymail]

and

f
Key Name:  SYSTEM\CurrentControlSet\Services\Purveyor\Parameters\MAPSValue 99Name:            /soymail/-/*Type:            REG_SZData:            ~soymail/*

ENote that example value of 99 in these examples is not a fixed number%but varies on site configuration.

<

Of course for private access the path

7
/scripts/soymail.exe/~

>must also be made subject to authorization. This is very siteCdependent but on the development test-bench the SAMPLE_AUTH_AXP.DLL9was used to directly authenticate against the SYSUAF.

@

2.4 WASD

?

With WASD the soyMAIL kit occupies the usual8location for source under the HT_ROOT:[SRC] directory. 

<
$ SET DEFAULT HT_ROOT:[SRC][$ UNZIP “-V” device:[dir]SOYMAILnnn.ZIP$ SET DEFAULT [.SOYMAIL]$ @BUILD_SOYMAIL0$ @INSTALL INSTALL WASD





G

After installation files are located as follows.

M                    


File




Location




SOYMAIL.EXE


%

HT_ROOT:[<arch>-BIN]




SOYMAIL_STARTUP.COM




HT_ROOT:[STARTUP]




SOYMAIL.CONF




HT_ROOT:[LOCAL]


2




:

Mapping and authorization examples:

2




,
# HTTPD$MAP(pass /soymail/-/* /ht_root/src/soymail/* set /cgi-bin/soymail/~* map=once# HTTPD$AUTH["description"=REALM]/cgi-bin/soymail/~* r+w

Private access URI:

3
/cgi-bin/soymail/~

82.5 SMTP Relay

<

soyMAILBoriginates SMTP Mail by directly communicating with a sites@SMTP server. This requires that server to be enabled as an SMTP>relay for at least the VMS system soyMAIL will be run on. TheAconfiguration for allowing relay varies on the TCP/IP and/or mailBpackage in use (i.e. TCP/IP Services, MultiNet, TCPware, MX, PMDF,etc.) 

|

CautionFshould be exercised when changing configuration to allow relay.C
The last thing that you need as a result is an open relay being.used for SPAM propagation!

9

The following example shows a possibleEconfiguration for HP TCP/IP Services (a.k.a. UCX) to provide this forCthe local VMS system running the soyMAIL script. The configuration*option to enable relaying must be set.

(
$ TCPIP-TCPIP> SMTP SET CONFIGURATION/OPTION=RELAY^Z





A

And an entryCplaced in the plain-text configuration to enable access for allowed SMTP clients (the localhost)

@
# TCPIP$SMTP_COMMON:SMTP.CONFIG0Good_clients: 127.0.0.0





C

The SMTP server that the soyMAIL script connectsBto is commonly running on the same (VMS) system as the script. ItDdoes not need to be. The configuration directive [SMTP-server-host]B(section 3.1) can be used to specify and alternate host name or IP&address for soyMAIL to connect to.

\

3 Configuration

<

soyMAIL configuration is provided using aBplain-text file located using the logical name SOYMAIL_CONFIG. The:configuration file must exist or all access is denied. TheDinstallation procedure copies an example configuration file allowing@private access and requiring some customization. Updates do notDsubsequently change this file. Comments may be included by prefixingCthe line with a '#' character. Each directive name is delimited byA'[' and ']' characters and directive parameters comprise all textEuntil the next comment or directive opening '['. Reserved charactersCmay be escaped using the backslash character. Leading and trailingDwhite-space is trimmed. Comments and directives must begin in column1.

D

A typical configuration file might look somethinglike

x
########################W# private soyMAIL accessW########################K[if-private]V[private-access]  */*/*][page-title]  The Company NameY[page-title2]  IT ServicesT[message-list-footer]ˆ<CENTER>~ IT Services can be contacted on 82596189 ~</CENTER>^[print-header] The Company Names[print-footer] ~ Internet, E-mail and Web Services ~P[help-about-site]ä<B><A HREF="http://the.host.name/">The Company Name</A></B> providesOpenVMS consultancy, programming and support, along with Web and Mail hosting.D[end]

;Comments, directive names and directive data can be seen. 

L

3.1 Directives

@

The following table provides a summary of all=directives, with those requiring more explanation expanded infollowing sections.

L                                                                                                        


Directive




Description




[downtime]


D

Disables the use of soyMAIL and gives the specified string as= a simple announcement to users connecting to soyMAIL.




[font-family-local]


B

Additional font families presented in the user options font selector. One per line.




[greeting]


@

Message presented in the status panel when a client firstD accesses soyMAIL, or its help or about pages. Can0 be used as a welcome or warning message.




[help-about-site]


H

Site-specific information presented on the Help 'About' page.




[html-editor-load]


>

JavaScript to load and instantiate the HTML editor (see section 3.2).




[logout-realm]


I

Enables the logout button and functionality (see section 3.3).



[message-list-footer]


D

Site-specific information (HTML text) presented in a separate/ panel below the folder message listing.




[page-title]


>

Superior line in main menu panel. Titles all pages.




[page-title2]


D

The text in [page-title] is forced left and the [page-title2] text is forced right.




[print-header]


1

Text header for printed mail messages.




[print-footer]


1

Text footer for printed mail messages.




[private-access]


B

Allows mapping between authenticated user (CGI remote-user)- and a VMS username (see section 3.4).




[private-request]


J

Indicates this request is for private access (see section 3.5).




[public-access]


D

Permits and maps request path strings to VMS Mail user names,0 mail file and folders (see section 3.6).


#

[public-options-default]


<

Allows the soyMAIL administrator to set public accessB 'personal option' settings(required to escape each leading '[' with a '\').




[public-request]


B

Indicates this request is for public access.
Complements( the [private-request] directive.




[search-control]


C

Controls designed to limit the impact of intensive searching7 activity on system resources (see section 3.7).




[smtp-default-host]


D

Specifies a host or domain name and makes an unqualified userD address such as Mark.Daniel into an RFC (Internet-style) addressN such as Mark.Daniel@vsm.com.au (see section 3.8).




[smtp-from-host]


<

Used when constructing the 'user@from.host.name'.


>

[smtp-server-host]


?

Host name/address of SMTP server soyMAIL connects to for8 Internet mail transport (defaults to localhost).




[soymail-at-title]


?

Site description provided in title bar of browser window< (defaults to "soyMAIL @ the.server.name").




[update-last-login]


E

Update SYSUAF last-login with each initial access (see section 3.9).


!

[user-options-default]


D

Allows the soyMAIL administrator to preset some options (e.g.B language) by providing options configuration text against thisH directive(it is required to escape each leading '[' with a '\').


"

[user-options-override]


A

Allows the soyMAIL administrator to override user selected@ options by providing options configuration text against thisI directive (it is required to escape each leading '[' with a '\').














c

3.2 [html-editor-load]

C

soyMAIL supports plug-in JavaScript HTML editors!for HTML message composition.

A

So far it has been tried successfully with




8      
*

FCKeditor v2.2

¯

http://www.fckeditor.net/
http://sourceforge.net/projects/fckeditor/












8     
)

TinyMCE v2.0

Ï

http://tinymce.moxiecode.com/
http://www.moxiecode.com/









@

Make your choice. Mine is TinyMCE. Install itCindependently of soyMAIL. Check configuration requirements for theCeditor. Modify the soyMAIL configuration directives to provide theBpath to the editor and the initialization JavaScript code, both ofAwhich will be provided in the editor installation guidelines, and@voila! The function htmlEditorLoad() must be present@(even if empty as in the case of TinyMCE), being an onload=<target for the document.

K

TinyMCEExample

3
[html-editor-load],<script type="text/javascript" Q        src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>/<script type="text/javascript">tinyMCE.init({   mode : "exact",'   elements : "compose_text",    theme : "advanced",5   plugins: "preview,print,insertdatetime",F   theme_advanced_buttons1_add: "fontselect,fontsizeselect",:   theme_advanced_buttons2_add: "preview,print",B   theme_advanced_buttons3_add: "insertdate,inserttime",F   theme_advanced_buttons3_add_before: "forecolor,backcolor"});Afunction htmlEditorLoad() { /* nothing required for TinyMCE! */ }</script>

>This would also require a server mapping rule into the TinyMCE?installation. For the above configuration and WASD it might besomething like

C
pass /tinymce/* /$1$disk/tinymce/*X

)FCKeditor Example

3
[html-editor-load]f<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>/<script type="text/javascript">function htmlEditorLoad(){5   var oFCKeditor = new FCKeditor( 'compose_text' ) ;2   oFCKeditor.BasePath = "/fckeditor/" ;!   oFCKeditor.ReplaceTextarea() ;}</script>

,Along with a similar mapping requirement

G
pass /fckeditor/* /$1$disk/fckeditor/*

@3.3 [logout-realm]

C

The soyMAIL [logout] button and functionality isBbased on a Kludge that tries to hoodwink the browser into thinking<its cached credentials are no longer valid. It does this byDreturning an HTTP 401 response (authentication required) itself as aCresponse to hitting the [logout] button. The idea is to present toCthe browser a refusal to use the supplied username/password against@the request path whereupon the browser purges the entry from itscredential cache.

E

As described above this is a Kludge with a capitalFK. Why HTTP/1.1 didn't include a 418 (authorization canceled) –Eor some mechanism such as this – I'll never know! Not only are@there inconsistencies in the way browsers handle this (hence theCcredential clear, [ok] and final [cancel]) there are some issues in=getting a CGI application issued Status: 401 authorization@required through the server@sufficiently unscathed and functional as to be recognised by the5browser as an authorization refusal. So...

C

WASD handles all thiswith its usual panache :-)

E

VMS Apache and OSU needEsome additional working-around. Hence the [logout-realm] directive. EUnless this is set the [logout] button is greyed-out (italicised) andCthe functionality disabled. This must be set to exactly theBsame string used by the authorization realm configured against theAsoyMAIL path in the servers configuration. If it not exactly the>same string some servers go into infinite loops, some browsers8re-request ad-infinitum, etc. You have been warned!

;

For an Apacheconfiguration of

V
<Location ~ “^/cgi-bin/soymail/\~”>AuthType Basic+AuthName "OpenVMS authentication"AuthUserOpenVMS Onrequire valid-user</Location>

)the soyMAIL configuration must be set

G
[logout-realm]  OpenVMS authentication

For an OSU configuration of

R
protect /htbin/soymail/~* www_system:soymail.prot

'and a soymail.prot configuration of

:
<realm> VMS account*@*.*.*.* *

*the soyMAIL configuration would be set

<
[logout-realm]  VMS account

?The soyMAIL configuration directive may also be set to a single:hyphen to disable the logout button and functionality.

X

3.4 [private-access]

E

Private-access is a term used to describe a client?making authenticated access to an underlying VMS accounts email facility.

O

The<private access URI must have been made subject to Web serverAauthorisation.
If there is no browser username/password dialog2then it's not configured correctly!

B

soyMAIL identifies private access when the pathAhas the leading characters “/~”. For example, in thecase of Apache and WASD

3
/cgi-bin/soymail/~L

CAlternatively, a site-specific private sentinal can be>configured using the [private-request] configuration directive(section 3.5).

B

There@needs to be a explicit configuration directive to enable private@access and optionally to map between authenticated users and VMS%usernames. The general format is

d
<remote-user>/<realm>/<vms-username>

AThe realm allows WASD authentication realms to be factoredAinto the mappings but almost always will remain an asterisk.

B

If there is a one-to-one correspondence betweenCthe Web-server authenticated user name (as it is common to use someDform of SYSUAF-based authentication this is usually the case) then aDsimple rule against the directive is enough to allow any user access to Mail.

A
[private-access]  */*/*

ESpecific accounts can be denied access by deliberately disrupting theDmapping. In this case the SYSTEM and ANOTHER accounts are mapped to/non-existing accounts _SYSTEM and _ANOTHER.

1
[private-access]system/*/_systemanother/*/_another*/*/*





C

Using the sameCmechanism a non-VMS-account remote user may be mapped into the mail of an existing VMS username.

1
[private-access]freddo/*/nurkf	jd/*/doejV*/*/*

"Postmaster

E

POSTMASTER@is a flag that can be placed against any user name. It allows aEusername to be specified in the soyMAIL path different to that of the>authenticated username (normally this will result in a soyMAILC“insufficient privilege or object protection violation”fatal error). For example

:
/cgi-bin/soymail/~daniel/

@This postmaster can then do anything using soyMAIL the specifiedHusername can do. Such an account is flagged in the following manner.

1
[private-access]whomever/*/(POSTMASTER)*/*/*

=Note that POSTMASTER here is not an account. It is a soyMAILBcharacteristic flagged against the username. The parentheses are required.

Z

3.5 [private-request]

E

By default the leading characters “/~”Cof the path indicates to@soyMAIL a private access request. This directive overrides thatBtilde sentinel and allows any request to be recognized for privateBaccess. It intended to be used inside a conditional configuration?test (section 3.10) based on some characteristic of the request reflected in a CGI variable.

E

The followingRexample shows a configuration test for the presence of a REMOTE_USERHvariable indicating it is a request subject to server authorization.

5
[if-CGI-remote_user][private-request][end-if]

@This effectively directs soyMAIL to consider any such authorizedrequest is private access.

?

The second example shows a test based on theCrequest script name and assumes that the server has mapped the path&/mail onto the soyMAIL executable.

?
[if-CGI-script_name]  ^^/mail$[private-request][end-if]

EThe first leading caret indicates it is a regex pattern; the second aBregex 'beginning of line' symbol; then the string used to activateCsoyMAIL; and a regex 'end of line' dollar symbol. This makes it anexact match test.

E

Note that theC[private-request] directive must be specified before the use of any?directives that rely on recognition of private or@public access (e.g. [if-private], [if-public], [private-access],[public-access], etc). 

V

3.6 [public-access]

D

This facility is intended to allow general access?to a managed subset of a users Mail. Public access requires noDauthentication (though it is not forbidden either). There are threeDvariations on public access. The first rigidly controls access to aEspecific folder, in a specific mail file, in a specific VMS account. AThe second, a wildcard folder specification, allows access to anyAfolder in the specified mail file and account. The third, also a@wildcard specification, prohibits access to the account MAIL andNEWMAIL folders.

,

The general format is

|
/<public-path>/ /<username>/<mail-file>/<folder-name>/

"with the full wildcard variant

j
/<public-path>/ /<username>/<mail-file>/*/

8and the prohibited MAIL and NEWMAIL wildcard variant

k
/<public-path>/ /<username>/<mail-file>/*!/

BBoth wildcard variants allow an initial folder to be specified

Ç
/<public-path>/ /<username>/<mail-file>/*<folder>/
/<public-path>/ /<username>/<mail-file>/*!<folder>/


DThe public path string is used in the URL and need not be related to7any part of the real components of the mail access.

0
[public-access]!/an_example/  /NURKF/MAIL/PUBLIC/%/another_example/ /DOEJ/ARCHIVE/MAIL/!/public/ /LARRY/MAIL/*!MY_PUBLIC/

$The first rule would map the URL

Q
http://the.host.name/cgi-bin/soymail/an_example/

Cto VMS account NURKF, the default mail file MAIL.MAI and the PUBLICfolder in that.

3

The second rule maps the URL

V
http://the.host.name/cgi-bin/soymail/another_example/

Eto the JOED account, mail file ARCHIVE.MAI and folder MAIL in it.

2

The third rule maps the URL

M
http://the.host.name/cgi-bin/soymail/public/

>to the LARRY account, mail file MAIL.MAI and an initial folderCMY_PUBLIC, with access allowed to all other folders except MAIL and NEWMAIL.







a

3.7 [search-control]

C

Mail message searching can be a very compute andDI/O intensive activity. Essentially soyMAIL searching is performed8on two levels with significantly different expenses.

D

Regular expression matching is significantly more(CPU intensive than keyword matching.

C

The following parameters to the [search-control]Bdirective allow fine control of the extent of search capability toBassist in managing the system impact of this activity. ConditionalBconfiguration (see below) makes it possible to apply these to someBrequests and not others. One or more, space-separated, can be usedagainst the directive.

„                            


Parameter




Description




full


@

Is the default if [search-control] is not configured.




header-only


8

As described above this is quite lightweight.




keyword-only


E

Disable regular expression matching. It is still available to! configuration directives.


*

priority=<integer>


?

Once message body searching begins this moves the scriptB process priority to that specified (0..4) and restores it when searching completes.




none


@

Disables searching completely (and is obviously the least expensive :-)


^

3.8 [smtp-default-host]

A

This directive allows a host/domain name to beCautomatically appended to an unqualified user name (i.e. an addressIwith a local but no @domain part). With this set to the.host.nameCentering an address of Mark.Daniel would result in a send to"Mark.Daniel@the.host.name. 

C

soyMAIL adds the default host/domain part beforeCsending or whenever the page is refreshed. The modification to theEaddress can be requested at anytime by selecting the [compose] button$and thereby refreshing the page.

>

Of course setting this directive disables aAdefault send via VMS Mail. When set VMS Mail can still be used by8prepending a node name to the address (e.g. '0::DANIEL','DELTA::DANIEL', etc.)

d

3.9 [update-last-login]

B

For sites with a requirement to track continuedAaccount usage this directive results in the SYSUAF interactive orBnon-interactive (default) last-login datum being updated with each>initial access. An initial access is defined as a startup GET@request from entering the private access URL into the browser orCselection of a bookmark/favourite. Continued use of an established?session (using the buttons or new mail check facility) does not2result in updates to the last-login date/time.

D

Parameter to this directive should be INTERACTIVEor NON-INTERACTIVE.

I

#3.10 Conditional Configuration

A

soyMAIL has a useful facility allowing dynamicDconfiguration of soyMAIL processing based on request characteristicsEand CGI variable content. This allows a single configuration file to6support multiple site appearances or capabilities.

E

Conditional directives begin with a test. Some areEbooleans. For CGI tests it either looks for the keyword provided withEthe test directive in the specified CGI variable value, or uses it as@a regular expression (regex) to match against the variable valueD(EGREP compliant). A regular expression must be prefixed by a caret:character ('^') which of course is not used as part of theEexpression. If a CGI variable doesn't exist it is treated as an empty string.

L                                


Directive




Description


'

[if-CGI-<name>]


C

If the CGI variable specified by <name> matches; the directive string then process the directives to the corresponding [if-end].


+

[if-not-CGI-<name>]


C

If the CGI variable specified by <name> doesE not match the directive string then process the directives to# the corresponding [if-end].




[if-private]


;

If soyMAIL is being used to access private mail.




[if-public]


/

If being used to access public mail.




[if-end]


F

Terminates a block started by a matching [if-..] directive.




[end]


B

WARNING: Terminates all further configurationD processing at that point. This is intended merely to save a few? CPU cycles. Deploy inside relevant [if-..] directives.


K

KeywordExample

B
[if-CGI-http_host]  the.host.name%[if-CGI-server_name]  the.server.name&[if-not-CGI-remote_user]  R_J_ECUREUIL=

0Equivalent Regex Example

I
[if-CGI-http_host]  ^.*the\.host\.name.*,[if-CGI-server_name]  ^.*the\.server\.name.*h[if-not-CGI-remote_user]  ^.*R_J_ECUREUIL.*

=Regex Equivalents of Common Wildcards



7                  
Y

asterisk ('*')


X

matches1 zero or more characters


W

period. then asterisk ('.*')


Y

question$ mark ('?')


X

matches. any single character


W

period ('.')


[

Percentage ('%')


X

matches. any single character


W

period ('.')









M

'Boolean'Tests

@

Empty and non-empty strings may be tested for.using an empty parameter to the directive.

<

If the variable contains a value then theCfollowing test will be true. If the variable does not exist or has)an empty value then it will be false.

F
[if-CGI-<variable_name>]

CIf the variable does not exist or contains an empty value then thisAsecond test will be true. If it contains a value then it will be false.

[if-not-CGI-<variable_name>]

9Conditional Configuration Example

F
# first directives for private access[if-private]age-title] The Page Title"[if-CGI-server_name] www.site1.com<[message-list-footer] For more information on Site 1 see ...[if-end]"[if-CGI-server_name] www.site2.com<[message-list-footer] For more information on Site 2 see ...[if-end][if-end]### then directives for public access[if-public][page-title] The Public Page-[message-list-footer] Just an public example!6[public-access] /public-2005/ /WEBMASTER/MAIL/PUB2005/[if-end]

h3.11 Regular&Expression Overview

?

soyMAILDemploys the GNU RX1.5 regular expression package. Evaluation is done=using case-insensitive, EGREP-compatible matching. A detailedDtutorial on regular expression capabilities and usage is well beyondLthe scope of this document. ThisFsummary is only to serve as a quick mnemonic.

@

Also see¥http://en.wikipedia.org/wiki/regular_expression

?

soyMAILMregular expressions support the following set of operators.

L                                                


Description




Usage




Match-self Operator




Ordinary characters


$

Match-any-character Operator 



.


!

Concatenation Operator




Juxtaposition




Repetition Operators




* + ? {}




Alternation Operator



|




List Operators




[...] [^...]




Grouping Operators




(...)


"

Back-reference Operator




\digit




Anchoring Operators




^ $




Backslash Operator


5

Escape meta-character (e.g. \ ^ . $ | [ ()








E

The following;operators are used to match one, or in conjunction with theBrepetition operators more, characters of the target string. TheseCsingle and leading characters are reserved meta-characters and mustEbe escaped using a leading backslash ("\") if required as a<literal character in the matching pattern.

L                                    


Expression




Purpose



^


*

Match the beginning of the line



.




Match any character



$


$

Match the end of the line



|




Alternation (or)




[abc]




Match only a, b or c




[^abc]


+

Match anything except a, b and c




[a-z0-9]


<

Match any character in the range a to z or 0 to 9








B

RepetitionAoperators control the extent, or number, of whatever the matchingDoperators match. These are also reserved meta-characters and must beWescaped using a leading backslash if required as a literal character.

L                                


Expression




Function



*



Match 0 or more times



+



Match 1 or more times



?



Match 1 or zero times




{n}



Match exactly n times




{n,}


!

Match at least n times




{n,m}


5

Match at least n but not more than m times








q

Checking,Regular Expressions

C

soyMAIL can;be used at the command line to check the results of regular:expression pattern matching. This can assist with creatingCconditional configuration. Assign soyMAIL as a foreign verb and use!as illustrated.

ç
$ SOYMAIL /REGEX ”<text to be matched>” “<pattern>”

:4 Customization

:

soyMAIL provides three levels ofcustomization.

D

4.1 Locale

E

The [.LANG] directory contains the default English?language message file, EN.TXT. This can be copied to another,Clanguage-indicative file name and the text of the messages modifiedEappropriately. The content of these files is not intended to be used=for site-local changes to messages. Directives in the soyMAIL@configuration file are for this purpose. The language files are2global components of the soyMAIL distribution.

A

If you wish to put a language-specific messageDfile together for soyMAIL please contribute it back into the soyMAILDcommunity. Note that messages can be used in all sorts of contexts,Dparticularly inside string literal quotes - both single and double. EIt is therefore necessary to substitute the HTML entities &quot;,?&rsquo;, etc., for anything that might be misinterpreted asEJavaScript code quotes (i.e. " (0x22) and ' (0x27)). If soyMAIL>reports a message file fatal error the SOYMAIL$WATCH facilityG(section 6.1) can be used to help determine the underlying problem.

E

The [.HELP] directory contains the default EnglishBlanguage, on-line, content-sensitive help files. These contain the=help information and HTML markup. Each files name contains an>indication of the language, where the English version might beBHELP_EN.HTML, the French language version HELP_FR.HTML, etc. TheseBfiles are dynamically accessed and composed by soyMAIL when a userCaccesses on-line help. The users language option is used to searchEfor a possible file with that language indicated in the name. If not?found it supplies the default English language version. One orC(preferably) all of each of the help topic files can be copied to a@language-specific instance and translated. As with message files?please make any such resources available to the general soyMAILcommunity.

@

4.2 Site

=

The soyMAIL configuration file has severalEdirectives intended to allow site-specific information to be included.in soyMAIL pages at appropriate locations.

D

The SMTP host and apparent source of messages canbe specified.

I

LocalUser Option Defaults

E

Users options may be defaulted and overridden.

C

For example; to provide a language default other than English, perhaps German

7
[user-options-default]\[language]  de

ATo force a site to use a particular (perhaps corporate) theme

8
[user-options-override]?\[theme] _draco_corp

Two notes:

I

LocalHelp

?

In addition a site-specific help file can be3created in the [.HELP] directory. It must be named@_SITE_<language>.HTML (note the leading underscore,Cwhich means it will not be overwritten by a soyMAIL update, and theElanguage component). If this file is found during help composition itDis appended to the primary help page (that obtained in help by usingAthe [help] button) and is intended for providing site information$and/or links of local relevance.

@

4.3 User

?

The options button in the main menu provides$access to user options settings.

a

5 soyMAIL User Files

E

soyMAIL creates and maintains several files in theDsame directory as the users MAIL.MAI file. The names all begin with?the string “SOYMAIL_”. Needless-to-say these filesCshould not be deleted or edited without good reason and care. DoingBso potentially disrupts the users soyMAIL environment. Some, all,@multiple instances, or none of these may be present at any given time.

M                            


File Name




Purpose


'

SOYMAIL_nnnnnnnnnnnnnnnn.ATT


D

Binary content attachment file either saved from a message or* uploaded via the composition page.



SOYMAIL_CONTACTS.LDIF


@

LDAP Data Interchange Format (LDIF) file containing users( contact and address information.




SOYMAIL_DRAFT.TXT


E

Plain text file containing the most recently saved composition draft.




SOYMAIL_OPTIONS.TXT


=

Plain text configuration file storing the users option settings.


!

SOYMAIL_YOUGOTMAIL.WAV


D

Binary audio file containing users optional “you've got" mail” audible alert.








c

6 Miscellaneous Topics

G

Miscellaneous soyMAIL features and other topics.

G

!6.1 Run-time Problem Solving

D

When an error is reported, either fatal or in the@status panel, the source code module name and line number of theEreporting point is included as an HTML comment (the page source needs?to be opened and searched) to assist in locating and rectifying issues.

Ÿ
<!-- *****  REPORTING MODULE:LINE IS MESSAGE:2822  ***** -->

<Please include this information when reporting problems.

9

Defining the system-level logical nameBSOYMAIL$WATCH to either TRUE or the IP address of the client to beCobserved provides a plain-text report designed to assist in solving2configuration or software issues with soyMAIL.

F

6.2 Inconsistent State Data

>

To prevent data corruption and inconsistentAbehaviours soyMAIL performs integrity checks on the state data it>propagates from request to request. It is possible for a user>session spanning a soyMAIL update (version release) to see the#following error status message.

>
  Inconsistent state data (version).  Restarting session.

CThis is of no concern. The change in version has been noted by the=software and to prevent any potential inconsistencies in dataDstructures causing subtle or gross problems it has reinitialized the?state data resulting in an effectively empty session. The userGshould just reopen (not refresh/reload) the particular page.

C

The second variation of this message is a littlemore concerning.

A
  Inconsistent state data (corruption).  Restarting session.

CsoyMAIL maintains a hash of the state data which is propagated withEit. The hash is recalculated and compared at the next request. ThisDerror reports the comparison failed and indicates data corruption in;the request state. The session is effectively emptied as aEprecautionary measure. Instances of this message should be very rare-and if persistent carefully investigated.

K

%6.3 Site Contact / Mailing Lists

D

The logical name SOYMAIL_CONTACT_LIST can be used>to specify a logical list of contact lists (in addition to anyApersonal contacts). This functions as a multi-value logical name:with each value being the logical name for, or actual fileEspecification of, a soyMAIL format contacts list or a VMS-style (each=line in the file contains a single address) mailing list.

E

For example:

.
  $ DEFINE /SYSTEM SOYMAIL_CONTACT_LIST -J    ALL_USERS_LIST,GROUP1_USERS_LIST,GROUP2_USERS_LIST,GROUP3_USERS_LIST,-#    EXTERNAL_LIST,MAILING_LIST_LIST

AWhere ALL_USERS_LIST is a VMS-style, so are GROUP1_USERS_LIST and<GROUP2_USERS_LIST. MAILING_LIST_LIST is a file containing aEVMS-style mailing list of the mailing lists supported by the system. 3For the above it might contain five lines with:


  ALL_USERS_LIST  GROUP1_USERS_LIST  GROUP2_USERS_LIST  GROUP3_USERS_LIST  EXTERNAL_LIST

:These can then be selected to mail to the entire list.

P

6.4 GeneralAccess To Help

9

Context-sensitive help is available toAauthenticated users accessing private mail. A page built from theIconsolidated help information (and distinctly resembling the printApage for context-sensitive help) is available for unauthenticatedA(general) access. Use the following URL to access this page.

]
http://the.host.name/cgi-bin/soymail?help