# Chapter 5 - Technical reference

## 5.1 - FAQ

Q: I've installed WebMail/2, how to i use it now?
A: Load your web browser and point to http://"your web server here"/cgi-bin/webmail2.cmd.

Q: I always get Access Denied!
A: There are several things to check:

1) The 'Accepted Domains' section in the setup doesn't have the required domain names.

2) The 'Client Access Control' needs to be set to 0.0.0.0.

3) The 'Server Access Control' must include the IP address of the web server(s).

4) Make sure webmail2.cmd has the IP and port that WebManager listens to.

5) If you use Inet.MailPro then make sure you've setup the currept .pas files and domain names.

Q: What is Globals.!TagLine="NO" in webmail2.cmd for?
A: If you change it to YES, then every time you compose an email, you'll get a nice tag line at the bottom (ala good old BBS style).

Q: I've upgraded from v5.0 to a later version and i get empty pages.
A: The path to the .wm files requires a trailing slash.

Q: Am i required to always login with my full email address?
A: A full email address at login is required if you've setup more than one domains, in the Accepted Domains section.

Q: I don't like to edit the webmail2.cmd all the time, is there any other way to specify the settings?
A: Yes, you can use environment variables, please read chapter 4.1. You may also use the automatic installation script which automatically upgrades new versions of the CGI with your existing settings.

Q: I can login, but selecting any option gets me back to the login prompt!
A: Thats because your web browser or web server doesn't support cookies. Please look at the supported web servers section in chapter 2.1.1

Q: I add/remove users from my POP3 server and the changes are not recognized by WebMail/2.
A: Every time you make changes to your users, create a file named 'refresh' in the current directory of WebManager.

Q: I'd like to embed the login screen into my site's pages, is it possible?
A: Yes, grab a copy of the login screen and use it in your own pages. You may use wget or the Save As... option from your web browser.

Q: I have changed the .wm and image files. What is going to happen in a future upgrade of WebMail/2? Do i need to re-modify the .wm files every time?
A: No. New versions of WebMail/2 are backwards compatible, so a future version will work with your modified .wm and image files. You may loose a few new features from new .wm files but these can be integrated later on.

Q: The InBox screen is VERY slow, all other pages are quite fast. Why is that?
A: That is a problem in your POP3 server. Some POP3 servers have a very slow 'TOP' command processing. Contact author of the software for help. You may also test this by using the 'Remote Control' feature of PMMail, it will run as slow.

Q: Does WebMail/2 support APOP?
A: Yes, it will detect POP3 servers that support APOP, and use APOP to login.

## 5.2 - WM files

All the .wm files are W3C HTML 4.01 valid.

Filename | Description
--- | ---
addressb-add.wm | Add to AddressBook page.
addressb-table.wm | AddressBook table.
addressb.wm | AddressBook listing page.
attachment-no.wm | No attachment text.
attachment-table.wm | Attachment table
attachment-yes.wm | Attachment exists.
composeemail.wm | Compose email.
footer.wm | Footer html.
header.wm | Header html.
help.wm | Help button html.
jump-table.wm | Jump email page table.
listemails-table.wm | List emails table.
listemails.wm | List emails main html page.
loginerror.wm | Access denied page.
newuser-thankyou.wm | Page displayed after new user registration.
newuser.wm | New User Registration page.
nomail.wm | No mail text.
printemail.wm | Read email page designed for printing.
priority-high.wm | High priority text.
priority-low.wm | Low priority text.
priority-normal.wm | Normal priority text.
reademail.wm | Read email page.
reply.wm | Reply email page, includes dual To: field.
servererror.wm | Server Error page.
setup.wm | User options and signature page.
userlogin.wm | User login page.
userlogin2.wm | User login page for New User Registration feature.
user.wm | User email listing.
user-add.wm | Add to user email listing.
user-add.wm | Add to user email listing.
user-table.wm | User email listing table.

## 5.3 - WM file variables

