Identified SMTP mail server

July 22, 2013
This tutorial helps you to determine the mail server for any email address. This is helpful to identified SMTP mail sever to use or configure Outlook.

In day to day work I need to troubleshoot email ID with mail hosting server, so this syntax is very useful for me, if you don't kown the mail server just use following syntax to identify the mail server
mail.domainname.com or smtp.domainname.com, it those doesn't work then you need to follow below steps.

(change "domainname" with your desire domain.)

1. Open a DOS Command Prompt
2. Type "nslookup"
3. Your computer's DNS server name and IP address will be displayed.
4. Now just type "set type=mx" - this will force NSLOOKUP to shows Mail eXchange records from the DNS servers.
5. You can try using gmail.com or use your own domain name.
6. you can see below output.

Find and replace text in Linux Command

July 08, 2013
Most of you encounter a situation where you need to replace the text in Linux file. Recently  I need to do this in Ubuntu server for changing repo "US"  to "local" repo. Therefore here is the process how to change it.

You can use vi and vim text editor comes with every Linux OS, if your Linux don't have full function text editor then use this link to install it.

In my case I use it for replace international repo to local repo, you can use for any text replacement.

So I use word "US" to replace with "NP", Which is local for me.
Now use the following command to edit repo source

#sudo vi /etc/apt/sources.list


You can see  repo source list file is opened, then just use the following syntax to replace the text: In my case I use "us" and "np" word, please replace these with your desire word.

:%s/us/np/g

or if you need to conformation then you us this command, mean if you don't need to replace whole text.

:%s/us/np/gc

following command can be used for current line only
:s/us/np/g