Complex routing Sendmail routes mail using the domain of the recipient. If Sendmail is able to resolve the address to the local user, Sendmail uses the recipient's name to finish the job. Sometimes, however, the routing decision should be made using both the recipient's name and the desti- nation domain. 1. Principles One reality of the Internet these days is the virtual hosting of multiple domains on the same server. This works fine for Web service. A single server fakes many virtual servers. For electronic mail, sendmail has the ability to accept email for multiple domains. Generally, all those domains are aliases (see Aliases for your system in basic sendmail configuration) for your system. If your system has the following aliases: +o domain1.com +o domain2.com then user@domain1.com and user@domain2.com point to the same user account and email folder. This may, sometimes, be wrong. Complex user routing can be understood this way: If you receive email for one_user@one_domain then forward this mail to another_user@another_domain using another_email_server. 2. Task For each rule, you must complete a screen composed of these fields. 2.1. This rule is active You can deactivate one rule without erasing it. You must regenerate the sendmail.cf file and restart Sendmail (linuxconf will tell you to do so anyway). 2.2. to The to field contains the original email destination including the full domain name. It is possible to redirect a full domain by only entering the domain name with the @ character as a prefix (@domain.com). While redirecting a domain is normally done with the special domain routing facility of linuxconf, using complex user routing allows you to redirect a complete domain to a single user account into another domain (this can be very handy!). 2.3. Rewritten to You must enter the new email destination. If you wish to redirect the email to another local user, you can simply enter the user account without a domain. This looks like a simple alias (see "Setting user aliases"). It is not a replacement for aliases; it is more general. For a large user base, the normal user alias is more efficient because it uses a database. The complex user routing should be used to handle exceptions which can't be solved by normal user aliases. For example, normal user aliases can't solve this: +o info@vdomain1.com -> joe +o info@vdomain2.com -> jack 2.4. Forward to server(opt) Normally, Sendmail will find the proper server based on the Rewritten to field. Sometimes, you may want to impose a server. You just write the fully qualified name here. 2.5. Mailer If you specify a server, you must specify the protocol to use. Normally esmtp should be used. You can also select uucp-dom when forwarding email through a uucp gateway. This is one case where you will always specify a destination server. 2.6. Priority This is just a number used as a hint to sort the rules when generating the sendmail.cf file. Higher priority means a rule will be entered first in sendmail.cf. This is normally used when two rules intersect (one matches a subset of the other). Sendmail matches rules sequentially. The first match ends the search. 2.7. Comment You can write whatever you want here.