IBM Support

Trapping outbound SMTP MIME information

Question/Answer


Question

Currently in IBM Domino, there is support for trapping all inbound Simple Mail Transfer Protocol (SMTP) messages by using the SMTPSaveImportErrors=2 parameter in the notes.ini file on the SMTP server.

Is there a similar notes.ini parameter for trapping outbound SMTP messages after conversion?

Answer

This issue was reported to Quality Engineering in the form of an enhancement request and has been addressed in Domino 5.0.11 and higher.

Setting the notes.ini parameter SmtpSaveOutboundToFile=1 (0 = Off, 1= On) will result in each outbound SMTP message being copied to a temporary file on the server. These messages will be saved as individual TMP files within the TMP directory specified for the server. The file names will be STXXXXXX.TMP (where XXXXXX will be 6 numerical digits). The contents of the files will contain the header information and the MIME information.

Using a remote console on the Domino server, issue the following command:
set config SmtpSaveOutboundToFile=1

OR

Open the server's notes.ini and add the following parameter within the file:
SmtpSaveOutboundToFile=1

Note: Recycle the Domino server for the change in the NOTES.INI to take effect.


Example of message content

To: Matt_User@host1.lotus.com
Subject: Sample to Trap Outbound SMTP
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002
Message-ID: <OFECC7830C.BE16C0A0-ON85256C68.00613200-85256C68.00615B58@lotus.com>
From: Ted_User@mail1.lotus.com
Date: Tue, 5 Nov 2002 12:43:23 -0500
X-MIMETrack: Serialize by Router on Mail1/Tahoe(Release 5.0.11 |July 24, 2002) at 11/05/2002
12:43:24 PM
Content-Type: multipart/mixed; boundary="=_mixed 00615B5385256C68_="

--=_mixed 00615B5385256C68_=
Content-Type: multipart/alternative; boundary="=_alternative 00615B5385256C68_="

--=_alternative 00615B5385256C68_=
Content-Type: text/plain; charset="us-ascii"

This is a sample message to trap an outbound SMTP messages.

Below is an attachment.

--=_alternative 00615B5385256C68_=
Content-Type: text/html; charset="us1-ascii"

<br><font size=2 face="sans-serif">This is a sample message to trap an outbound SMTP messages.</font>
<br>
<br><font size=2 face="sans-serif">Below is an attachment.</font>
<br>
<br>
--=_alternative 00615B5385256C68_=--
--=_mixed 00615B5385256C68_=
Content-Type: text/html; name="us1.htm"
Content-Disposition: attachment; filename="us1.htm"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIGh0bWwgU1lTVEVNICJodHRwOi8vd3d3LmlibS5jb20vZGF0YS9kdGQvdjExL2li
bXhodG1sMS10cmFuc2l0aW9uYWwuZHRkIj4KPGh0bWwgbGFuZz0iZW4tdXMiPgo8aGVhZD4KPG1l
dGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9
aXNvLTg4NTktMSIgLz4KPG1ldGEgY29udGVudD0ibm8tY2FjaGUiIGh0dHAtZXF1aXY9IlByYWdt
YSIvPgo8bWV0YSBodHRwLWVxdWl2PSJQSUNTLUxhYmVsIiBjb250ZW50PScoUElDUy0xLjEgImh0
PjwvdGQ+CjwvdHI+Cjx0cj48dGQgd2lkdGg9IjEwIj4mbmJzcDs8L3RkPjx0ZCB3aWR0aD0iMTYi
IHZhbGlnbj0idG9wIj48aW1nIHdpZHRoPSIxNiIgc3JjPSIvL3d3dy5pYm0uY29tL2kvdjExL2lj
b25zL2Z3LmdpZiIgaGVpZ2h0PSIxNiIgYWx0PSIiLz48L3RkPjx0ZCB3aWR0aD0iMzc4Ij48YSBz
dHlsZT0idGV4dC1kZWNvcmF0aW9uOiBub25lOyIgaHJlZj0iL25ld3MvdXMvMjAwMi8xMS80Lmh0
b3N0LmNvbS9pL2MuZ2lmIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBhbHQ9IiIgYm9yZGVyPSIwIiAv
Pjwvbm9zY3JpcHQ+PC9ib2R5Pgo8L2h0bWw+Cgo8IS0tIHVzL2VuL2FsbCBhc3NlbWJsZWQgYnkg
bWFrZV9ocCB2MS4xIG9uIFR1cywgMDUgTm92IDIwMDIgMTc6NDA6MTQgQ1VUIC0tPgo=
--=_mixed 00615B5385256C68_=--


How to locate the STXXXXXX.TMP file

One method of finding the TMP file for observation is to do the following: (1) Add the parameter Log_Mailrouting=40 to notes.ini, and (2) search via the sender's or recipient's address as displayed in log.nsf.

You may find that setting additional debug variables will help with identifying the sender or the recipient of the messages. Otherwise, you will need to match up the TMP file name (found in the Miscellaneous Events view of the log.nsf) with the corresponding message that was received, found in the Mail Routing events by time stamp.

Increase the mail routing logging level from "Normal" to "Verbose" (in the Server Configuration document, on the Router/SMTP, Advanced, Controls tabs, "Logging level" field). Also, set a Debug_Outfile as well. This will allow you to easily match the message received to the recipient or the sender.
 




Note: For Domino for iSeries or i5/OS, these temporary files are generated in the data directory of the server. The filename created follows the format stxxxxxx.TMP. The files are sorted in alphabetical order, by case.

Setting a Debug_Outfile is the most efficient source to find the TMP file associated with the recipient of the message. The example below shows the information that would be found in a Debug_Outfile:

Sample Debug_OutFile
mm/dd/yyyy 12:56:21 PM  Router: Transferring mail to domain HOST1.LOTUS.COM (host HOST1.LOTUS.COM [9.95.xx.xx]) via SMTP
mm/dd/yyyy 12:56:21 PM  [FFFBD461:0003-FFF5DD25] SMTPClient: RFC822 message outbound stream saved to C:\WINDOWS\TEMP\c.server.5.11.Data\st629701.TMP
mm/dd/yyyy 12:56:21 PM  Router: Transferred 1 messages to HOST1.LOTUS.COM (host HOST1.LOTUS.COM) via SMTP
mm/dd/yyyy 12:56:26 PM  Router: Message 00628829 transferred to HOST1.LOTUS.COM for Matt_User@host1.lotus.com via SMTP

The location of the STXXXXX.TMP (C:\WINDOWS\TEMP\c.server.5.11.Data\st629701.TMP) might be a hidden directory on the machine. In order to access these files, change the settings on your machine to not hide system files/folders. Through Explorer on Windows 2000, choose Tools -> Folder Options from the menu. Then on the View tab, change the option for "Hidden files or folders" by selecting the "Show hidden files and folders" option (button).

This is an example of what will be written to the console and to the Miscellaneous view of the LOG.NSF:

mm/dd/yyyy 12:53:41 PM [07A0:0006-0790] SMTPClient: RFC822 message outbound stream saved to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\notesC839B6\st867538.TMP

Related information

Troubleshooting IBM Lotus Domino 8 mail routing issues
How to trap inbound SMTP messages on a Domino server

Document information

More support for: IBM Domino

Component: SMTP / MIME

Software version: All Versions

Operating system(s): AIX, IBM i, Solaris, Windows, z/OS

Reference #: 1088993

Modified date: 08 October 2018