EnglishFrenchSpanish

OnWorks favicon

smtpdcheck - Online in the Cloud

Run smtpdcheck in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command smtpdcheck that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


smtpdcheck - check SMTP servers

SYNOPSIS


smtpdcheck [--stop {ip-addr|name}] [--timeout seconds]
[prio:]server [[prio:]server]

DESCRIPTION


smtpdcheck 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
--stop {ip-addr|name}
Tells smtpdcheck to stop before checking a server with IP address ip-addr or hostname
name. If such a host is encountered in the list of servers and prio is specified,
then smtpdcheck will consider it acceptable for other servers with the same priority
to be available, even if those servers were first in the list. In other words, given
the following arguments:

smtpdcheck --stop s2.domain.com \
10:s1.domain.com 10:s2.domain.com \
20:s3.domain.com

This command will always succeed, regardless of whether "s1.domain.com" is up, because
"s2.domain.com" has the same priority. On the other hand, the following command will
fail and output "s1.domain.com" if "s1.domain.com" is up:

smtpdcheck --stop s2.domain.com \
10:s1.domain.com 20:s2.domain.com \
30:s3.domain.com

If a gethostbyname lookup for the argument name fails, smtpdcheck will exit
immediately with status 2.

--timeout {seconds]
By default, smtpdcheck spends 10 seconds probing each server. This includes the time
to do a DNS lookup, to establish a TCP connection to port 25 of the server, and to
read the "220" SMTP code from the server's SMTP greeting message. To use a different
value, specify it with the --timeout option. The value 0 disables the timeout
completely, which is dangerous since smtpdcheck might then end up waiting forever to
read the "220" string.

EXAMPLES


To 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"

Use smtpdcheck online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 2
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 3
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 4
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 5
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 6
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • More »

Linux commands

Ad