Wednesday, April 6, 2011

Telnet SMTP Commands

In order to test functionality of SMTP Relay server, sometimes you need to send email using Telnet. This commandline utility works from your windows OS command prompt.
1-
Go to command prompt and invoke Telnet utility followed by smtp relay server's IP address and port number.

Let's suppose IP address for SMTP server is 10.1.1.1 and it is using the default port (25) to relay emails.
so the command would be

telnet 10.1.1.1 25
(press ENTER)

You will get an SMTP banner something like this

220 SMTP.pk-itfabric.com Microsoft ESMTP MAIL Service, Version: 7.5.7600.16385 ready at Wed, 6 Apr 2011 00:23:21 -0700

2-

To start communication type

helo
(press ENTER)

A confirmation message will appear which will show connecting system (client's) IP address

250 SMTP.pk-itfabric.com Hello [10.255.189.13]

3-

Provide sender's email address first using Mail From: command

Mail From:omer@pk-itfabric.com
(press ENTER)

confirmation of sender will be received like this

250 2.1.0 omer@pk-itfabric.com....Sender OK

4-

Provide destination email address using Rcpt To: command

Rcpt To:info@pk-itfabric.com
(press ENTER)

5-

Now write the message text, in order to finish the email text, type " . " in a separate line and press ENTER

the whole scenarion will be like this

Data
(Press ENTER)

you will see following confirmation message

354 Please start mail input.

If you need to mention the email subject type Subject command

Subject:This is a test Message

(Once done with subject press ENTER twice)

now start writing the message body

This is a test message please reply to acknowledge
(press ENTER)

.

(press ENTER)

When you get the following message, it means email has been sent from your system to the relay server

250 Mail queued for delivery.

6-

You can now safely disconnect the session by using Quit command and

Quit

(press ENTER)

you will get a disconnection message
221 Closing Connection. Good bye.

Connection to host lost.


7-

Now check the mail box, if the email is not there it may be in your junk folder since there could be some spam filters imposed by your email service provider.

Thursday, March 17, 2011

Command to Change MTU in Windows 2008 R2

Maximum transmission unit or MTU is by default 1500 for TCP/IP, however it needs to be adjusted
sometimes.

1‐
In order to change MTU in Windows 2008 R2, go to command prompt and type
netsh interface ipv4 show interfaces(press ENTER)You will get a table like this


Idx Met MTU State Name
--- ---------- ---------- ------------ ----------------------
1 50 4294967295 connected Loopback Pseudo-Interface 1
11 10 1500 connected NLB
12 10 1500 connected Public


From the table above we need the value of Idx which is basically id of our NIC connected to “Public” interface
2‐
Now type this command to set the MTU value to 1400 instead of 1500 


netsh interface ipv4 set subinterface "12" mtu=1400 store=persistent  (press ENTER)

If there is no error you will have an “OK” message.

3‐
Now re‐run the command to show interface details and you will see new value of MTU against “Public” Interface
netsh interface ipv4 show interfaces

(press ENTER)

you will notice new value of MTU this time

Idx Met MTU State Name
--- ---------- ---------- ------------ -----------------------
1 50 4294967295 connected Loopback Pseudo-Interface 1
11 10 1500 connected NLB
12 10 1400 connected Public