Update the mta internals to clarify the logic and make it easier to
deal with limits and additianl features later.  The relay tries to
create new connectors, and connectors try to spawn sessions.
count connections on domain
Fix bogus AF mismatch error report if there is a pending MX.
Merge branch 'master' into mta-rework

Conflicts:
	smtpd/mta.c
Merge branch 'master' into mta-rework
Merge branch 'master' into mta-rework
Add flags on route to alter the way they are used to create new
connections:

A route is flagged as NEW until the first connection on it becomes
ready to send mail.  No new connection is attmepted on this route
before that.

A route can be marked as DISABLED, in which case it is ignored in
route lookups, but triggers an error on the connector if no other valid
route is found.  For now, a route is disabled if it is NEW and the
first connection failed to establish a proper SMTP link. It is
re-enabled after a while, and flagged as NEW again.
Merge branch 'master' into mta-rework
Check error with getsockopt() to properly detect the timeout on connect.
Keep a "penalty" counter on a route that gets incremented when a route
gets disabled for some reason.  The route is disabled for a duration
that depends on the current penalty value. When it expires, the
route is set to new again, the penalty is lowered and a timer
is set to further reduce the penalty later until it drops to 0.
When too many mails are rejected in a row on a connection, consider the
route as down, and disable it for a while.
Add a higher penalty for host to which conection failed right away.
Merge branch 'master' into mta-rework
fix format string
fix format string
Merge branch 'mta-rework' of ssh.poolp.org:/git/opensmtpd into mta-rework

Conflicts:
	smtpd/mta_session.c
introduce the penalty concept in the scheduler
Merge branch 'mta-rework' of ssh://ssh.poolp.org/git/opensmtpd into mta-rework
swap parameters
fix