NAME
rlytest - test mail host for third-party relay
SYNOPSIS
rlytest [-f sender_addr] [-u recip_addr] [-c comment] [-t
timeout] target_host
DESCRIPTION
The rlytest utility performs a test on target_host to
determine whether it will relay third-party email. It
will try to relay an email message to yourself through
that host. A host that allows third-party relay is
subject to attack by Internet vandals, and frequently is
hijacked by spammers to relay massive amounts of junk
email. A host that allows third-party relay should be
immediately secured, disconnected, or shunned as a menace
to the Internet.
The following options are available:
-f sender_addr
Specifies the (MAIL FROM) email address to use on the
probe. By default, rlytest tries to calculate an
email address in the target domain. This is to ensure
that the host is not using simple (and easily
defeated) envelope checks for anti-relay protection.
-u recip_addr
Specifies the (RCPT TO) email address to use on the
probe. By default, rlytest tries to calculate your
email address and use that. A host that is
susceptible to relay will deliver a probe message to
this address.
-c comment
Embed comment in the body of the test message. This
may be useful, for instance, if you are doing some
automatic testing and want to insert cookies into the
messages.
-t timeout
Sets the timeout value (default is 60 seconds) for
certain operations.
If the message was accepted, the program will terminate
with a zero exit status and display a message to stderr
similar to:
rlytest: relay accepted - status code 221
If the remote host refused to relay the message, the
program will terminate with a zero exit status dislay a
message to stderr similar to:
rlytest: relay rejected - status code 571
A non-zero exit status indicates a program error, such as
a bad hostname or host not resopnding.
EXAMPLE
Here is an example, showing a host that refuses third-
party relay:
$ ./rlytest mail.example.dom
Connecting to mail.example.dom ...
<<< 220 mail.example.dom ready
>>> HELO garcon.unicom.com
<<< 250 Hello garcon.unicom.com, pleased to meet you
>>> MAIL FROM:<[email protected]>
<<< 250 <[email protected]>... Sender ok
>>> RCPT TO:<[email protected]>
<<< 550 <[email protected]>... Relaying Denied
rlytest: relay rejected - status code 550
BUGS
There is no reliable and portable method to determine the
local host's fully qualified domain name. If the utility
bombs out complaining about FQDN problems, read the "host
name configuration" information near the top of the
script.
SEE ALSO
mail(1), sendmail(8), smtpd(8)
AUTHOR
Chip Rosenthal
Unicom Systems Development
<[email protected]>
$Id: rlytest,v 1.17 1999/08/20 07:11:54 chip Exp $
See http://www.unicom.com/sw/#rlytest for latest version.