Routing via gateway systems

A local TCP/IP network may include one or more systems that are equipped to relay messages to machines not directly accessible on the  local network. Such gateway systems accept addresses that are not palatable to the network itself.

One solution to this problem is to use appropriate MX records and a name resolver. However, this approach may be infeasible in some environments, so a different solution may be needed.

There is an alternate approach, in which routing to TCP/IP gateways is done by creating additional channels, one per gateway system or gateway  "name" (a single gateway "name" may reference a set  of gateway hosts via use of MX records), in the configuration. The name of each such channel must always begin with.

In Unified configuration, such a channel definition has the general form: msconfig&#x3e; show tcp_gateway.&#x2a; role.channel:tcp_gateway.official_host_name = gateway-system-name role.channel:tcp_gateway.daemon = router role.channel:tcp_gateway.smtp (novalue) or equivalently msconfig&#x3e; show tcp_gateway.&#x2a; role.channel:tcp_gateway.official_host_name = arbitrary-placeholder-name role.channel:tcp_gateway.daemon = gateway-system-name role.channel:tcp_gateway.smtp (novalue) In legacy configuration, the channel block for a gateway TCP/IP channel has the general form: tcp_gateway smtp daemon router gateway-system-name or equivalently, tcp_gateway smtp daemon gateway-system-name arbitrary-placeholder-name Rewrite rules must then be added to the configuration file to route the appropriate addresses to the gateway. See, for instance, Routing non-local mail to a mailhub.

The " " setting tells the  SMTP client program not to open a connection directly to the first  system named in the envelope address list, but to instead open a  connection to the official host for this channel,   . Usually the default    setting is appropriate and desirable  on gateway channels; but certain gateways may restrict the number of  addresses that can appear in a single copy of a message, in which case  it may be appropriate to add either the    or    setting to those gateway  channels. If the gateway can handle multiple simultaneous connections, then use of the    setting may be of interest to cause outgoing  connections to be split amongst multiple threads.

Once a channel block for a gateway is created the channel should be ready to use.

Note that when addresses are being looked up in LDAP in a so-called "direct LDAP" configuration,  then certain domain-level LDAP  attributes including   and    (or more precisely, the LDAP  attributes named by the MTA options     and   ),  may also potentially be used for similar  route-to-gateway-host purposes. And so-called "detour host"  functionality, typically used for purposes of routing through an SMTP  host performing spam/virus filtering, also has a routing effect.

Typically, use of a   channel is especially  appropriate for routing outbound (to the Internet) messages, when all  such messages should go out through a gateway. In contrast, use of LDAP-based domain routing attributes is especially appropriate for  controlling the routing to internally-destined messages, when such  messages should go through an internal "smart host" that  performs additional address handling. And use of "detour host" functionality is, as already mentioned above, intended for  cases of detour routing through spam/virus filter boxes.

See also:
 * Routing non-local mail to a mailhub
 * daemon Option
 * multiple Option
 * single Option
 * single_sys Option
 * threaddepth Option
 * ldap_domain_attr_routing_hosts MTA Option
 * ldap_domain_attr_smarthost MTA Option
 * aliasdetourhost Option
 * Overview of Direct LDAP configuration
 * TCPIP channels