|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
Suvival Guide: Checking your emails QUICKLY without an email program
As with my post about how to FTP from a command prompt in Windows I just thought that perhaps this might come in handy as well.
This works especially well in situations where say you are visitting someplace and need to run a quick check, and your ISP doesnt have a decent webmail application. Or even if the webmail is too slow... or checking home mails from work and vice versa; this is especially useful if you have this shamelessly large attachment on your mail server and you just want to get rid of it without your email program trying to download it. Or you have this nasty suspicion that there is a virus in one of the mails, and your wonderful Microsoft supplied email program is too dumb to show you any attachments; or the best yet, you want to check the mail headers of the incoming mail beyond which your mail program or your webmail program will allow you to do so comfortably, to track out who is spamming you etc. Or if you are in a different part of the world and your mail server seems to be connected with a 2400 bps modem, this will speed up your mail checking experience. This is essentially how email programs work, and these commands will let you talk to pretty much most versions of POP3 and IMAP servers. To start: 1) You essentially need a basic telnet program. In Win9x; there is an obscure telnet program in the win directory; while win2k and XP users can use the Command Prompt and use the telnet program there. note: by default, in the windows telnet program, esp in Win9x has local echo turned OFF. If you cannot see whatever you type (and you want to), click on OPTIONS and turn on Local Echo. For Win2k/XP users of the CLI, you can type set localecho in the telnet prompt to turn on that option. 2) You need to remember your mail server address (in this case I will use - mailserver.pcmech.com) 3) your user account name (that is stored in your mail program), i'll use statica as an example 4) your userpassword .. for now, i'll use myemail 5) this is a fairly important step, some ISP's and admins especially in a corporate environ. like to change the server ports around a bit. The standard POP port is set at 110, if your server has an alternate port substitute it in place of the 110 and the rest is the same. These are just a few basic commands to get you started, you can obtain more information by reading the RFC documents for POP servers or checking the documentation of the mail server implementation of your ISP (ok thats a bit far fetched) but these should be more than required for now. I mean the ability to check your mail by learning about 4 commands is a rather powerful tool. Also, the server responses will differ based on the configuration of the various ISP's etc, but it essentially is the same format. As I said, you dont need to carry around a telnet program with you wherever you go, they are on pretty much every OS out there .. even if the OS has a browser installed; with more complex telnet programs you can automate scripts and have a more comfortable UI (the telnet program in Win9x is just awful, but remember this is the survival guide) syntax used: commands you type are in bold a line break after whatever you typed automatically means that you hit the enter key any explanations are in italics what you should see on your screen (server responses) are in red |
|
|
|
|
|
#2 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
The nitty gritty of it..
For windows 9x users:
Click on START > RUN > telnet mailserver.pcmech.com 110 You should now see the default telnet program start up For win2k, xp users or even the *nix Start a command prompt or command line interface and type: telnet mailserver.pcmech.com 110 you should now see the command line telnet, its better than most ppl give it credit for, start up. so let me pick it up with what you should see +OK Hello there the +OK response is pretty much the standard for most such servers, the rest of what you see is probably customized user statica the 'user' command identifies yourself to the server +OK Password required. pass myemail +OK logged in the pass command supplies your user password, of course it isnt encrypted, but if you are security minded, you wouldnt be using IMAP or POP anyway :) just make sure nobody is looking over your shoulder list +OK 1 2181 2 32209 3 1221 4 13455 . the list command, asks the server to list the mails you have on the server. This isnt the number of new mails there, its the total number of mails, arranged in order of arrival to your account (the newer at the bottom). the mails are assigned sequential numbers. The second set of numbers you see represent the size of the mail in bytes (so you can readily identify what the huge mails are .. those that were sent using outlook express :) or have attachments. mind you, this is the size of the entire transmission, including headers etc etc .. see alternative command to list below .. retr 3 +OK 1221 octets follow Return-Path: <yourfriend@pcmech.com> Delivered-To: pecmech-com-statica@pcmech.com Received: (qmail 13293 invoked from network); 7 Jan 2003 11:12:47 -0000 Received: from dialpool-210-214-1-17.mail.net.hi (HELO user) (210.1.2.3) by softdnserror with SMTP; 7 Jan 2003 11:12:47 -0000 Message-ID: <001701c2b63e$baa68ce0$1101d6d2@mail.net.hi> From: "Tom" To: "Statica" References: <003501c2b522$10b7d220$127541db@wave> <002e01c2b57f$25f08930$0200ac0@MORPHEUS> <0a2a01c2b629$a24c02c0$2e7541db@wave> <001e01c2b63a$ab1b80e0$0200ac0@MORPHEUS> Subject: Where's my car Date: Tue, 7 Jan 2003 16:49:54 -0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Dude, where's my car? I have had it up to here of you taking my car and forgetting where you parked it in your drunken stupor. If you do not return my car, i will be forced to call the cops. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> Dude, where's my car? I have had it up to here of you taking my car and forgetting where you parked it in your drunken stupor. If you do not return my car, i will be forced to call the cops. </FONT></DIV></BODY> </HTML> . the 'retr' command followed by the listed number of the mail, will retrieve the mail for you. Note that the mail comes to you twice, the second time around with HTML, this is partly why email is not supposed to be in HTML. top 3 5 +OK headers follow Return-Path: Delivered-To: pecmech-com-statica@pcmech.com Received: (qmail 13293 invoked from network); 7 Jan 2003 11:12:47 -0000 Received: from dialpool-210-214-1-17.mail.net.hi (HELO user) (210.1.2.3) by softdnserror with SMTP; 7 Jan 2003 11:12:47 -0000 Message-ID: <001701c2b63e$baa68ce0$1101d6d2@mail.net.hi> From: "Tom" To: "Statica" References: <003501c2b522$10b7d220$127541db@wave> <002e01c2b57f$25f08930$0200ac0@MORPHEUS> <0a2a01c2b629$a24c02c0$2e7541db@wave> <001e01c2b63a$ab1b80e0$0200ac0@MORPHEUS> Subject: Where's my car Date: Tue, 7 Jan 2003 16:49:54 -0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Dude, where's my car? I have had it up to here of you taking my car and forgetting where you parked it in your drunken stupor. If you do not return my car, i will be forced to . sometimes mails are wayy too long for the size of your telnet window and you cant scroll back, a notorious issue with the WIn9x program, you can get it a bit at a time with the top command; top x y means retrieve the top y lines mail #x dele 3 +OK deleted. this marks the mail #3 to be deleted; mails will be deleted only when you quit from the server, so if you typed it wrong, dont fret rset +OK Resurrected This will clear off any mails set to be deleted quit +OK Bye-Bye this will allow you to quit the server gracefully, deleting any mails that you have set to delete, if you made a mistake and deleted a mail you shouldnt have, now is a good time to fret Alternative to using the list command is the 'uidl' command; this is implemented in some servers; and gives you more information of where the mail came from rather than just a simple list. Try it out to see how it works Summary: telnet mailserver.address.com 110 : logs into mailserver.address.com POP server at port 110 user xyz : identifies the user pass abc : gives the password for the above user list : lists the number of mails retr x : retrieves mail #x from the list top x y : retrieves the first y lines of mail #x dele x : marks the mail to be deleted rset : resets or resurrects mails that are marked to be deleted quit : logging off I'll see if any of you find it interesting or appealing, and can follow it up with a method of sending mails using the most conveniently available mail server (SMTP), preferably your own .. without the bloat of using an email program. HTH Last edited by Statica; 01-07-2003 at 09:44 AM. |
|
|
|
|
|
#3 |
|
Member (6 bit)
Join Date: Sep 2000
Location: Sweet Home Alabama
Posts: 47
|
Thanks, I would like to hear more.
Roberto |
|
|
|
|
|
#4 |
|
usual suspect
Join Date: Jun 2002
Location: not here
Posts: 2,051
|
how do you do this so when you return the email, you can look at it page by page, rather than the email scroll by you. is there anything similar to the following command (dos)
dir /p so you hit enter to continue viewing the email, or does the top command work similar to this? does top allow you to continue after viewing the lines your are on? thanx for the help craig
__________________
the universe is against this current wave of success i'm having. -johnny drama, entourage |
|
|
|
|
|
#5 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
no there isnt a way to do it sequentially as you see, I would do it something like
top 3 10 (for the first 10 lines) top 3 20 (for the first 20 lines .. let the first 10 scroll by you and then read what follows) |
|
|
|
|
|
#6 |
|
Professional gadfly
|
Thanks for the tip, Statica! Very useful.
|
|
|
|
|
|
#7 |
|
Member (10 bit)
Join Date: May 2000
Location: New Zealand
Posts: 546
|
Excellent post Statica - very informative.
Thanks! One question: My mail server works fine except that is does not seem to recognise the 'set localecho' command (I am using Win2k). Is there any alternative usage, or any way to get the server to return a list of valid commands? I tried 'help' and '?', but no joy. David. Last edited by David_Jones; 01-08-2003 at 02:28 AM. |
|
|
|
|
|
#8 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
Hi David_Jones:
Sorry about the confusion .. the set command is local to your telnet program. Try this : open a command prompt - type telnet and press enter. You should now be in the Telnet prompt of Windows 2000. type set localecho You should see a confirmation with Local Echo is ON. Then press quit. and you will be back to your original Windows 2000 prompt. You can proceed as before to log into your mail server. Mind you .. you do NOT need to set local echo on everytime you use it .. telnet will remember your settings. |
|
|
|
|
|
#9 |
|
Member (7 bit)
|
very cool, I sense this is more for the experimental at heart, if you just want to check your email really quickly you can go to http://www.mail2web.com . Thats what I use when I'm on vacation.
|
|
|
|
|
|
#10 |
|
Member (10 bit)
|
i found that the little porgram called putty, is a great replacement for the command promt when you need to acess something.
http://www.chiark.greenend.org.uk/~s.../download.html |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|