Web Hosting Talk







View Full Version : How-To: Test Your Mail Servers Relay


Doggy
04-07-2004, 05:47 PM
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.)

First off I will be using telnet to connect to the mail server. Open a new shell on your local machine or if your on windows run>"cmd"

Here is a basic session:


>micxz@neptune:~> telnet yourhost.com 25
Trying xxx.xx.xx.xx...
Connected to yourhost.com.
Escape character is '^]'.
220 hostname.yourhost.com ESMTP
>helo
250 hostname.yourhost.com
>mail from: me@youremail.com
250 ok
>rcpt to: me@thirdparty.com
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
>rcpt to: me@yourhost.com
250 ok
>data
354 go ahead
>This is a test email via telnet session' Hi'
>
>.
250 ok 1080286547 qp 31615
>rset
250 flushed
>quit
221 hostname.yourhost.com
Connection closed by foreign host.
micxz@neptune:~>



OK so that's pretty simple right.
NOTE: I added ">" to every line I typed.

More commands HERE (http://www.reedmedia.net/misc/mail/open-relay.html)

jmcgon
06-24-2004, 03:10 PM
how do you check a port blocked by your isp? I'm on cox.net and I cant even see if my smtp server is working because of port 25 being blocked totaly.

RegisteringBites
08-30-2004, 03:32 PM
Like you, I used to think that if I knew how to do all this "self-checking", then I could prevent spammers from using my servers for their own purposes. Trust me, I know probably every trick in the book and personally have a black belt in exercising telnet like you've done.

I formerly maintained a well-managed and configured email box and was satisfied that I did all the diligence required to keep it from being an open relay. I did all the tests that were available, not only the one you indicated but the more advanced ones using the percent sign and address "parsing hacks". Nonetheless, somebody with very advanced spamming software still relayed spam through my email server. It's IP address got blacklisted and that's that. Once blacklisted you will find that you're not going to get off that list. All the litmus tests that prove you're not an open relay won't change the fact that you (somehow) were an open relay. Period.

I would strongly suggest outsourcing your email relaying and mailboxes to somebody else. It's not really worth the effort and expense.

sisincorp88
08-30-2004, 04:22 PM
Hi RegisteringBytes,

Where can I outsource the email relaying and mailboxes? Is there a company can do that?