Use
If faults occur when sending or receiving Internet messages via the SAP Internet Mail Gateway, you should run a trace with the error analysis.
Features
Trace files are generated by setting environment variables. The following environment variables are available:
Environment variable |
Description |
GWTRACE |
The variable must be assigned the value 1, 2 or 3 These values determine the log levels which extend from simple logging of errors (level 1) to the executable status report for error analysis (level 3). |
GWTRACEIN |
Here you can define the path and the name of the file, into which the data logged for inbound messages is written. |
GWTRACEOUT |
Here you can define the path and the name of the file, into which the data logged for outbound messages is written. |

If variables GWTRACEIN and GWTRACEOUT are not set, the trace files are written under the names Tracein.txt and Traceout.txt in the standard directory for temporary files:
Operating system |
Directory |
Unix |
/tmp |
Windows NT |
C:\temp |
OS/400 |
Under OS/400 there is no default directory. You must therefore specify the directory explicitly . |
Activities
The activities therefore vary depending on whether you generate a trace for incoming or outgoing Internet messages:
Trace for inbound messages
Windows NT
Call up the system control, select the file system and the tab page environment, and enter the names of the variable and the corresponding value.

Variable |
Example value |
GWTRACE |
3 |
GWTRACEIN |
C:\temp\C11_mlsomail.trc |
UNIX

Example of a shell script on a HP-UX computer:

OS/400

Example of a CL program:
ADDENVVAR ENVVAR(GWTRACE) VALUE('3')
ADDENVVAR ENVVAR(GWTRACEIN) VALUE('/tmp/tracein.txt')
STRMSF
Trace for outbound messages
The procedure therefore differs depending on which activation type the program Mlunxsnd is running:
Registering
Set the environment variable manually or in a logon script with the user, who starts program Mlunxsnd.
Start
Set the environment variable in the shell script, in which you have set the environment variable GWCONFIG for
Installing the SAP Internet Mail Gateway . The environment variables must be set before Mlunxsnd is called up.