Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  RLYTEST (1)

.ds Aq ’


rlytest - test mail host for third-party relay



rlytest [-f sender_addr] [-u recip_addr] [-c comment] [-t timeout] target_host


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

If the message was accepted, the program will terminate with an exit status of 2 and display a message to stderr similar to:

  rlytest: relay accepted - status code 221

Any other (non-zero) exit status indicates a program error, such as a bad hostname or host not resopnding.


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
  <<< 250 Hello, pleased to meet you
  >>> MAIL FROM:<nobody@mail.example.dom>
  <<< 250 <>... Sender ok
  >>> RCPT TO:<>
  <<< 550 <>... Relaying Denied
  rlytest: relay rejected - status code 550


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.


mail(1), sendmail(8), smtpd(8)


  Chip Rosenthal
  Unicom Systems Development

  $Id: rlytest,v 1.22 2001/10/22 22:02:48 chip Exp $
  See for latest version.

Search for    or go to Top of page |  Section 1 |  Main Index

perl v5.20.3 RLYTEST (1) 2016-03-18

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.