The following article was taken from a 1997 Andover_Update Newsletter back in the days when this used to be a quality newsletter with some very informative articles. Unfortunately, the newsletter has deteriorated in content, today. ===================================================================== P O P 3 A N D S M T P I N - D E P T H Amaze your friends and confound your enemies with your new found geeky knowledge of e-mail and e-mail protocols summed up right here in this week's Tech Column of Andover Update. There are two e-mail major protocols: SMTP and POP3. SMTP is for sending e-mail, and POP3 is for receiving e-mail. * Post Office Protocol, version 3 (POP3) * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppose some dope just e-mailed you an incredibly large file (let's say 12 MB) and you'd like some clever way of killing the message out of your mailbox instead of downloading the entire message. You can easily kill the message using the Telnet application that's built into Windows 95, or in Windows 3.1 use any of the 16-bit Telnet app, such as... Feature Utility: Anzio Lite Anzio Lite is a nice Telnet client, and more importantly it works in Windows 3.1, which is why we are mentioning it here: Dave Central: http://www.davecentral.com/959.html Slaughterhouse: http://www.slaughterhouse.com/telnet.html#anzio So let's log into your mailbox directly using telnet and kill that huge mail message: 1. In Windows 95, hit the Start button, select Run, and type "telnet" (without the quotes) to start the Telnet application. 2. In the Telnet application, select Connect > Remote System. For remote address, enter the name of your POP3 server as indicated in your e-mail program settings. The name of your POP3 server is evrything that appears after the @ sign in your e-mail address. For Port, enter the number 110. Internet servers can run several services at once, and the POP3 mailbox service always runs on port number 110. 3. You should see a brief welcome message from your e-mail server, then you'll get a prompt. You can type commands, but unfortunately you won't be able to see what your typing, so be careful. Type USER (in caps) then a space, then your e-mail username and press return. (Your username is everything before the @ sign in your e-mail address.) 4. Now the server will then ask for your mailbox password. Enter "PASS yourpassword" (without the quotes) and hit return. Here's what this amusing conversation looks like: _____________________________________________ USER joeuser +OK Password required for joeuser. PASS joeuserspassword +OK joeuser has 4 message(s) (23445508 octets). ______________________________________________ ..now to get a list of your inbox messages, type the LIST command: LIST +OK 4 messages (23445508 octets) 1 2578 2 12785 3 23423160 4 6895 ______________________________________________ The LIST command tells you the size of each message. From the listing we can see that message number 3 is the big boy clogging your inbox. Let's kill it! Kill! Kill! Kill! Use the DELE command! DELE 3 +OK message 3 deleted ... ______________________________________________ My that was satisfying. Now just say goodbye to our friendly mail server using the polite QUIT command: QUIT +OK POP3 server at wondernet.com signing off ______________________________________________ That's all there is to it. Now fire up your normal e-mail client and get your mail. Have no fear, the fat message has disappeared. The "POP3 Protocol" may sound fancy, but it's just a list of commands. Here are examples of other POP3 commands for you new mailbox hackers out there: USER joeuser (Enter your e-mail username) PASS password (Enter your mailbox password) LIST (List all messages and their sizes) STAT (Tell me how many messages there are and total size) TOP 3 20 (Show me the first 20 lines of message number 3) DELE 2 (Delete message number 2) RSET 2 (...on second thought, don't delete message number 2) RETR 6 (Show me all of message number 6) LAST (Tell me the number of the last message accessed) NOOP (Do nothing. Useful for testing the server's response) QUIT (I'm done with you. See you later. Have a nice life.) * Feature Utility: Newman's Trombone * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using Telnet to kill inbox messages makes you feel like a real smarty, but if you don't need the ego boost the check out Newman's Trombone. Newman's Trombone is a fine little app that lists all the mail waiting in your inbox, lets your check the headers of each message, and lets to kill any message from the inbox. Then you can fire up your normal e-mail client and get the rest of your mail. You can also leave Newman's Trombone running so it can poll your inbox and kill any messages that come from a certain sender or have key phrases in the subject like "make money" - you can even have it send automatic responses to incoming mail of a certain subject: Dave Central: http://www.davecentral.com/662.html Slaughterhouse: http://www.slaughterhouse.com/miscmail.html#trombone Mail-X does the same sort of thing with more options and ability to check multiple e-mail accounts, and it's 32-bit: http://www.davecentral.com/2220.html SoftSeek: http://www.softseek.com/Internet/E_Mail/E_Mail_Tools/Review_11766_index.ht ml ..or if like 32-bit tray icon utilities, try POPit: Dave Central: http://www.davecentral.com/796.html Slaughterhouse: http://www.slaughterhouse.com/notify.html#popit * Simple Mail Transfer Protocol (SMTP) * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The SMTP protocol is also just a simple list of commands that you execute using any telnet application. Using the telnet application log onto your SMTP server (it's address is in your e-mail program settings) and this time for port enter number 25, which is the common port number used by SMTP server software. Once logged in, use the HELO command followed by your domain name, then enter the MAIL FROM:, RCPT TO:, DATA, and QUIT commands as follows: (The lines starting with numbers, such as 250, are server responses) ______________________________________________ HELO deathvalley.net 250 Hello lttlma-01-223.port.deathvalley.net [202.117.102.48] pleased to meet you MAIL FROM: 250 OK RCPT TO: 250 OK DATA 354 Start mail input; end with . Dear Sir, I am trying to catch a roadrunner, and in doing so I will need a pair of rocket-powered roller skates. Can you please send me pricing and availability. Can you ship via FedEx COD? Thank you, wilecoyote@deathvalley.net (...close message with carriage return, period, carriage return) 250 OK QUIT 221 deathvalley.net SMTP service closing transmission channel ______________________________________________ * SMTP Basic Command Summary: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELO somehwere.com (Tell SMTP where you're from) MAIL FROM: (Your return address) RCPT TO: (A recipient's address) RCPT TO: (...and another recipient) VRFY (Verify this address) RCPT TO: (Send a copy to Mary too) DATA (Message is as follows...) RSET (Abort sending this message) QUIT (Goodbye. See you later.) That's all there is to it. So you see, e-mail programs are really Telnet clients with an interface for message editing. Your e-mail program simply logs onto port 110 of your POP3 server to get your e-mail, and then logs onto port 25 of your SMTP server to send outgoing messages. * Reading Deeper into E-mail Message Headers: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As a side note, you'll notice that the SMTP protocol did not ask us for a username or password, and in fact when sending the HELO command to most SMTP servers, you can claim to be from any bogus domain. This lack of user verification in the SMTP protocol is exploited by spammers to not only forge their return address but also allows them to log onto any SMTP server to send mass mailings. At the very least, the SMTP server will capture the original sender's real IP address and place it in the header of the message in the last header line labeled "Received:" (...other Received lines here. Original sender is revealed belows...) Received: from deathvalley.net (lttlma-01-223.port.deathvalley.net [202.117.102.48]) by wondernet.com (8.8.5) id This example received line is telling you that the original sender of the message was lttlma-01-223.port.deathvalley.net [202.117.102.48], which is a dialup user of deathvalley.net who used the SMTP server at wondernet.com to send this message. Otherwise if you spot the word "@localhost" in the last Received line, then that tells you that the message originated from the SMTP server itself, which may have been a script running on that machine. -------- Copia del original que estuviera en: www.ASHLists.org 02-27-2000