After all Routing Table records are applied, the Router checks if the domain name part ends with the ._via suffix. If the suffix is found, it is removed, the shorten domain name is used as the target host name, and the local part of the address is used as the address to pass to that host.
The Server Main Domain name is company.com. E-Mails and Signals sent to the sales.company.com Domain should be relayed to a separate sales.company.com server, while addresses in all other subdomains of the company.com domain should be processed as addresses in the Main Domain, i.e. email@example.com addresses should be processed as firstname.lastname@example.org addresses.
You can implement these routing rules using the following records:
Note: addresses in the sales.company.com domain will be relayed with the domain part removed, i.e. the address email@example.com will be relayed to sales.company.com host as <user>. This may cause troubles if the sales.company.com server does not accept addresses without domains. See the next example for a possible solution.
E-Mails and Signals sent to the client1.com, client2.com, and client3.com domains should be sent to the host.com server. You can implement this routing using the following records:
Note: You can specify just host.com instead of host.com._via here (given there is no other router record for host.com), but in this case mail to firstname.lastname@example.org will be sent to the host.com as email@example.com. By specifying the ._via suffix you not only tell the Router to route the address to a relaying module, but you also force that module to send only the local part of the address to the remote server.
If the domain part of the address contains the ._via suffix, the module checks the last domain name part after removing this suffix. If that part is a number, the dot (.) symbol separating this part is changed to the colon (:) symbol:
host.domain.dom.26._via --> host.domain.dom:26 When the domain name contains a colon symbol, the SIP, XMPP, and SMTP modules: