DragonFly On-Line Manual Pages

Search: Section:  


RLYTEST(1)            User Contributed Perl Documentation           RLYTEST(1)

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

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:<nobody@mail.example.dom> <<< 250 <chip@garcon.unicom.com>... Sender ok >>> RCPT TO:<chip@garcon.unicom.com> <<< 550 <chip@garcon.unicom.com>... 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 <chip@unicom.com> $Id: rlytest,v 1.22 2001/10/22 22:02:48 chip Exp $ See http://www.unicom.com/sw/#rlytest for latest version. perl v5.20.3 2015-10-07 RLYTEST(1)

Search: Section: