Home » Posts tagged 'telnet'
Tag Archives: telnet
452 4.3.1 Insufficient System Resources – Continued Telnet Training
This is a problem that crops up fairly often if you have a lot of disparate Exchange servers out there without a solid monitoring solution in place. Very common for MSPs. Oh, and actually have somebody paying attention to those monitoring alerts. Nobody likes paying attention to monitoring alerts. There are reams of rules dedicated to keeping them out of sight in Outlook clients around the world. But that makes for an entirely separate topic/rant. The symptoms of this problem are that you’ll be getting reports from the end users that they don’t seem to be receiving any email, or at least any external email. But oddly enough sending out email is working just fine.
This is the point where a quick telnet test will focus you in on what is going on really fast. Continuing with what you learned from the post on Essential Exchange Troubleshooting – Send Email via Telnet you will want to telnet into the server from outside the organization. You may immediately get a response of:
452 4.3.1 Insufficient System Resources
But more likely you’ll receive a typical SMTP banner such as
220 myserver.contoso.com Microsoft ESMTP MAIL Service ready at Mon, 27 May 2013 08:19:44 -0700
If so then I recommend that you continue through with sending in an email via telnet. The next likely place that you’ll encounter this error is when you issue the RCPT TO: command to which you receive a response of
452 4.3.1 Insufficient System Resources
The fix for this is fairly simple. Check your Exchange server for low disk space usage on the partition where your queues reside, which will most likely be the partition with your Exchange installation. I find that most often what has eaten all of your space, in cases of single server Exchange 2007/2010 installations, is the IIS log files. When setting up your Exchange server it is a good idea to make sure that you have an archiving/recycling policy in place for your IIS logs to keep them from swallowing the entire partition over time. BES installations have the same problem as well with log files swallowing the drive.
The key phrase that you’ll want to keep in mind with this is “back pressure.” In a later post I’ll delve into this term.
More to the topic on hand, here’s an extra PowerShell fix for you to keep those IIS log files under control. It can also be easily customized for BES logs or other logging happy programs. Or even just keeping your temp files cleaned up regularly. You’ll want to set it to run as a scheduled task on a daily, weekly or monthly basis depending upon your organizations policies.
# CleanIISLogs.ps1 # Find and remove files older than $days # Set $LogPath to where the IIS logs you want to recycle are kept # $days = 31 $LogPath = C:\inetpub\logs\LogFiles\W3SVC1 # Find the target date $startdate = Get-Date $startdate = $startdate.AddDays(-$days) # Clean the directory of log files older than the target date Get-ChildItem -Path "$($LogPath)" -Recurse | where {$_.LastWriteTime -lt $startdate} | Remove-Item -Confirm:$false
Is this post helpful to you or is there something you would like me to go into greater detail on? Please let me know, thanks.
Essential Exchange Troubleshooting – Send Email via Telnet
One of the best tools available for troubleshooting mail flow issues is right at your fingertips. It is quick, simple, and only requires a little training to use effectively. I am always surprised at how very few Exchange administrators seem to use it. You can see some of this in action in my previous NDR troubleshooting post. So let’s delve into some of the basics of how to use telnet for troubleshooting your mail flow issues.
First off, it is a great way to see if your SMTP service is even available. If you cannot connect to it via telnet then you immediately know that you need to check on the health of your services and if that is ok then you most likely have a firewall or other networking issue. So to execute this basic check pop open a command prompt and run
telnet myserver.contoso.com 25
Substituting your server address and if you are troubleshooting an alternate port change the 25 to whatever port you are troubleshooting. The majority of the time it will be port 25 though. If you receive a successful connection you should be greeted by your mail server’s banner, probably something along the lines of below
220 myserver.contoso.com Microsoft ESMTP MAIL Service ready at Mon, 27 May 2013 08:19:44 -0700
This is also a good time to check whether you are seeing the correct server address in your banner. If you are seeing the internal address for myserver.contoso.local you will want to update this.
At this point you need respond with a HELO or EHLO command to start the SMTP conversation. What is the difference between them? HELO is for SMTP while EHLO is for eSMTP. In the context of sending an e-mail via telnet it won’t matter which you use but it mail be useful to use EHLO to see what verbs are being offered, especially if you are suspecting that there mail be a problem with eSMTP.
EHLO mail.alternatecontoso.com
You should receive a response similar to what is below
250-myserver.contoso.com Hello [4.3.2.1] 250-SIZE 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH NTLM LOGIN 250-8BITMIME 250-BINARYMIME 250 CHUNKING
If you have seen all of the above then so far so good. Your routing is good (assuming you aren’t being routed to the wrong SMTP server, but if you are and you don’t know it then you have bigger problems), your firewall configuration is correct and your hub transport is listening. Also note from the verbs sent above you can see that this service supports TLS and authentication as you can see in the STARTTLS and AUTH NTLM LOGIN verbs.
Now we want to start sending an email to someone on this server. Most likely your postmaster account since you are just testing your mail flow.
MAIL FROM: someone@alternatecontoso.com
You should receive a Sender OK response. If not then you’ll know that you need to look into sender permissions.
250 2.1.0 Sender OK
We need to specify who we are sending to
RCPT TO: postmaster@contoso.com
Here you should receive a Recipient OK response. This is the part where the conversation is most likely to break down and you will get an error code that you can start working with.
250 2.1.5 Recipient OK
So far so good, now we can send the actual email. Start off with the DATA command
DATA
And the server will be ready to receive your input. You can get as fancy or as simple as you like here but once you are done with the message use a . to end the mail input
354 Start mail input; end with <CRLF>.<CRLF> . 250 2.6.0 <53ea1be2-3d1a-4856-8bdf-3c576c14cfc0@mail.contoso.com> [InternalId=47975] Queued mail for delivery
Assuming everything is still going well you should see either a queued mail for delivery or a spam rejection, depending upon how strict your spam filter is. You also may get an error message that would be worth researching as well. If everything is still going well you can close out the conversation.
QUIT 221 2.0.0 Service closing transmission channel
This is all for sending an email similar to how an anonymous server on the Internet would send an e-mail. There are a few variations that you will want to be aware of as well though. The first is for testing relaying. When you get to the part where you input the recipient you will input a remote server recipient.
RCPT TO: foreignemail@externalserver.com
If you are NOT wanting the server to relay the expected response would be
550 5.7.1 Unable to relay
This is a good thing as you do not want open relays sitting around. But on the other hand if this is an internal connector that is supposed to be relaying then you could have a permissions problem on your hand.
The other method that you would normally use telnet testing for is authentication. This is a bit more complex. After your HELO/EHLO command you will issue
AUTH LOGIN
To which if basic authentication is supported you will receive a response of
334 VXNlcm5hbWU6
This gibberish is actually a base64 encoded response that says “Username:”. The expected response to this is a base64 encoded username. An online utility I recommend is at this site which is pretty simple for encoding/decoding base64 message. So translate the username you are attempting to use into base64 and respond with that. I responded with “logon” encoded.
bG9nb24=
You should receive a response of
334 UGFzc3dvcmQ6
Which translates to “Password.” So now you need to response with the account’s password encoded in base64. My response was “My simple password”
TXkgc2ltcGxlIHBhc3N3b3Jk
You should now receive an Authentication successful message
235 Authentication succeeded
And you can continue with the rest of your steps of sending an email.
Was this post helpful? Do you have any topics you would be interested in seeing me cover in a later blog post? Just leave your suggestion in the comments below or shoot me an email.