On Tue, Jul 14, 2020 at 05:21:08PM -0700, Daniel Miller wrote: > Given a recipient address in the form "s123...@example.com", and I'm > given the IP and port, do I just need to define an entry in my transport > map? E.g.: > > s123...@example.com 1.2.3.4:5525
You probably won't be surprised to learn that the primary purpose of the transport(5) table is to select a *transport* for the given lookup key. http://www.postfix.org/transport.5.html RESULT FORMAT The lookup result is of the form transport:nexthop. The transport field specifies a mail delivery transport such as smtp or local. The nexthop field specifies where and how to deliver mail. The transport field specifies the name of a mail delivery transport (the first name of a mail delivery service entry in the Postfix mas- ter.cf file). The nexthop field usually specifies one recipient domain or hostname. In the case of the Postfix SMTP/LMTP client, the nexthop field may con- tain a list of nexthop destinations separated by comma or whitespace (Postfix 3.5 and later). The syntax of a nexthop destination is transport dependent. With SMTP, specify a service on a non-default port as host:service, and disable MX (mail exchanger) DNS lookups with [host] or [host]:port. The [] form is required when you specify an IP address instead of a hostname. A null transport and null nexthop field means "do not change": use the delivery transport and nexthop information that would be used when the entire transport table did not exist. A non-null transport field with a null nexthop field resets the nexthop information to the recipient domain. A null transport field with non-null nexthop field does not modify the transport information. Therefore, the correct syntax would be either: s123...@example.com smtp:[1.2.3.4]:5525 or s123...@example.com :[1.2.3.4]:5525 if you wanted to keep some initial transport (based on the address class) unmodified, while resetting just the nexthop. SMTP nexthop syntax is described in: http://www.postfix.org/smtp.8.html SMTP DESTINATION SYNTAX The Postfix SMTP+LMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later). SMTP destinations have the following form: domainname domainname:port Look up the mail exchangers for the specified domain, and con- nect to the specified port (default: smtp). [hostname] [hostname]:port Look up the address(es) of the specified host, and connect to the specified port (default: smtp). [address] [address]:port Connect to the host at the specified address, and connect to the specified port (default: smtp). An IPv6 address must be format- ted as [ipv6:address]. -- Viktor.