Loading

Tuesday, November 9, 2010

SonicWALL Spam Filter SMTP Telnet Test

For years I have used this quick and easy method to test SMTP relaying on my servers.  Run telnet <mail server> 25 from a command prompt or terminal session. This opens a telnet session to the SMTP server using port 25, from which you can attempt to send a test email.

Example using telnet to test SMTP relay.
telnet smtp.powercram.com 25
helo admin@powercram.com
mail from:admin@powercram.com
rcpt to:admin@powercram.com
data
This is a test message...
.
If an email is sent to the address specified and relaying is allowed (to the domain specified) you know SMTP relaying is working on the specific server, etc.

Here's where I need to rant - the developers at SonicWALL are either really stupid or made a huge mistake. Either way their implementation of this method sucks! That's because in order to relay mail through one of their email security appliances you actually need to include angle brackets, <>, with both the from and to email addresses.

What they failed to realize is that the syntax <email@yourdomain.com> means use your own email address, minus the angle brackets (or greater than, less than signs - whatever you want to call them) like, admin@powercram.com. It doesn't mean to use <admin@powercram.com>.

The SonicWALL SMTP Telnet HowTo documentation says MAIL FROM:<someone@company.com> and RCPT TO:<someone@domain.com>. In my 20+ years as a technology professional I understand this to mean substituting the RCPT TO:<someone@domain.com> with an email address of my chosing, excluding the angle brackets! But, no, that's not SonicWALL's implementation. You must use the angle brackets on both the mail from and rcpt to commands as follows.

Example using telnet to test SMTP relay on a SonicWALL Email Security appliance.
telnet smtp.powercram.com 25
helo admin@powercram.com
mail from:<admin@powercram.com>
rcpt to:<admin@powercram.com>
data
This is a test message...
.
Stupid! Their developers need to get a clue and remove their requirement of using angle brackets on email addresses for this purpose.

1 comment:

  1. SonicWall are correct. It just so happens that your servers have a lenient implementation. Many other servers will not accept addresses missing the brackets.
    The angle brackets are a requirement of the SMTP RFC.
    It's been that way as far back as 1982 at least.
    The RFC's explicitly state that these are literals for MAIL FROM and RCPT TO.

    ReplyDelete