28.06.2014 Views

Postfix Overview - Introduction - SCN Research

Postfix Overview - Introduction - SCN Research

Postfix Overview - Introduction - SCN Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Postfix</strong> <strong>Overview</strong> - Queue Management<br />

Page 1 of 2<br />

<strong>Postfix</strong> <strong>Overview</strong> - Queue Management<br />

Up one level | <strong>Introduction</strong> | Goals and features | Global architecture | Queue Management | Security<br />

<strong>Postfix</strong> mail queues<br />

<strong>Postfix</strong> has four different queues: maildrop, incoming, active and deferred (click the upper left-hand icon for<br />

the big picture). Locally-posted mail is deposited into the maildrop, and is copied to the incoming queue after<br />

some cleaning up. The incoming queue is for mail that is still arriving or that the queue manager hasn't looked<br />

at yet. The active queue is a limited-size queue for mail that the queue manager has opened for delivery. Mail<br />

that can't be delivered goes to the deferred queue, so that it does not get in the way of other deliveries.<br />

The queue manager keeps information in memory about the active queue only. The active queue size is limited<br />

on purpose: the queue manager should never run out of working memory because of a peak message workload.<br />

Whenever there is space in the active queue, the queue manager lets in one message from the incoming queue<br />

and one from the deferred queue. This guarantees that new mail will get through even when there is a large<br />

backlog.<br />

No thundering herd<br />

Implementing a high-performance mail system is one thing. However, no-one would be pleased when <strong>Postfix</strong><br />

connects to their site and overwhelms it with lots of simultaneous deliveries. This is an issue especially when a<br />

site has been down and mail is backed up elsewhere in the network.<br />

<strong>Postfix</strong> tries to be a good network neighbor. When delivering mail to a site, <strong>Postfix</strong> will initially make no more<br />

than two simultaneous connections. As long as deliveries succeed, the concurrency slowly increases up to some<br />

configurable limit (or until the host or network is unable to handle the load); concurrency is decreased in the<br />

face of trouble. For those familiar with TCP/IP implementation details, <strong>Postfix</strong> implements its own analog of<br />

the TCP slow start algorithm<br />

Fairness<br />

Apart from the thundering herd controls, the <strong>Postfix</strong> delivery strategy is based on round-robin selection. The<br />

queue manager sorts message recipients in the active queue by destination, and makes round-robin walks along<br />

all destination queues.<br />

On the average, <strong>Postfix</strong> will do simultaneous deliveries to the same domain only when there is not enough work<br />

to keep all outbound SMTP channels busy. So, when AOL goes off-line and comes back, it should not stop the<br />

system from delivering to other sites.<br />

When mail arrives faster than <strong>Postfix</strong> can deliver it, <strong>Postfix</strong> will favor new mail over delayed mail. The idea is<br />

that new mail should be delivered with as little delay as possible; delayed mail can be delivered while the<br />

system would otherwise be idle.<br />

Exponential backoff<br />

<strong>Postfix</strong> implements per-message exponential backoff. When a message cannot be delivered upon the first<br />

http://www.porcupine.org/postfix-mirror/queuing.html<br />

6/26/01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!