IlohaMail and WASD PHP
These are some guidelines
for installing and configuring IlohaMail for
PHP under WASD.
It is not a definitive document. It is
basically just a description of how I managed to get IlohaMail
running. There are undoubtably alternative, probably better
approaches. These guidelines were developed using IlohaMail very
much out-of-the-box, with a disk-based back-end. MySQL has not be
experimented with at all.
This software configuration information is provided under the
terms of the GNU General Public Licence as published by the Free
Software Foundation; version 2 of the License, or any later version.
16 January 2005
Disclaimer
I am not an administrator or even user of IlohaMail. I undertook
this exercise to demonstrate how it might be supported under WASD
PHP. There is no point in querying me personally on IlohaMail
setup, quirks, changes, etc. If there is something incorrect
within these guidelines or information by which they could be improved
then by all means advise me. Likewise if it's suspected WASD or
WASD PHP is misbehaving itself or requires refinement.
mark.daniel@wasd.vsm.com.au
Session File Access
Conflict
PHP-based webmail applications that use HTML frames are prone to conflicts of access to
it's on-disk session files.
This is well known and documented issue with CSWS PHP 1.2 (PHP 4.3.2)
that takes two forms. File-access conflict, where one frame
reports
the session file locked by another process. This can be
circumvented
using the DECC$FILE_SHARING feature logical
name. When
this is enabled a second issue immediately has the potential to cause
problems. It would appear as if the session file is emptied by
one
process (frame) while attempting to be read by another (frame).
This
results in an error message and/or ACCVIO. Obviously this is a
major
issue. Anyone has a fix for these behaviours?
Ilohamail occasionally seems to be affected by this issue.
Requirements
These guidelines were developed in the following environment.
Other combinations may work, or may not.
- ODS-5 volume for IlohaMail to be installed on (mandatory)
- A tar archive of the
IlohaMail kit (mandatory)
- An ODS-5 aware tar
(e.g. VMSTAR v3.4-1) (mandatory)
- WASD v9.0
- WASD PHP v1.2.3 (based on CSWS PHP 1.2 (PHP 4.3.2))
- IlohaMail v0.8.14-RC2
- OpenVMS V7.3-2
- HP TCP/IP Services V5.4
Installation
Restore the archive to disk.
$ set process /parse=extended
$ set default ODS5_DISK:[000000]
$ vmstar -xf
dev:[dir]IlohaMail-0^.8^.14-rc2^.tar
This creates a directory
ODS5_DISK:[IlohaMail-0^.8^.14-rc2]
File-System
A concealed device logical name must be defined. To make this
permanent it needs to placed in a system or Web-related startup
procedure. Note that it specifies a subdirectory of the main
version-specific directory.
$ define /system /executive /translation=concealed -
ilohamail
ODS5_DISK:[IlohaMail-0^.8^.14-rc2.IlohaMail.]
This directory structure must be made accessable to the default WASD
server and
scripting accounts.
$ sechan == "$ht_exe:sechan"
$ sechan /asif=runtime
ODS5_DISK:[000000]IlohaMail-0^.8^.14-rc2.dir
$ sechan /asif=runtime ODS5_DISK:[IlohaMail-0^.8^.14-rc2...]*.*
$ sechan
/asif=scratch ODS5_DISK:[IlohaMail-0^.8^.14-rc2.ilohamail.data...]*.dir
$ set file /version=1
ODS5_DISK:[IlohaMail-0^.8^.14-rc2.ilohamail.data...]*.dir
If a different account is used to execute IlohaMail similar
considerations will need to be made.
PHP Configuration
IlohaMail requires some tailored initialization parameters.
$ copy ht_root:[src.php]php.ini hastymail:[000000]phpwasd.ini
$ edit
hastymail:[000000]phpwasd.ini
Modify or add the following parameters:
include_path = ".:.."
extension = php_pcre.exe
allow_call_time_pass_reference = on
Check IlohaMail "PHP Configuration" document for other recommended
settings.
WASD Scripting Wrapper
An IlohaMail-specific wrapper procedure ILOHAMAIL.COM
can be placed in HT_ROOT:[CGI-BIN]
$! ILOHAMAIL.COM
$ set noon
$ define decc$argv_parse_style enable
$ define
decc$efs_case_preserve enable
$ define decc$efs_charset enable
$ define decc$efs_case_special enable
$ define
decc$enable_getenv_cache enable
$ define decc$posix_seek_stream_file enable
$ define decc$file_sharing enable
$ define
phpwasd$ini ilohamail:[000000]phpwasd.ini
$ mcr cgi_exe:phpwasd.exe
WASD Mapping Rules
WASD mapping rules then make the application accessable.
# HTTPD$MAP
exec /ilohamail/**.php (@cgi-bin:[000000]ilohamail.com)/ilohamail/*.php
\
ods=5 script=syntax=unix script=query=relaxed map=once
pass /ilohamail/* /ilohamail/*
dir=noaccess
IlohaMail documentation sometimes mentions the URL alias of /webmail/.
To access IlohaMail using this just provide the required rules in place
of, or addition to, any existing rule set.
exec /webmail/**.php (@cgi-bin:[000000]ilohamail.com)/ilohamail/*.php \
ods=5 script=syntax=unix script=query=relaxed map=once
pass /webmail/* /ilohamail/* dir=noaccess
If you wish to be able to browse the source using the Web server you
can also add a rule something like
pass /_ilohamail/* /ODS5_DISK/IlohaMail-0^.8^.14-rc2/*
but be aware that this should be temporary or restricted by
authorization or some other mechanism as user data is by default stored
within this tree.
Load these new rules into the server:
$ HTTPD /DO=MAP
IlohaMail Configuration
There are a number options available in the "IlohaMail Configuration"
document provided with the kit.
Of particular interest when providing a mail service would be a
permanent and scalable back-end. This stores user options and
other state information. The options are a flat file-system or
MySQL database.
By default the file-system is used, and this is located in the [.IlohaMail.data]
subdirectory. It is the directories
in this area that are made writable to the scripting account using
the commands
$ sechan /asif=scratch [.data...]*.dir
$ set file /version=1 [.data...]*.dir
If these data areas are relocated to somewhere independent of the
IlohaMail version and kit similar file-system access would need to be
established.
Application Access
Using the above mapping rules the basic method for accessing the
application is
http://the.host.name/ilohamail/
- end of document -