Resources | SMTP Open Relay Test
An “open relay” is a server that allows third-parties (non-customers) to send mail to other third-parties. In other words, an open relay mail server processes a mail message where neither the sender nor the recipient is a local user. There are several techniques that spammers use to get other’s mail servers to send their mail. (The spammer’s goal is to be able to send to the outside—not just to the local accounts.) The following are some of the techniques used to try to get a mail server to relay mail. (Some other techniques include abusing form-to-mail CGIs on webservers.)
THIRD PARTY RELAY TESTS
You can use these easy web based tests to verify that your server is configured properly.
TEST HERE
MANUAL TESTING
To manually test your mail server you can perform the following!
- Open a command prompt (start>run>cmd)
Type "telnet [your mail server IP] 25" - - - this will open an SMTP connection
Type "helo yourdomain.com" - - - server will respond "220 mx.mydom.com SMTP"
Type "mail from:" - - - server responds "250 Address Ok"
Type "rcpt to:" - - - server responds "550 not local host someotherdomain.com, not a gateway"
The reply “not a gateway” indicates the server does not allow relaying **server responses may vary depending on server type and setup
MANUAL TESTING ALL RELAY TYPES
You can use the steps outlined above but substitute the “from:” and “to:” below to more thoroughly check your server for different types of relay. If any of these tests do not give an error than your server is likely open for that type of relay.
Standard relay
mail from:
rcpt to:
Sender domain is long
mail from:
rcpt to:
Sender’s domain is localhost
mail from:
rcpt to:
Sender address without domain (a local user)
mail from:
Sender address is null (like from Mailer-Daemon)
mail from: <>
rcpt to:
Sender address uses local hostname
mail from:
rcpt to:
Sender address using literal domain address (of local host)
mail from:
rcpt to:
Sender address uses local hostname and recipient uses percent hack
mail from:
rcpt to:
Sender address uses local hostname and recipient uses percent hack with domain literal
mail from:
rcpt to:
Quoted
mail from:
rcpt to: <”nobody@third-party.bar”>
Quoted string and percent hack
mail from:
rcpt to: <”nobody%third-party.bar”>
Quoted string and percent hack and domain literal
“x@y”[IP]
arbitrary non-local, source-routed destinations
RCPT TO:
Sender uses IP rather than FQDN
mail from:
rcpt to:
Recipient uses IP rather than FQDN
mail from:
rcpt to: <”nobody@third-party.bar”@[1.1.1.1]>
Recipient uses both FQDN and IP
mail from:
rcpt to:
Sender uses domain literal and recipient uses source routing
mail from:
rcpt to: <@your.local.foo:nobody@third-party.bar>
Sender uses local domain and recipient uses source routing with a domain literal
mail from:
rcpt to: <@[1.1.1.1]:nobody@third-party.bar>
Recipient address uses UUCP-like destination (“bang path”)
mail from:
rcpt to:
Reciepient uses UUCP-like destination and IP
mail from:
rcpt to:
Sender is a known local user from local host; and some mail servers are configured to always allow mail from “postmaster”
mail from:
rcpt to: