Domino Mail Gateways
Chapter 10-4
Domino Mail Gateways
The sample MGATE is a fairly sophisticated program that demonstrates the basic steps involved in exchanging messages between Domino mail and another electronic mail system. While a full discussion of MGATE is beyond the scope of this User Guide, this chapter briefly describes how MGATE operates.
Sending Outbound Messages
Outbound messages originate from a Domino user and are destined for someone outside the Domino mail system.
Outbound messages are first routed through a foreign domain (created for messages to this particular foreign mail system) to a gateway mail file. The gateway mail file holds the messages until MGATE is ready to transfer them to the foreign users. Based on the modification time of the gateway mail file, MGATE detects pending outbound messages.
When MGATE finds an outbound message, it delivers the message to a directory with the same name as the foreign user. In this sample program, all foreign user names must be eight characters or less. All foreign user directories are in the subdirectory \mgate\user.
After delivery, the outbound message is a plain character text file. Each line of the file begins with one of the following item codes:
A - Attachment (path name of attachment file, original file name)
B - Body text line
C - CC name
D - Time/date
O - Originator name
S - Subject
T - To name
Following the item code on each line are the item contents.
If MGATE does not find a directory for the foreign user, it continues to look for the directory during every outbound attempt until the mail times out. When an outbound message times out, MGATE sends a failure report to the mail sender.
Receiving an Inbound Message
An inbound message is one that originates outside of Domino and is destined for a Domino user.
MGATE looks for inbound messages in the \mgate\inbound directory. This directory is scanned periodically, based on the number of minutes specified by the environment variable MgateInterval. When an inbound message is found, MGATE transforms it into a Domino mail message and passes it to the local mail router.
If Domino cannot deliver the message, MGATE returns it to the sender's directory under \mgate\user.
Message files may have any name, as long as they have the extension .msg. Attachments files may have any name, as long as they have the extension .att.
In an inbound message file, the first character of each line is one of the following item codes:
A - Attachment (path name of attachment file, original file name)
B - Body text line
C - CC name
D - Time/date
O - Originator name
R - Recipient (full email address)
S - Subject
T - To name
Following the item code on each line are the item contents. Items can be repeated as many times as necessary and in any order.