When you installed your CopiaFacts SMTP gateway software, the installation process should have also installed an application called the CopiaFacts SMTP Gateway Manager (GWMANAGER). Version 7 installed the manager as a control panel applet. When you start Gateway Manager, the following screen should be displayed:

Information Panel

The panel on the left hand side has two sections. The top section displays information about the current software version and also has a hot link to the Copia web site where you may obtain information on the entire Copia product line as well as contact information.

The lower section contains status information about the Copia SMTP gateway service. The information applies to either the currently running session or the most recently active session if the service is stopped. The time and date when the service last stopped or started is shown along with message counts for that session. If the service is running, you may click on this section to update the status information. This section also indicates whether the service is installed or not and whether it is running or not.

Configuration Panel

The tabbed area on the right of the window may be used to navigate through the various configuration options for the service. The first tab deals with SMTP processing parameters. The SMTP port specifies the TCP port used to read incoming mail requests. This is the standard SMTP port 25 by default. You should make sure that only the CopiaFacts SMTP Gateway is using this port since the port cannot be shared. The SMTP service of Internet Information Server also uses this port. If you have installed IIS on this machine, you must either disable the IIS SMTP service or run the CopiaFacts SMTP gateway on a different machine.  Except as described below, the checkbox to enable this port is always checked.

The authentication check box next to the SMTP port setting should be checked if you want the SMTP service to offer authentication (and to offer to accept a login and password). This causes the SMTP server to include a AUTH=LOGIN response to an EHLO command. This does not, on its own, create a secured or encrypted session. Currently, the gateway makes no use of the login data.  It is recorded in the log if present, which may assist with identifying nuisance senders. There is more information than than you will ever need on SMTP authentication at http://www.fehcom.de/qmail/smtpauth.html.  Not all of this information is relevant to CopiaFacts Gateway applications.

The monitoring checkbox causes an OMACHECK program running on the same machine to monitor that there is a listener on port 25.  This provides an additional check that the Gateway is healthy.

The button above the SMTP Settings group allows you to stop and start the gateway. The caption on the button will read either Start or Stop depending upon the current status of the gateway. You may use this button to stop the gateway after modifying any configuration settings. The gateway must be stopped and started for any changes to take effect, so you should normally try to do this at a time when the incoming traffic is low.  The service can also be started and stopped in the usual way using the MMC plugin under Manage Computer / Services.

Secure (TLS) E-Mail

To use secure e-mail you can select one of the Transport Layer Security (TLS) options.  You are advised to obtain a Certificate from a recognized Certificate Authority in order to operate a secure server.  If you do not supply a certificate file name in the box provided, the Gateway will generate a self-signed certificate.  Although the keys held with the certificate will still permit reception of encrypted e-mails, some senders may not accept a self-signed certificate.  For more information on certificates, see Signed and Encrypted E-Mail, and also see Gateway Signed and Encrypted E-Mail.

Normally the TLS option will be none and TLS will not be offered.  Setting the TLS option to Optional or to Required will cause STARTTLS to be offered explicitly when an e-mail sender logs in with an EHLO command.  In the latter case the message will only be accepted if the sender initiates a TLS session.  When TLS has been used, the SMTP_USED_TLS variable will be set to yes in the generated FS files.

If you supply a certificate, it will be loaded when the Gateway starts and the password will be verified.  The Gateway will not start if the PFX file cannot be loaded or the password supplied is incorrect.

If the supplied password is incorrect the Windows error message reported in the Gateway trace file may (misleadingly) say that a 'network password' is incorrect.

Implicit TLS Option

For special applications you can enable a second SMTP server in the same Gateway instance, using a different port number (typically 587).  This requires the E-Mail Security Option to be enabled in CopiaFacts your license, and ImplicitTLS to be configured on the $email_security command.  This causes a second set of port parameters to be shown in the GWMANAGER SMTP settings:

The TLS type in this case should be Implicit. Implicit TLS will then be enabled automatically from first login of an e-mail sender, not when initiated explicitly by the sender after login.  Your senders in this case must configure their mail client or corporate mail relay server to use an account on your server to send e-mail for your domain.  Mail cannot be sent by logging in to a normal mail server.  If this is the only type of incoming e-mail you will be receiving you can configure it as the only SMTP server; otherwise it can be configured in the same CFGATEWAY instance as normal SMTP operations (with or without explicit TLS).

When you configure two SMTP servers, all the settings other than those in the SMTP Settings box are shared between both servers. If you need separate settings, you would need to run two instances of CFGATEWAY on different machines.

Save Messages

The service options at the bottom of the first tab allow you to select the saved and rejected message folders, as well as the debugging trace/log folder and the additional scan folders. The saved message folder is where the gateway places all incoming messages and is required even if you are not saving messages. If you check Save Messages then messages will be saved after they have been processed. Otherwise, they will be discarded. The saved message folder defaults to C:\CopiaSMTPSaveMessages. You may change it if you wish.

You should check that the folder you use has write access for 'everyone', or at least for the account in which the service will be running.

Reject Messages

