Version 3.1
User's Guide

Mail Actions

Previous | Next
Contents

What Are Mail Actions?

In addition to processing an FDML file in response to a form submission or a Web page hit, NetCloak Pro also allows you to process an FDML file whenever a message is received from any e-mail address. The collection of information needed to associate an e-mail address with an FDML file is called a "Mail Action".

NetCloak Pro can check any e-mail account located on any POP3-compatible mail server on the Internet. It can check for mail as frequently or infrequently as you like.

Figure 6: The Mail Action Web admin page

Using Mail Actions, you can have NetCloak Pro automatically check an e-mail address and create a new Web page, insert information into existing pages, store data, or even send another e-mail message, using the information contained in each new message. For instance, you can easily create Mail Actions to create online archives of your favorite mailing lists, automate routing of e-mail messages to the appropriate persons, or provide Web access to e-mail for members of your organization.

Setting Up Mail Actions

To create, edit, or remove Mail Actions, you use the "Mail Actions…" command in the NetCloak Pro CGI or access the "Mail Actions" link from the NetCloak Pro Web admin home page.

Because Mail Actions require NetCloak Pro to open TCP/IP connections to remote mail servers, a single control is provided to enable or disable all Mail Actions at once. To enable checking of all configured Mail Actions, check the "Enable Mail Actions" checkbox. In the CGI, checking is enabled as soon as you check the box. In the Web admin page, you must click the "Save Changes" button after checking the box. To disable Mail Actions, un-check the box (and, in the Web admin page, click "Save Changes").

Figure 7: The Mail Action window

To edit an existing Mail Action, select it (in the CGI application window) or click the "Select" radio button for that action (in the Web admin page), then click the "Edit…" button. To create a new Mail Action, click the "New…" button. In either case, you are presented with the "Edit Mail Action" window (in the CGI) or Web admin page.

A Mail Action consists of three sets of information: which e-mail account to check, how often to check it, and what action to take when messages are received.

Email Account Settings

To specify which e-mail account you want NetCloak Pro to check, you must provide four pieces of information: the IP address or domain name of a POP3 mail server, the e-mail address of the account, the password needed to access that account, and whether or not NetCloak Pro should use "APOP authentication".

Figure 8: The Edit Mail Action Web admin page

Mail Server -- Enter the IP address (such as "198.64.78.12") or domain name (such as "pop.maxum.com") of a mail server in this field. The specified IP address or domain name must be that of a machine connected to the Internet (or is at least visible to NetCloak Pro on your network), which is running a POP3 ("Post Office Protocol" version 3) mail server. That mail server must be the mail server that stores messages for the specified e-mail address.

Email Address – This field contains the fully-qualified address specification of the e-mail account from which messages will be retrieved. For instance, "chris@maxum.com". This e-mail address must be recognized as a valid address by the configured mail server.

Email Password – Enter the corresponding password for the configured e-mail account into this field. In the CGI, the password characters will appear as clear text until you tab out of the field, when they are converted to bullets. How the password field in the Web admin page is displayed depends on the particular browser you use.

Use APOP Authentication – With this box unchecked, the configured e-mail address and password are transmitted to the mail server as clear text, so that anyone "snooping" on the network will be able to read them. If the mail server supports it, using APOP authentication will encrypt the username and password during transmission, so that they cannot be easily discovered. Ask the mail server administrator if the configured mail server support APOP (or, just try it and see if it works).

Figure 9: The Edit Mail Action window

Schedule Settings

NetCloak Pro will attempt to log on to the mail server using the frequency you specify here. It can be configured to check for mail as often as once per minute, or only very infrequently. Select units of "Minutes", "Hours" or "Days" from the popup menu (via the Web) or using the arrow buttons (in the CGI), and enter the number of units in the text field. For example, to check mail every 24 hours, enter "24" into the text field, and select "Hours".

You cannot select the time of day NetCloak will check mail. NetCloak Pro checks once per minute for any Mail Actions that need to run. So, if you create a Mail Action at 3:30 PM, and it is set to check mail every 24 hours, it will check that action's e-mail address at roughly 3:31 PM each day.

Action Setting

Finally, you must tell NetCloak Pro what to do when messages are received by the configured e-mail address. The way you do this is by specifying the path to an FDML file located in the configured Root Folder. In the CGI, click the "FDML File" button. You are presented with a standard Mac OS "open file" dialog box. Select the FDML file you want to use to process mail messages for the configured e-mail address. In the Web admin interface, you must enter the exact path to the FDML file, from the volume name down, in the "FDML File" text field. Enter the path using Mac OS file path conventions – use colons to separate folder names, and let the text field wrap the text automatically (don't insert return characters yourself).

Once you have entered all the information needed by the Mail Action, click "OK" (in the CGI) or "Save Changes" (in the Web admin page) to save the Mail Action. In the CGI, NetCloak Pro will display an error message if any fields are incorrectly filled out. No such error checking is performed in the Web admin interface, so be especially careful when editing Mail Actions this way.

Creating a Mail Action FDML File

All normal FDML directives and insertion commands are available for use in a Mail Action FDML file. Use CREATEDOC to create Web pages from mail messages; INSERTFILE to insert messages into existing pages; TEXTSTORE to maintain a tab-delimited text file of mail data; or SENDMAIL to generate messages to other e-mail addresses based on the received mail.

Where do the form field variables normally used in FDML insertion commands come from? NetCloak Pro automatically converts the header fields from each mail message into form variables that can be accessed using standard REPLACE commands. In addition, the body of each message is placed into a form field named "Body", which you can insert like this:

<REPLACE Body>

All mail messages will contain a few standard variables that you can depend on being present when using them in REPLACE commands. These are listed below.

From  The e-mail address of the sender of the message.

To The e-mail addresses of the message's primary recipients; commas separate each address. The Mail Action's configured e-mail address will be in this list.

Subject The "title" of the mail message.

Date The date the message was originally transmitted, in the standard format required by the SMTP/POP3 protocols.

Body  The body of the message (not including headers), generated by NetCloak Pro.

In addition, most modern e-mail clients and servers will include the following optional variables in the message:

CC  The e-mail addresses of the message's secondary, "carbon-copy" recipients, separated by commas. This will only be present if secondary addresses exist.

Content-Type  Defines the format of the data contained in the e-mail message. Plain text messages have a content type of "text/plain", while HTML formatted messages have a content-type of "text/HTML".

Message-ID  A unique identifier for the mail message used by the mail server. This unique ID is usually in the form of an email address, like <0123abc1f332@maxum.com>, so it is guaranteed to uniquely distinguish this message from all other messages on all other mail servers.

For a complete list of all the possible mail message header fields, see the RFC documents describing the format of mail messages (RFC 822) and MIME headers (RFCs 1521 and 1522), available many places on the Internet.

Debugging Mail Actions

When you create a new mail action, it may not work the first time. NetCloak has special handling for mail action errors to help find problems specific to mail actions.

If an error occurs when NetCloak tries to perform a mail action, it will create a file named MailAction.err in the NetCloak Files folder on the server. This file will have a description of the error, along with the name of the mail action and the date and time the error occurred.

Most errors specific to processing a mail action will result in the generation of a MailAction.err file. Some common problems include the specified mail account does not exist, having the wrong password or NetCloak being unable to locate the specified FDML file. Other FDML errors that would be displayed on a response page for a web-based system will also be recorded in the MailAction.err file.

When several errors occur, NetCloak will overwrite the MailAction.err file for each one. This means that there will only be one file and it will only contain information for the most recent error. If there are several problems (or several mail actions with a problem), you will have to troubleshoot and fix them one at a time.

Message Content Types

When NetCloak Pro receives a mail message in response to a Mail Action, it looks for a "Content-Type" field and a "Content-Transfer-Encoding" field in the header of the mail message. Messages with certain content types and transfer encodings are handled specially by NetCloak Pro.

If the content type of the message is not specified (no "Content-Type" field is present), NetCloak Pro assumes the message's content type is text.

If the content type of the message is multipart/mixed or multipart/alternative, this means that the message contains either attachments or alternative ways of displaying the same message (most often, a plain text and an HTML version of the message). In this case, NetCloak will extract the text/HTML or text/plain part of the message, and then discard the rest. If both a text/HTML part and a text/plain part exist, NetCloak will use the HTML version of the message as the Body variable. Note that this means that NetCloak always discards attachments.

If a transfer encoding is not specified, 8-bit encoding is assumed. In other words, NetCloak does not modify the data in any way. If the transfer encoding is either quoted-printable or base64, NetCloak properly decodes the message body.

Update Recent Database

The Update Recent Database menu command in the Configuration menu will scan all recent lists currently in memory, removing entries for files that no longer exist on the server. In other words, when you delete articles from your server, you can have them removed from the recent lists simply by selecting this menu item.


Copyright © 1996-2000 Maxum Development Corporation

http://www.maxum.com/
Previous | Next
Contents