Variable | Location | Description
--- | --- | ---
*!WMVERSION!* | Anywhere | WebMail/2 logo name
*!WMUSER!* | Anywhere | User email ID, effective after user login.
*!WMPASS!* | Anywhere | User password, only used for administration, effective after user login.
*!WMFILENAME!* | Anywhere | The actual CGI filename (webmail2.cmd), reported by SCRIPT_NAME environment.
*!WMEMAILNUM!* | Inbox, Read | The number represents a specific email on the email server.
*!WMEMAILFROM!* | Inbox, Read, Compose | Email source address (From: field).
*!WMEMAILSUBJECT!* | Inbox, Read, Compose | Email subject (Subject: field)
*!WMEMAILDATE!* | Inbox, Read | Email date (Date: field)
*!WMEMAILBODY!* | Read, Compose | The body of the email while reading, or replying.
*!WMEMAILTABLE!* | Inbox | Table listing emails on email server.
*!SERVERERROR!* | Anywhere | If there is an error, this variable is initialized.
*!WMATTACHMENT!* | Inbox, Read | Shows attachment status.
*!WMEMAILPRIORITY!* | Inbox, Read | Show email priority level.
*!WMAUTHID!* | Anywhere | Unique ID number set by cookies, effective after user login.
*!WMATTACHMENTSTABLE!* | Read | List of file attachments.
*!WMATTACHFILE!* | Attachment Table | Attachment filename.
*!WMJUMPTABLE!* | Inbox | Page numbers of email pages.
*!WMJUMPPAGE!* | Jump Table | Page number.
*!WMPREVEMAILNUM!* | Read | Previous email number.
*!WMNEXTEMAILNUM!* | Read | Next email number
*!WMEMAILCC!* | Compose | List of emails for Cc: field, separated by spaces.
*!WMEMAILREPLYTO!* | Compose | Replaced with the From: email when Reply-To: exists.
*!WMPAGE!* | Anywhere | Points to the current Inbox page.
*!WMTOTALSIZE!* | Inbox | Total size (kb) of emails in the account.
*!WMADDRBTABLE!* | AddressBook | Table listing AddressBook entries.
*!WMADDRBALIAS!* | AddressBook | The alias for this AddressBook entry.
*!WMADDRBNAME!* | AddressBook | The name for this AddressBook entry.
*!WMADDREMAIL!* | AddressBook | The email for this AddressBook entry.
*!WMCHARSET!* | Anywhere | Character set. Default is iso-8859-1.
*!WMSIGNATURE!* | Setup | Users signature.
*!WMSHOWHEADERS!* | Setup | Enable/Disable show headers checkbox.
*!WMSHOWHTML!* | Setup | Enable/Disable show HTML checkbox.
*!WMEMAILBCC!* | Setup, Compose, Reply | List of emails for Bcc: field, separated by spaces.
*!WMEMAILFAKE!* | Setup, Compose, Reply | The email address to use in the From: field.
*!WMFULLNAME!* | All | The full name of the user. WebManager will read it from OS/2 supported email servers.
*!WMTIMEZONESELECT!* | Setup | Represents a list of HTML options used in the selection of the timezone offset.
*!WMXFACE!* | Read | HTML image tag to an X-Face bitmap.
*!WMPPATH!* | Anywhere | An optional prefix path to images or CSS which can be appended before the image location.

## 5.4 - JunkSpy

Application | JunkSpy 2.0 or later
URL | www.junkspy.com

JunkSpy is a junk mail detector for OS/2. It runs between WebMail/2 and the POP3 server. When an email is detected as junk the body of the email is replaced with an appropriate message telling the user that the particular email is junk.

Bellow are the instructions to configure JunkSpy with WebMail/2.

1) Install JunkSpy, version 2.0 or later.
2) Start JunkSpy. If you have a POP3 server running on the same machine you'll get an error that JunkSpy couldn't bind the TCP port, that is not a problem, ignore the error.
3) Right-click on JunkSpy and select Settings->Post Office.
4) At the top of the window, section "Servers", enter the IP address of the machine running your POP3 and SMTP servers. Those are the same addresses that you use in WebMail/2 under the WebManager settings.
5) At the bottom of the window enable "Local Connection", and enter in the "Listen Port" section the number 111. If you have something else using TCP port 111 then enter a free TCP port number.
6) Again right-click on JunkSpy and select Settings->Detector.
7) At the "Action" settings select "Destroy Message". You might also want to disable the External Detectors if you are on dialup.
8) Start WebManager go to the "Settings - Page 1". At the "POP3/SMTP Servers" section change the IP address and Port number of the POP3 server to point to the IP and Port of the machine running JunkSpy. The port number is the same as the one entered under the "Local Connection" in JunkSpy.
9) Restart JunkSpy and WebManager for the settings to take effect.

It's strongly suggested to use JunkSpy at the same machine as your email server and to use the local loopback (127.0.0.1) address for communications between the two programs and the email server for improved performance.

## 5.5 - UNIX Systems

WebMail/2 has an experimental support for UNIX systems. This support is for webmail2.cmd which is the CGI part of WebMail/2. It allows you to use webmail2.cmd under any UNIX operating system which runs a compatible web server and a Rexx interpreter with the required libraries.

The CGI script will run under any web server which supports CGI/1.0 execution and cookies. Your Rexx interpreter must also have a TCP/IP socket library and Base64/Quoted-Printable libraries.

We've tested WebMail/2 under Linux and FreeBSD, with Regina Rexx and IBM's ObjectRexx. IBM's interpreter provides the rxsock library, so if you use Regina please download the 3rd party library from here.

Although webmail2.cmd has been re-written to support any Rexx interpreter, there are some incompatibilities with the TCP/IP socket libraries between interpreters, and the support for Base64 and Quoted-Printable encodings. So you may be able to run webmail2.cmd up to a point, but may encounter problems.

Please remember that UNIX support is still in its early stages.

## 5.6 - Development progress

This is a graph which shows the development progress of public releases (green dots) and beta versions (red dots) over the time period that WebMail/2 has been on development.