18.5 Mail Routing

Qmail lets you build very complex routing strategies on top of its three basic delivery paths: local, virtual, and remote.

18.5.1 Sending All Mail to a Smarthost

If your qmail system has a full-time Internet connection, route all mail to a smarthost with a default entry in smtproutes, e.g., :mail.myisp.com. If you have a dialup or other intermittent connection, use a default virtual domain to route all outgoing mail into a Maildir, then when you connect to your ISP, use maildirsmtp to take the mail out of the directory and send it to the smarthost. See Chapter 11.

If you have a few locally connected systems to which you can send mail directly, you can also put specific entries for them in smtproutes, overriding the smarthost default. If you use virtualdomain delivery, you also need not-virtual entries for each of them in virtualdomains, e.g., nearby.com:. See Chapter 12.

18.5.2 Treating a Few Remote Addresses as Local

If you have local users who use addresses at another system as their return address on mail, you can "short circuit" mail to them and handle mail to them as local, by creating individual address virtualdomains entries for them. See Chapter 12.

18.5.3 Slowing Mail Delivery to Certain Domains

Some mail servers have an unfortunate habit of accepting more incoming SMTP connections than they can handle, and then collapsing. The simplest way to limit the number of connections to a server is to route all the mail destined to it into a Maildir using lines in virtualdomains, then run maildirserial from cron to deliver the mail one at a time. Another approach is to install two copies of qmail, the main one with the usual high concurrencyremote level, and a second one with a very low concurrencyremote level of 5 or so. Then in the main system, for any domains that need to be fed mail slowly, use either virtual domains or smtproutes to hand mail for those domains to the secondary copy of qmail. See Chapter 17.



qmail
qmail
ISBN: 1565926285
EAN: 2147483647
Year: 2006
Pages: 152

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net