Under normal circumstances, this process occurs quickly. But when queues get
abnormally deep, things can go wrong. In the following, which illustrates a problem
* The degenerate case of multiple queues is a single queue. We examine a single queue here, for simplicity.
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
11.3 Using Multiple Queue Directories | 405
that can occur, we show one way that sendmail could be run on a major mail-sending
machine:
/usr/sbin/sendmail -bd
/usr/sbin/sendmail -q10m
The idea here is to create two mail-handling daemons. The first handles inbound
mail, and because this is a mail-sending machine, we expect that this inbound daemon
will perform little work. The second daemon sends all mail it finds in its queue.
It will fork(2) a copy of itself once every 10 minutes, and that copy will process all
the messages in the queue. As described earlier, each queued message is opened and
read so that all the messages can be sorted before delivery begins.
Because this hypothetical site is a major mail-sending site, we expect a high rate for
the number of sent messages. For the sake of argument, let??™s say 30,000 messages
need to be sent per hour.
Now suppose a backhoe, a power failure, clumsy fingers, or any of a thousand possible
disasters causes this site??™s only connection to the Internet to fail for an hour, and
the site can neither look up host information with DNS, nor connect to any remote
sites.
Pages:
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729