How to check for an open relay

To see if yourserver.com is an open relay, you can run through the following sequence on any box that has a telnet client:
telnet yourserver.com 25
HELO myserver.ca
MAIL FROM:
RCPT TO:
DATA
From: "Relay Test" 
To: Mike 
Subject: Open Relay Test
This is a relay test. A properly configured mail server
should decline to relay this message.
 
.
QUIT