Rejected messages are stored in the folder specified if you check Save Rejected Messages. The rejected messages only include those messages that have no valid fax or special recipients or did not have the correct password (optional) in the subject line. Messages rejected by the gateway due to validation or restriction failures are not saved. Instead the sender receives an appropriate SMTP error message.

You should check that the folder you use has write access for 'everyone', or at least for the account in which the service will be running.


The gateway writes some log messages to the CopiaFacts application Windows event log. These messages pertain to start and stop events, as well as serious errors. The event log messages should be useful for resolving gateway problems. However, it is also recommended that you capture additional tracing and log information in the Gateway trace file, especially for a period after original setup, and it you experience any problems or Denial of Service attack.

The gateway trace files follow the naming conventions for other CopiaFacts trace files and are named GATEWAY.GXx, where x is the day number (0=Sunday).  An existing file is overwritten when started automatically at midnight, but appended to if you restart the Gateway during the day.  You should specify a local folder for the trace files.

The four checkboxes follow the pattern used by FFTRACE (but this program is not used for Gateway logging).  They enable respectively each of start/stop tracing, principal operations tracing, tracing for debug purposes, and low-level tracing.  It last option can produce large amounts of output, especially when TNEF attachments (WINMAIL.DAT files) are decoded.

Scan Folders

The scan folders list is used to name the additional folders that the gateway will scan for messages to process. Typically these folders are the output folders of a fax connector. However, any application may place SMTP message files in this folder to be processed by the gateway.  Message files (normally .MSG or .EML) may have any file extension but must conform to RFC2822 MIME format. The files are renamed to .MSG and moved to the main 'saved messages folder' for processing, so you should ensure that file names cannot clash with the eight-digit numeric names used by the SMTP server in the CopiaFacts Gateway.  If a file is not in a suitable format, it will usually fail with either an 'invalid format' error or with a 'missing sender'. MIME-format files originating on a Unix system are accepted if they have Unix line endings even though this is incompatible with RFC2822.

It is important to test that files you place in these folders are in the correct format.  You cannot assume that the file extension of a file guarantees that it can be processed as a MIME message.

The messages placed here must be addressed to a valid fax number.  The address may be in the format faxnumber@domain or recipient@faxnumber. Either format may be preceded by the literal “FAX:” in upper or lower case. You must check the “Scan folders” option to enable message scanning of these folders.

All folders and files that you specify in the configuration settings must be accessible by the gateway service. Folders that are located on the network are not accessible to the gateway if it is logged in using the local system account. You must change the logon account of the service to an account that has network access. You can do this by first selecting the gateway service from the list of services under computer management, then right-click on the service, click properties, and then change the logon account for the gateway on the logon tab of the property page.

SMTP Banner

The SMTP banner is the text portion of the greeting message the gateway transmits when email senders attempt to connect to it. The recommended greeting text should begin with the gateway server’s fully-qualified domain name (FQDN) followed by a space and whatever text you wish to include in the greeting, but this pattern is widely disregarded, and you can use any text you wish.

You should be aware that the Windows machine name of the node running the Gateway may be included in the SMTP responses, so if you have named your node with a 'joke' name this may be visible in a sender's e-mail client log, or in an error message if the Gateway rejects their transmission.

OMA Filename

The OMA Filename is the filename only (not the path) for a file to be monitored by OMACHECK.  The file is written in the FAXFACTS\LOG folder.  This file allows OMACHECK running centrally to detect failure of the Gateway service when it finds a non-recent timestamp on the OMA file.

If the Gateway fails to write the OMA file (it retries twice) then it will enter maintenance mode and also send an e-mail notification (if so configured).

The notification e-mails are sent by EMDIRECT, not by writing an FS file, since the fileserver may be inaccessible at this time.  EMDIRECT does not send messages in the same way as COPIAFACTS: instead it requires a login/password to a mailserver and uses the 'via ISP' method.  EMDIRECT is configured by EMSETUP, which must enable the appropriate trigger and specify override recipients for the notification if necessary.  EMDIRECT is normally configured not to send the same system notification message more than once in any ten-minute period, so you would only receive an e-mail every 10 minutes if the maintenance period continued for longer.

Maintenance Mode

Maintenance mode is automatically entered if the OMA file cannot be written or if there is a significant failure in processing the received messages, for example the inability to obtain an FS file number or to write an FS file.  This would normally indicate that the fileserver for the LOG folder or the CALLBACK folder cannot be accessed.

In maintenance mode CFGATEWAY continues to operate the SMTP server threads and write incoming messages to the local save folder, but the processing of the messages is suspended.  Every five minutes the program will try again to write the OMA file and open a temporary file in the ACTIVE folder, and if successful it will come out of maintenance mode and start processing the saved messages.  If not, maintenance mode continues and another notification e-mail is sent.

Button Controls

The OK button applies all changes you’ve made after confirming your decision and then exits the gateway manager. The changes are written to the registry for the next time you stop and start the gateway service. The Apply button also allows you to save configuration changes, but does not exit the gateway manager. This allows you to stop and start the gateway from within the gateway manager if desired. The Cancel button exits the gateway manager without making any changes. If you exit with the gateway running and you have applied changes without stopping and restarting the gateway, you will be prompted to restart the gateway. If the gateway is not running when you exit, you will be asked if you wish to start the gateway service.