|
NAMEsmtpdcheck - check SMTP serversSYNOPSISsmtpdcheck [--stop {ip-addr|name}] [--timeout seconds] [prio:]server [[prio:]server]DESCRIPTIONsmtpdcheck checks to see if SMTP servers are available. The intent is for use on secondary mail servers, which have no reason to accept mail when the primary server is available.The argument consists of a list of server names, each of which may optionally be prefixed by a numeric MX priority and a colon. (This is exactly the format for MX records returned by the avenger dns command.) smtpdcheck will attempt to connect to each server in succession. If one of the servers specified on the command line is available, smtpdcheck will print its name to standard output and exit with status 1. If smtpdcheck cannot connect to any of the servers, it will exit with status 0. If a system error occurs, smtpdcheck will exit with status 2. OPTIONS
EXAMPLESTo refuse to relay mail at a secondary MX server when the primary server is not down, you might place the following in /etc/avenger/secondary (assuming MxLocalRcpt is 1):dns RECIP_MXES mx "$RECIPIENT_HOST" setvars server=`smtpdcheck --stop $MYIP $RECIP_MXES` test -n "$server" && defer "Please use server $server" SEE ALSOavenger(1) dbutil(1) asmtpd.conf(5),The Mail Avenger home page: <http://www.mailavenger.org/>. BUGSsmtpdcheck could achieve much lower latency by probing all the servers simultaneously. It should also include some kind of caching, to avoid repeatedly trying to contact an unavailable server. Finally, hosts with multiple IP addresses could be handled more cleanly, though what smtpdcheck does should probably work in most cases.AUTHORDavid Mazieres
Visit the GSP FreeBSD Man Page Interface. |