Sunday, September 4, 2016

Steps- dos email


1. Open the cmd prompt. To open the command window, go to Start-> Run. Or press win key + R, type "cmd," and click OK.
2. Ping the server. Type "telnet mail.server.com 25" where "mail.server.com" is the name of the smtp server of your email provider (such as smtp-server.austin.rr.com) and 25 is the port number used by the SMTP service. (This number can be found by checking your account info in the program you normally use for email.) After you enter the above command you should receive a reply like "Trying xxx.xxx.xxx, connected to mail.server.com".
3. Specify the domain you're using to send mail. To specify the domain, type in the below command:
HELO local.domain.com (use your fully qualified domain name here).
You should receive a reply like: "250 mail.server.com Hello local.domain.name pleased to meet you".
4. Enter your email address. Enter a space after the colon (:), and enter your email address as follows:
MAIL FROM: yourname@domin.com
This should give you a message ending with "250 ...Sender OK".
5. Enter the email address of the recipient. Type in the below command:
RCPT TO: friend@otherdomain.com
Note that you can enter more addresses if you intend to email more than one person.
You should see a message ending with "250 ...Recipient OK".
6. Compose your message. To start writing, type DATA and press Enter.
On the next line, type "SUBJECT: [your subject here]" and press Enter twice.
Continue typing your message.
To end your message, put a single period (.) on a line by itself, and press Enter.
You should see something saying "Message accepted for delivery."

7. Exit telnet. Type QUIT to exit.











How to Check Email with Telnet

Telnet can be used as another way to check email. The first two steps are for Windows only; Mac and Linux users should use their own methods for launching a terminal/console window.

Edit Steps

1. Select Start in the bottom left corner of the screen, then select Run.
2. Once the Run window starts, type in cmd.
3. At the command prompt, type in telnet emailprovider.com 110 (where "emailprovider" is the name of the service you use for email).
4. Type USER yourusername (you may see what you type or not, and "yourusername" should be changed to whatever comes before the @ in your email address).
5. Then type in PASS yourpassword (if you can see what you type, you will see your password).
6. Type list.
7. You will see a list of items with labels like "1 607" and "2 1323403."
8, If you want to look at the message labeled 2 1323403, type retr 2. You can replace the 2 with any other number to view other messages.
9. If you want to delete message 1 607, type dele 1.
10. When you are done checking your email, type quit.




[[Image:Email 18.jpg|thumb|right|251px]]Telnet can be used as another way to check email. The first two steps are for Windows only; Mac and Linux users should use their own methods for launching a terminal/console window.


#  Select ''Start'' in the bottom left corner of the screen, then select ''Run''.
#  Once the Run window starts, type in cmd.
#  At the [http://en.wikipedia.org/wiki/Command_line_interface command prompt], type in ''telnet emailprovider.com 110'' (where "emailprovider" is the name of the service you use for email).
#  Type ''USER yourusername'' (you may see what you type or not, and "yourusername" should be changed to whatever comes before the @ in your email address).
#  Then type in ''PASS yourpassword'' (if you can see what you type, you will see your password).
#  Type list.
#  You will see a list of items with labels like "1 607" and "2 1323403."
#  If you want to look at the message labeled 2 1323403, type retr 2. You can replace the 2 with any other number to view other messages.
#  If you want to delete message 1 607, type dele 1.
#  When you are done checking your email, type quit.




*It is important to note that telnet is disabled by default on Windows Vista/7 and 8. To enable it, go to Control Panel > Programs and Features > Turn Windows Features On or Off. Check Telnet Client, then allow for it to configure. Telnet will now be enabled.

Tech Tip : Sending Email from Command line

Everyone is not as lucky as having a full fletched email client like thunderbird or kmail to send mails. There is one unlucky group known as system administrators who have to send the mails either through the command line or a script running on the remote server. Also, apart from sending the emails, sometimes one needs to test or debug the email server which can’t be done by traditional email clients. If you are one of those system administrators and are scared, then you shouldn’t be, because this is where netcat comes to rescue.
Netcat ( /usr/bin/nc ) is a simple utility which is used with TCP/UDP connections, sometime to troubleshoot and sometime as a bridge to interact with them. In our case, if we would like to send a email through port 25, we should be able to feed the stream of data containing the mail information to port 25, and that is what netcat is for.
Before starting with netcat we should know that what input an SMTP server expects on port 25, so that it could forward it as a mail to the designated SMTP server. We are going to confirm this by connecting to the SMTP server with telnet command on port 25 and issuing the commands and checking the response we are getting.
# telnet smtp.geekride.com 25
Trying 192.168.0.10...
Connected to smtp.geekride.com (192.168.1.1).
Escape character is '^]'.
220 smtp.geekride.com ESMTP
HELO smtp.geekride.com
250 smtp.geekride.com Hello [192.168.1.1], pleased to meet you
MAIL FROM: geekride@sender.com
250 2.1.0 geekride@sender.com... Sender ok
RCPT TO: geekride@gmail.com
250 2.1.5 geekride@gmail.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
From: [Geek Ride] <geekride@sender.com>
To: [Geek Ride] <geekride@gmail.com>
Date: Sat, 22 May 2010 07:43:25 -0400
Subject: Test Message
 
This is a test mail.
 
~GeekRide
 
.
250 2.0.0 o4MAd6I5006285 Message accepted for delivery
QUIT
221 2.0.0 smtp.geekride.com closing connection
Connection closed by foreign host.
Just replace the values with the one suited for you in the above example like the SMTP server to connect, receiving mail id. For the sender email-id, you don’t need to give a valid id but just needs to provide a valid domain name that is allowed to relay from the SMTP server. After finishing writing the mail enter “.” in a new line to send the mail.
Now we know that what input the remote server is expecting from us, and what we need to do is to put all the data in a text file and pass it to port 25 through netcat.
One more thing to notice is that the recipient mail server expects the date in specific format, so to get the date you are looking for use this command:
# date '+%a, %d %b %Y %H:%M:%S %z'
Mon, 12 Apr 2010 14:21:26 -0400
Now we just need to put all the data we input through telnet into a text file, which will look something like this.
HELOsmtp.geekride.com
MAIL
FROM:geekride@sender.com
RCPT
TO:geekride@gmail.com
DATA
From:[GeekRide]<geekride@sender.com>
To:[GeekRide]<geekride@gmail.com>
Date:Sat,22May201007:43:25-0400
Subject: Test Message
This is a test mail.~GeekRide.
QUIT
Now just feed the file to the SMTP server via netcat.

# /usr/bin/nc jetwebpro.com 25 < /home/manishk/mail.txt
220 smtp.geekride.com ESMTP Sendmail 8.13.8/8.13.8; Sun, 23 May 2010 02:12:00 -0400
250 smtp.geekride.com Hello [192.168.1.1], pleased to meet you
250 2.1.0 geekride@sender.com... Sender ok
250 2.1.5 geekride@gmail.com... Recipient ok
354 Enter mail, end with "." on a line by itself
250 2.0.0 o4N6C0xd014823 Message accepted for delivery
221 2.0.0 smtp.geekride.com closing connection
And your mail is in the inbox. So, i think the process is pretty much clear over here. We have formatted the data to look like an email, and then feed it through the netcat to the port 25 of the SMTP server and we are done.
Well, this is the simplest form of mail you could send through netcat. Obviously there are other ways and tools to do the same thing, and may be better than this, but this is just one way i am showing. If you devote some time, the email body can be generated through a small shell/perl script and with the help of cron that could send periodic details about your system (by running few commands) to a list of recipients.