웹에서 "window.showModalDialog " 메소드를 이용해서 Modal 창을 쓰는 예가 종종 있다.
뭐 개인의 차이겠지만..
개발자 취향에 따라서 .. 혹은 사이트특성에 따라서.. 개발 표준에 따라서.. 프로그램 특성에 따라서 일반 Popup이냐 혹은 Modal 창이냐를 선택하게 된다.
물론 그렇다는 이야기는 개개의 성격과 특성이 아주..아주 많이 다르다는 이야기 이다.
예를 들어서 마우스 오른쪽 클릭이라던가, 아니면 F5를 누르고 새로고침을 할때라든가.. 하튼 상당히 여라가지 부분에 있어서 많이 다른 상황이 연출된다.
예전에 Modal 창으로 개발시에는 소스 수정후에 바로 반영이 안되어서 익스플로러 인터넷 옵션에 기존 임시 파일들을 다지우고서 새로 띄워야 적용사항을 볼 수 있었던 기억도 있다.
물론.. 지금은 안그렇지만..
뭐 어쨌거나..
이번에 Modal 창으로 떡칠(?)된 사이트 유지보수를 하다 당한 케이스인데..
리스트에서 선택값을 클릭하면 Modal 창이 뜨고 . Modal 창에 뜨는 세부 화면에서 대분류 Select 값을 선택하면 window.open으로 안보이는 창하나를 띄우고 거기서 대분류에 맞는 특정 값을 쿼리해와서 다시 Modal 창으로 돌려 주는 구조의 화면 이었다.
쿼리시에는 Session값에 따른 권한별 구분을 줘서 결과를 구분하고 있었다.
그런데..
이런..
권한 적용이 하나도 안되는 문제가 발생했다.
첨엔 쌩쇼를 하다가..
나중에 권한별 Session값을 확인해 보니..
Modal 창에서는 확인이 되는 Session값이 새로 띄워진 popup에서는 전혀 값이 나오질 않았다.
결과적으로.. 거기에 대한 기술자료는 찾지를 못했지만..
Modal 창이라는 특수한 놈에서 popup을 띄우면.. 거기에 따른 Session값을 상속받지를 못한다는 결론을 잠정적으로 내리고 wiondow.open을 iframe을 이용하는 방식으로 바꿔서 원하는 결과를 얻어낼수 있었다.
Modal 창을 이용할때는 편한부분들도 분명 존재 하지만.. 분명 귀찮은 부분들이 좀더 많은 것 같다.
이런 자잘한 세세한 부분들을 신경써야 좀더 신뢰성 있는 프로그램이 나올수 있을 것이다.
ps.. 도데체 얼마만에 지식공유라는 대분류 타이틀을 가지고 포스팅을 해본건지.. 쩝. 반성해야 겠다.
1. Create a new ActiveX DLL Project in Visual Basic. 2. Select References from the Project menu and add the following references to the project: 'Microsoft Transaction Server Type Library' (MTXAS.DLL) 'Microsoft Active Server Pages Object Library' (ASP.DLL) 3. Name the Project ObjectCtxtProject and name the Class ObjectCtxtClass. 4. Set the Class Property MTSTransactionMode = 1 - NoTransactions. 5. Copy and paste the following code into the Class Module:
[CODE]Implements ObjectControl Private objContext As ObjectContext Option Explicit Private Sub ObjectControl_Activate() ' Get a reference to the object's context here, ' so it can be used by any method that may be ' called during this activation of the object. Set objContext = GetObjectContext() End Sub Private Function ObjectControl_CanBePooled() As Boolean ' This object should not be recycled, ' so return false. ObjectControl_CanBePooled = False End Function Private Sub ObjectControl_Deactivate() ' Perform any necessary cleanup here. Set objContext = Nothing End Sub[/CODE]
6. Copy and paste the following public method into the Class Module:
[CODE]Public Sub TestMethodObjectCtxt() Dim objResponse As Response Dim objRequest As Request Set objResponse = objContext("Response") ' Obtain ASP Response object Set objRequest = objContext("Request") ' Obtain ASP Request object If InStr(objRequest.ServerVariables("HTTP_USER_AGENT"), "MSIE") > 0 Then objResponse.Write "You are using a very powerful browser." Else objResponse.Write "Try Internet Explorer today!" End If End Sub[/CODE]
7. Compile the DLL. 8. Add the DLL to a MTS Server/Library Package. 9. Copy and paste the following ASP script into a new ASP file in a virtual directory.
[CODE]<% set obj = Server.CreateObject("ObjectCtxtProject.ObjectCtxtClass") obj.TestMethodObjectCtxt set obj = Nothing %>[/CODE]
10. Request the ASP file from a browser, you will see the following result if you are running Internet Explorer:
You are using a very powerful browser.
Otherwise you will see the following result:
Try Internet Explorer today!
EX2.
1. Open a new ActiveX DLL project. 2. Set a reference to the Microsoft Transaction Server (MTS) Type Library (Mtxas.dll). 3. Set a reference to the Microsoft Active Server Pages Object library (Asp.dll). 4. Rename the project as prjMTS and class as clsMTS. 5. Copy the following code to the clsMTS:
[CODE]Dim objApplication As Object Dim objSession As Object Public Function GetVar() As String Dim objCtx As ObjectContext Set objCtx = GetObjectContext Set objApplication = objCtx.Item("Application") Set objSession = objCtx.Item("Session") GetVar = objApplication("Var1") & objSession("Var2") & "..." End Function[/CODE]
6. Create a blank new ASP page under one of virtual directories and add this code to it:
[CODE]<% Application("Var1") = "Where do you want" Session("Var2") = "to go today ?" Dim obj Set obj = Server.CreateObject("prjMTS.clsMTS") response.write obj.GetVar() Set obj = Nothing %>[/CODE]
7. When you run this ASP page, the variables set in the page are accessed inside the Visual Basic component and the following appears in the browser:
Where do you want to go today ?
출처 : MSDN.com
주의1.) Response, Request, Server, Application, Session 등의 asp 객체를 사용하고자 할경우 MTS 없이 사용하면 오류가 발생한다 . 이는 MTS 없이는 컴포넌트가 Context 를 관리할수 없기때문이며, 어떤 클라이언트에게 asp 구문을 수행해야 하는지 알길이 없기 때문이다 .
골빈해커님이 만드신.. http://blog.golbin.net/ .. 블로그 사이트에 올라온 최신 포스팅 글들을 쭉 모아오는... 내가 php는 잘몰라서.. 어찌 했는지 물어봤더니.. 간단하다는 말만.. 후후 -_-;;; php로 개발한것 같던데.. asp로 한번 만들어 보고 싶은.. 생각이 들어서..
asp로 그냥 하기는 힘들거 같구.. vb에 있는 inet 컨트롤을 이용해서 파싱.. 해봤는데. 그런데로 만족할만한 결과가 온것 같다. 일단 TatterTools 사이트에 있는것만 뽑아 오는 소스는 아래와 같다. 별로.. 대단한건 아니지만.. 그냥. 함 해보고 싶어서.. -_-;;;;
[CODE] <% Option Explicit Dim inet Dim tmpUrl, tmpStr Dim iStart, iEnd, content Dim tmpCont, i '불러올 tmpUrl 주소 tmpUrl="http://www.tattertools.com/tc/view_main.php" 'inet 컨트롤 객체 생성 및 속성값 셋팅 set inet = server.CreateObject("inetCtls.Inet") inet.RequestTimeout = 20 inet.tmpUrl = tmpUrl tmpStr=inet.OpentmpUrl 'Split로 자를 기준포인트를 만들기 위해 의미없는 문자를 삽입 tmpStr = Replace(tmpStr,"<td class=h1","!@#$%<td class=h1") '가져올 문자열 범위 설정 iStart=intmpStr(tmpStr, "!@#$%") iEnd=intmpStr(tmpStr, "<table width=470 cellpadding=0 cellspacing=0 style=margin-top:15>") '해당범위만큼 문자를 가져와서 변수에 담음 content=Mid(tmpStr, iStart, iEnd-iStart) '해당하는 내용중에 반복되는 값을 기준으로 잘라서 배열에 담는다 tmpCont = split(content,"!@#$%") Response.Write "<table width=""100%"" border=0 cellpadding=0 cellspacing=0>" Response.Write "<tr><td class=h1 colspan=3>***Tatter Tools***</td></tr>" Response.WRite "<tr onmouseover=""this.style.backgroundColor='#FFFAF0';"" onmouseout=""this.style.backgroundColor='#FFFFFF';"">" '루프를 돌면서 해당 값을 화면에 출력 for i=Lbound(tmpCont) to Ubound(tmpCont) if i> 30 then exit for Response.Write tmpCont(i) Next '객체 반환 Set inet = nothing %> [/CODE]
부모와 떨어져 지내는 자취생들이 식사를 해결하면서 난감한 것 중 하나가 남은 음식의 처리일 것이다. 혼자 먹자니 양이 너무 많고, 그렇다고 안먹고 지낼 수도 없고... 참치캔 등 먹다 남긴 캔포장 식품은 전자렌지로 가열해서 보관해 보자. 오래 보존할 수 있다. 캔에 남아 있는 음식을 빈 그릇에 옮기고 랩으로 씌운 뒤 가열하기만 하면 된다. 랩이 증기로 희뿌옇게 변할 정도로 가열 한 뒤 바로 식혀 랩을 씌운 채로 냉장고에 보관하자. 랩을 벗겨내면 그만큼 살균효과가 줄기 때문에 주의 할 것.
구겨진 넥타이, 신문지 이용
남성 정장의 포인트는 넥타이. 그러나 아무리 멋진 넥타이도 구깃구깃하면 볼품이 없다. 넥타이는 아무래도 맬 때 주름이 생기게 되므로 가끔 씩 다림질을해 줄 필요가 있다. 넥타이를 다림질할 때, 위에서 누르듯이 다리면 주름이 펴지지만 납작하게 들러 붙어 모양이 나지 않는다. 그럴 때에는 먼저 신문지를 가늘게 2개 말아 넥타이 양쪽 모서리에 넣은 다음 가볍게 다림질한다. 이렇게 하면 주름도 깨끗이 퍼지면서 넥타이도 볼품이 살아나 모양새가 바로 잡힌다.
지퍼가 달린 옷 세탁법
지퍼가 달린 스커트나 양복 바지 등을 세탁기에 빨 때는 지퍼를 잠그고 빨아야 한다. 세탁기 안에서 옷이 돌아가면서 다른 옷들이 지퍼에 상하기 쉽다. 특히 플라스틱 지퍼는 변형이 잘되고, 금속 지퍼는 다른 옷들을 손상시킬 수 있다.
미숫가루 근사하게 타는 법...
미숫가루 어떻게 타드세요? 미숫가루 타는 게 만만치 않죠? 잘 개지지도 않고... 얼음 띄우면 내용물 하고 따로 놀고... 항상 바닥엔 덩어리와 찌끼들...미숫가루를 탈 때 믹서를 이용합니다. 우유나 끓여 식힌 물에 미숫가루와 적량의 설탕이나 꿀을 넣고 얼음을 한 주먹 정도 함께 넣고 곱게 갑니다. 완전히 덩어리 하나 없이 깔끔해 지지요. 거기에 또 얼음을 한 주먹 정도 넣고 이번엔 약간 거칠게 갑니다. 작은 얼음 알갱이가 입안에서 씹힐 정도로... 그리곤 컵에 따라 한 잔 씩 마시면 되죠. 입에 껄끄러운 덩어리 없이 부드러운 미숫가루에 잘게 씹히는 얼음 알갱이가 상큼함을 더해 줍니다. 훨씬 쉽고 시원합니다. 만족을 자신합니다... 손님 대접 때도 깔끔해 보이구요.
아기 설사엔 설탕 탄 막걸리
아기 설사엔 약도 없다고 하죠? 게다가 장염이라도 걸리면 속수무책! 먹일 수도 없고 굶길 수도 없고...그렇다면 설탕 탄 막걸리를 한 번 먹여 보세요! 막걸리를 1/2정도 냄비에 붓고 단맛이 날 정도로 설탕을 넣고 끓인 다음 식혀서 먹여 보세요. 아기에게 왠 막걸리?하는 분도 계시겠지만 아기는 물론이고 어른들 설사에도 정말 잘 들어요. 시어머니에게 배운 정말 신기한 민간요법이라구요
생활 속에서 건강 지키기
①머리를 자주 빗어 주면, 두피가 자극을 받아 머리가 맑아지고 머리카락도 잘 빠지지 않는다. ②귓볼을 자주 만지거나 귀를 때리면,신장,비뇨 생식기 계통이 좋아진다. ③얼굴을 자주 두드리고 만지면, 혈압이나 동맥 경화 치료에 도움이 된다. 허리 아픈 사람은 코 바로 밑의 인중을 두 번째 손가락으로 자주 문지른다. ④배를 자주 만지면, 소화가 잘 된다. 명치에서 치골까지 아래로 쭉쭉 문지르 거나 시계 방향으로 문지른다.
RFC란? ==>
Request for Comments documents ( RFCs )는 Internet research와 develop-ment community의 작업 note들이 다.
대부분의 RFCs는 종종, 그것들을 구현함에 있어 요구되는 상세한 절차와 Format들을 제공하는 네트 웍 프로토콜들이나 Service들의 서술이다.
필요하다면 E-mail을 통하여 원하는 RFC를 입수할 수 있으며, 직접 특정한Host에 접속하여 FTP로 RFC Document를 가져올 수 있다.
한 Document에 일단 RFC 번호가 부여되고 출판되면, 그 RFC는 영원히 수정되거나 같은 번호가 부여되 는 일은 없다.
RFC 1939 는 POP3 프로토콜에 관련된 기술문서 이다.
이전에 웹메일 시스템 관련해서 자료를 찾아보느라 구했던 자료인데..
아직 제대로 써먹어 본적은 없다. -_-;;;;;;;;;;;;;
영문이라 보기 껄끄럽기는 하겠지만..
이자료를 안보고 메일시스템을 구축한다든지의 말은 조금 어불성설이 아닐까 싶기도 하고..
하긴 요새는 상용컴포넌트들이 워낙 잘나와서리..
그래도 개발자라면 기본에 충실해야 하지 않을까 하는 생각이 든다.
Network Working Group J. Myers
Request for Comments: 1939 Carnegie Mellon
STD: 53 M. Rose
Obsoletes: 1725 Dover Beach Consulting, Inc.
Category: Standards Track May 1996
Post Office Protocol - Version 3
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Table of Contents
1. Introduction ................................................ 2
2. A Short Digression .......................................... 2
3. Basic Operation ............................................. 3
4. The AUTHORIZATION State ..................................... 4
QUIT Command ................................................ 5
5. The TRANSACTION State ....................................... 5
STAT Command ................................................ 6
LIST Command ................................................ 6
RETR Command ................................................ 8
DELE Command ................................................ 8
NOOP Command ................................................ 9
RSET Command ................................................ 9
6. The UPDATE State ............................................ 10
QUIT Command ................................................ 10
7. Optional POP3 Commands ...................................... 11
TOP Command ................................................. 11
UIDL Command ................................................ 12
USER Command ................................................ 13
PASS Command ................................................ 14
APOP Command ................................................ 15
8. Scaling and Operational Considerations ...................... 16
9. POP3 Command Summary ........................................ 18
10. Example POP3 Session ....................................... 19
11. Message Format ............................................. 19
12. References ................................................. 20
13. Security Considerations .................................... 20
14. Acknowledgements ........................................... 20
15. Authors' Addresses ......................................... 21
Appendix A. Differences from RFC 1725 .......................... 22
Appendix B. Command Index ...................................... 23
1. Introduction
On certain types of smaller nodes in the Internet it is often
impractical to maintain a message transport system (MTS). For
example, a workstation may not have sufficient resources (cycles,
disk space) in order to permit a SMTP server [RFC821] and associated
local mail delivery system to be kept resident and continuously
running. Similarly, it may be expensive (or impossible) to keep a
personal computer interconnected to an IP-style network for long
amounts of time (the node is lacking the resource known as
"connectivity").
Despite this, it is often very useful to be able to manage mail on
these smaller nodes, and they often support a user agent (UA) to aid
the tasks of mail handling. To solve this problem, a node which can
support an MTS entity offers a maildrop service to these less endowed
nodes. The Post Office Protocol - Version 3 (POP3) is intended to
permit a workstation to dynamically access a maildrop on a server
host in a useful fashion. Usually, this means that the POP3 protocol
is used to allow a workstation to retrieve mail that the server is
holding for it.
POP3 is not intended to provide extensive manipulation operations of
mail on the server; normally, mail is downloaded and then deleted. A
more advanced (and complex) protocol, IMAP4, is discussed in
[RFC1730].
For the remainder of this memo, the term "client host" refers to a
host making use of the POP3 service, while the term "server host"
refers to a host which offers the POP3 service.
2. A Short Digression
This memo does not specify how a client host enters mail into the
transport system, although a method consistent with the philosophy of
this memo is presented here:
When the user agent on a client host wishes to enter a message
into the transport system, it establishes an SMTP connection to
its relay host and sends all mail to it. This relay host could
be, but need not be, the POP3 server host for the client host. Of
course, the relay host must accept mail for delivery to arbitrary
recipient addresses, that functionality is not required of all
SMTP servers.
3. Basic Operation
Initially, the server host starts the POP3 service by listening on
TCP port 110. When a client host wishes to make use of the service,
it establishes a TCP connection with the server host. When the
connection is established, the POP3 server sends a greeting. The
client and POP3 server then exchange commands and responses
(respectively) until the connection is closed or aborted.
Commands in the POP3 consist of a case-insensitive keyword, possibly
followed by one or more arguments. All commands are terminated by a
CRLF pair. Keywords and arguments consist of printable ASCII
characters. Keywords and arguments are each separated by a single
SPACE character. Keywords are three or four characters long. Each
argument may be up to 40 characters long.
Responses in the POP3 consist of a status indicator and a keyword
possibly followed by additional information. All responses are
terminated by a CRLF pair. Responses may be up to 512 characters
long, including the terminating CRLF. There are currently two status
indicators: positive ("+OK") and negative ("-ERR"). Servers MUST
send the "+OK" and "-ERR" in upper case.
Responses to certain commands are multi-line. In these cases, which
are clearly indicated below, after sending the first line of the
response and a CRLF, any additional lines are sent, each terminated
by a CRLF pair. When all lines of the response have been sent, a
final line is sent, consisting of a termination octet (decimal code
046, ".") and a CRLF pair. If any line of the multi-line response
begins with the termination octet, the line is "byte-stuffed" by
pre-pending the termination octet to that line of the response.
Hence a multi-line response is terminated with the five octets
"CRLF.CRLF". When examining a multi-line response, the client checks
to see if the line begins with the termination octet. If so and if
octets other than CRLF follow, the first octet of the line (the
termination octet) is stripped away. If so and if CRLF immediately
follows the termination character, then the response from the POP
server is ended and the line containing ".CRLF" is not considered
part of the multi-line response.
A POP3 session progresses through a number of states during its
lifetime. Once the TCP connection has been opened and the POP3
server has sent the greeting, the session enters the AUTHORIZATION
state. In this state, the client must identify itself to the POP3
server. Once the client has successfully done this, the server
acquires resources associated with the client's maildrop, and the
session enters the TRANSACTION state. In this state, the client
requests actions on the part of the POP3 server. When the client has
issued the QUIT command, the session enters the UPDATE state. In
this state, the POP3 server releases any resources acquired during
the TRANSACTION state and says goodbye. The TCP connection is then
closed.
A server MUST respond to an unrecognized, unimplemented, or
syntactically invalid command by responding with a negative status
indicator. A server MUST respond to a command issued when the
session is in an incorrect state by responding with a negative status
indicator. There is no general method for a client to distinguish
between a server which does not implement an optional command and a
server which is unwilling or unable to process the command.
A POP3 server MAY have an inactivity autologout timer. Such a timer
MUST be of at least 10 minutes' duration. The receipt of any command
from the client during that interval should suffice to reset the
autologout timer. When the timer expires, the session does NOT enter
the UPDATE state--the server should close the TCP connection without
removing any messages or sending any response to the client.
4. The AUTHORIZATION State
Once the TCP connection has been opened by a POP3 client, the POP3
server issues a one line greeting. This can be any positive
response. An example might be:
S: +OK POP3 server ready
The POP3 session is now in the AUTHORIZATION state. The client must
now identify and authenticate itself to the POP3 server. Two
possible mechanisms for doing this are described in this document,
the USER and PASS command combination and the APOP command. Both
mechanisms are described later in this document. Additional
authentication mechanisms are described in [RFC1734]. While there is
no single authentication mechanism that is required of all POP3
servers, a POP3 server must of course support at least one
authentication mechanism.
Once the POP3 server has determined through the use of any
authentication command that the client should be given access to the
appropriate maildrop, the POP3 server then acquires an exclusive-
access lock on the maildrop, as necessary to prevent messages from
being modified or removed before the session enters the UPDATE state.
If the lock is successfully acquired, the POP3 server responds with a
positive status indicator. The POP3 session now enters the
TRANSACTION state, with no messages marked as deleted. If the
maildrop cannot be opened for some reason (for example, a lock can
not be acquired, the client is denied access to the appropriate
maildrop, or the maildrop cannot be parsed), the POP3 server responds
with a negative status indicator. (If a lock was acquired but the
POP3 server intends to respond with a negative status indicator, the
POP3 server must release the lock prior to rejecting the command.)
After returning a negative status indicator, the server may close the
connection. If the server does not close the connection, the client
may either issue a new authentication command and start again, or the
client may issue the QUIT command.
After the POP3 server has opened the maildrop, it assigns a message-
number to each message, and notes the size of each message in octets.
The first message in the maildrop is assigned a message-number of
"1", the second is assigned "2", and so on, so that the nth message
in a maildrop is assigned a message-number of "n". In POP3 commands
and responses, all message-numbers and message sizes are expressed in
base-10 (i.e., decimal).
Here is the summary for the QUIT command when used in the
AUTHORIZATION state:
QUIT
Arguments: none
Restrictions: none
Possible Responses:
+OK
Examples:
C: QUIT
S: +OK dewey POP3 server signing off
5. The TRANSACTION State
Once the client has successfully identified itself to the POP3 server
and the POP3 server has locked and opened the appropriate maildrop,
the POP3 session is now in the TRANSACTION state. The client may now
issue any of the following POP3 commands repeatedly. After each
command, the POP3 server issues a response. Eventually, the client
issues the QUIT command and the POP3 session enters the UPDATE state.
Here are the POP3 commands valid in the TRANSACTION state:
STAT
Arguments: none
Restrictions:
may only be given in the TRANSACTION state
Discussion:
The POP3 server issues a positive response with a line
containing information for the maildrop. This line is
called a "drop listing" for that maildrop.
In order to simplify parsing, all POP3 servers are
required to use a certain format for drop listings. The
positive response consists of "+OK" followed by a single
space, the number of messages in the maildrop, a single
space, and the size of the maildrop in octets. This memo
makes no requirement on what follows the maildrop size.
Minimal implementations should just end that line of the
response with a CRLF pair. More advanced implementations
may include other information.
NOTE: This memo STRONGLY discourages implementations
from supplying additional information in the drop
listing. Other, optional, facilities are discussed
later on which permit the client to parse the messages
in the maildrop.
Note that messages marked as deleted are not counted in
either total.
Possible Responses:
+OK nn mm
Examples:
C: STAT
S: +OK 2 320
LIST [msg]
Arguments:
a message-number (optional), which, if present, may NOT
refer to a message marked as deleted
Restrictions:
may only be given in the TRANSACTION state
Discussion:
If an argument was given and the POP3 server issues a
positive response with a line containing information for
that message. This line is called a "scan listing" for
that message.
If no argument was given and the POP3 server issues a
positive response, then the response given is multi-line.
After the initial +OK, for each message in the maildrop,
the POP3 server responds with a line containing
information for that message. This line is also called a
"scan listing" for that message. If there are no
messages in the maildrop, then the POP3 server responds
with no scan listings--it issues a positive response
followed by a line containing a termination octet and a
CRLF pair.
In order to simplify parsing, all POP3 servers are
required to use a certain format for scan listings. A
scan listing consists of the message-number of the
message, followed by a single space and the exact size of
the message in octets. Methods for calculating the exact
size of the message are described in the "Message Format"
section below. This memo makes no requirement on what
follows the message size in the scan listing. Minimal
implementations should just end that line of the response
with a CRLF pair. More advanced implementations may
include other information, as parsed from the message.
NOTE: This memo STRONGLY discourages implementations
from supplying additional information in the scan
listing. Other, optional, facilities are discussed
later on which permit the client to parse the messages
in the maildrop.
Note that messages marked as deleted are not listed.
Possible Responses:
+OK scan listing follows
-ERR no such message
S: 2 200
S: .
...
C: LIST 2
S: +OK 2 200
...
C: LIST 3
S: -ERR no such message, only 2 messages in maildrop
RETR msg
Arguments:
a message-number (required) which may NOT refer to a
message marked as deleted
Restrictions:
may only be given in the TRANSACTION state
Discussion:
If the POP3 server issues a positive response, then the
response given is multi-line. After the initial +OK, the
POP3 server sends the message corresponding to the given
message-number, being careful to byte-stuff the termination
character (as with all multi-line responses).
Possible Responses:
+OK message follows
-ERR no such message
Examples:
C: RETR 1
S: +OK 120 octets
S:
S: .
DELE msg
Arguments:
a message-number (required) which may NOT refer to a
message marked as deleted
Restrictions:
may only be given in the TRANSACTION state
Discussion:
The POP3 server marks the message as deleted. Any future
reference to the message-number associated with the message
in a POP3 command generates an error. The POP3 server does
not actually delete the message until the POP3 session
enters the UPDATE state.
Possible Responses:
+OK message deleted
-ERR no such message
Examples:
C: DELE 1
S: +OK message 1 deleted
...
C: DELE 2
S: -ERR message 2 already deleted
NOOP
Arguments: none
Restrictions:
may only be given in the TRANSACTION state
Discussion:
The POP3 server does nothing, it merely replies with a
positive response.
Possible Responses:
+OK
Examples:
C: NOOP
S: +OK
RSET
Arguments: none
Restrictions:
may only be given in the TRANSACTION state
Discussion:
If any messages have been marked as deleted by the POP3
server, they are unmarked. The POP3 server then replies
When the client issues the QUIT command from the TRANSACTION state,
the POP3 session enters the UPDATE state. (Note that if the client
issues the QUIT command from the AUTHORIZATION state, the POP3
session terminates but does NOT enter the UPDATE state.)
If a session terminates for some reason other than a client-issued
QUIT command, the POP3 session does NOT enter the UPDATE state and
MUST not remove any messages from the maildrop.
QUIT
Arguments: none
Restrictions: none
Discussion:
The POP3 server removes all messages marked as deleted
from the maildrop and replies as to the status of this
operation. If there is an error, such as a resource
shortage, encountered while removing messages, the
maildrop may result in having some or none of the messages
marked as deleted be removed. In no case may the server
remove any messages not marked as deleted.
Whether the removal was successful or not, the server
then releases any exclusive-access lock on the maildrop
and closes the TCP connection.
Possible Responses:
+OK
-ERR some deleted messages not removed
Examples:
C: QUIT
S: +OK dewey POP3 server signing off (maildrop empty)
...
C: QUIT
S: +OK dewey POP3 server signing off (2 messages left)
...
7. Optional POP3 Commands
The POP3 commands discussed above must be supported by all minimal
implementations of POP3 servers.
The optional POP3 commands described below permit a POP3 client
greater freedom in message handling, while preserving a simple POP3
server implementation.
NOTE: This memo STRONGLY encourages implementations to support
these commands in lieu of developing augmented drop and scan
listings. In short, the philosophy of this memo is to put
intelligence in the part of the POP3 client and not the POP3
server.
TOP msg n
Arguments:
a message-number (required) which may NOT refer to to a
message marked as deleted, and a non-negative number
of lines (required)
Restrictions:
may only be given in the TRANSACTION state
Discussion:
If the POP3 server issues a positive response, then the
response given is multi-line. After the initial +OK, the
POP3 server sends the headers of the message, the blank
line separating the headers from the body, and then the
number of lines of the indicated message's body, being
careful to byte-stuff the termination character (as with
all multi-line responses).
Note that if the number of lines requested by the POP3
client is greater than than the number of lines in the
body, then the POP3 server sends the entire message.
Possible Responses:
+OK top of message follows
-ERR no such message
Examples:
C: TOP 1 10
S: +OK
S:
message, a blank line, and the first 10 lines
of the body of the message>
S: .
...
C: TOP 100 3
S: -ERR no such message
UIDL [msg]
Arguments:
a message-number (optional), which, if present, may NOT
refer to a message marked as deleted
Restrictions:
may only be given in the TRANSACTION state.
Discussion:
If an argument was given and the POP3 server issues a positive
response with a line containing information for that message.
This line is called a "unique-id listing" for that message.
If no argument was given and the POP3 server issues a positive
response, then the response given is multi-line. After the
initial +OK, for each message in the maildrop, the POP3 server
responds with a line containing information for that message.
This line is called a "unique-id listing" for that message.
In order to simplify parsing, all POP3 servers are required to
use a certain format for unique-id listings. A unique-id
listing consists of the message-number of the message,
followed by a single space and the unique-id of the message.
No information follows the unique-id in the unique-id listing.
The unique-id of a message is an arbitrary server-determined
string, consisting of one to 70 characters in the range 0x21
to 0x7E, which uniquely identifies a message within a
maildrop and which persists across sessions. This
persistence is required even if a session ends without
entering the UPDATE state. The server should never reuse an
unique-id in a given maildrop, for as long as the entity
using the unique-id exists.
Note that messages marked as deleted are not listed.
While it is generally preferable for server implementations
to store arbitrarily assigned unique-ids in the maildrop,
this specification is intended to permit unique-ids to be
calculated as a hash of the message. Clients should be able
to handle a situation where two identical copies of a
message in a maildrop have the same unique-id.
Possible Responses:
+OK unique-id listing follows
-ERR no such message
Examples:
C: UIDL
S: +OK
S: 1 whqtswO00WBw418f9t5JxYwZ
S: 2 QhdPYR:00WBw1Ph7x7
S: .
...
C: UIDL 2
S: +OK 2 QhdPYR:00WBw1Ph7x7
...
C: UIDL 3
S: -ERR no such message, only 2 messages in maildrop
USER name
Arguments:
a string identifying a mailbox (required), which is of
significance ONLY to the server
Restrictions:
may only be given in the AUTHORIZATION state after the POP3
greeting or after an unsuccessful USER or PASS command
Discussion:
To authenticate using the USER and PASS command
combination, the client must first issue the USER
command. If the POP3 server responds with a positive
status indicator ("+OK"), then the client may issue
either the PASS command to complete the authentication,
or the QUIT command to terminate the POP3 session. If
the POP3 server responds with a negative status indicator
("-ERR") to the USER command, then the client may either
issue a new authentication command or may issue the QUIT
command.
The server may return a positive response even though no
such mailbox exists. The server may return a negative
response if mailbox exists, but does not permit plaintext
password authentication.
Possible Responses:
+OK name is a valid mailbox
-ERR never heard of mailbox name
Examples:
C: USER frated
S: -ERR sorry, no mailbox for frated here
...
C: USER mrose
S: +OK mrose is a real hoopy frood
PASS string
Arguments:
a server/mailbox-specific password (required)
Restrictions:
may only be given in the AUTHORIZATION state immediately
after a successful USER command
Discussion:
When the client issues the PASS command, the POP3 server
uses the argument pair from the USER and PASS commands to
determine if the client should be given access to the
appropriate maildrop.
Since the PASS command has exactly one argument, a POP3
server may treat spaces in the argument as part of the
password, instead of as argument separators.
Possible Responses:
+OK maildrop locked and ready
-ERR invalid password
-ERR unable to lock maildrop
Examples:
C: USER mrose
S: +OK mrose is a real hoopy frood
C: PASS secret
S: -ERR maildrop already locked
...
C: USER mrose
S: +OK mrose is a real hoopy frood
C: PASS secret
S: +OK mrose's maildrop has 2 messages (320 octets)
APOP name digest
Arguments:
a string identifying a mailbox and a MD5 digest string
(both required)
Restrictions:
may only be given in the AUTHORIZATION state after the POP3
greeting or after an unsuccessful USER or PASS command
Discussion:
Normally, each POP3 session starts with a USER/PASS
exchange. This results in a server/user-id specific
password being sent in the clear on the network. For
intermittent use of POP3, this may not introduce a sizable
risk. However, many POP3 client implementations connect to
the POP3 server on a regular basis -- to check for new
mail. Further the interval of session initiation may be on
the order of five minutes. Hence, the risk of password
capture is greatly enhanced.
An alternate method of authentication is required which
provides for both origin authentication and replay
protection, but which does not involve sending a password
in the clear over the network. The APOP command provides
this functionality.
A POP3 server which implements the APOP command will
include a timestamp in its banner greeting. The syntax of
the timestamp corresponds to the `msg-id' in [RFC822], and
MUST be different each time the POP3 server issues a banner
greeting. For example, on a UNIX implementation in which a
separate UNIX process is used for each instance of a POP3
server, the syntax of the timestamp might be:
where `process-ID' is the decimal value of the process's
PID, clock is the decimal value of the system clock, and
hostname is the fully-qualified domain-name corresponding
to the host where the POP3 server is running.
The POP3 client makes note of this timestamp, and then
issues the APOP command. The `name' parameter has
identical semantics to the `name' parameter of the USER
command. The `digest' parameter is calculated by applying
the MD5 algorithm [RFC1321] to a string consisting of the
timestamp (including angle-brackets) followed by a shared
secret. This shared secret is a string known only to the
POP3 client and server. Great care should be taken to
prevent unauthorized disclosure of the secret, as knowledge
of the secret will allow any entity to successfully
masquerade as the named user. The `digest' parameter
itself is a 16-octet value which is sent in hexadecimal
format, using lower-case ASCII characters.
When the POP3 server receives the APOP command, it verifies
the digest provided. If the digest is correct, the POP3
server issues a positive response, and the POP3 session
enters the TRANSACTION state. Otherwise, a negative
response is issued and the POP3 session remains in the
AUTHORIZATION state.
Note that as the length of the shared secret increases, so
does the difficulty of deriving it. As such, shared
secrets should be long strings (considerably longer than
the 8-character example shown below).
Possible Responses:
+OK maildrop locked and ready
-ERR permission denied
Examples:
S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
S: +OK maildrop has 1 message (369 octets)
In this example, the shared secret is the string `tan-
staaf'. Hence, the MD5 algorithm is applied to the string
<1896.697170952@dbc.mtview.ca.us>tanstaaf
which produces a digest value of
c4c9334bac560ecc979e58001b3e22fb
8. Scaling and Operational Considerations
Since some of the optional features described above were added to the
POP3 protocol, experience has accumulated in using them in large-
scale commercial post office operations where most of the users are
unrelated to each other. In these situations and others, users and
vendors of POP3 clients have discovered that the combination of using
the UIDL command and not issuing the DELE command can provide a weak
version of the "maildrop as semi-permanent repository" functionality
normally associated with IMAP. Of course the other capabilities of
IMAP, such as polling an existing connection for newly arrived
messages and supporting multiple folders on the server, are not
present in POP3.
When these facilities are used in this way by casual users, there has
been a tendency for already-read messages to accumulate on the server
without bound. This is clearly an undesirable behavior pattern from
the standpoint of the server operator. This situation is aggravated
by the fact that the limited capabilities of the POP3 do not permit
efficient handling of maildrops which have hundreds or thousands of
messages.
Consequently, it is recommended that operators of large-scale multi-
user servers, especially ones in which the user's only access to the
maildrop is via POP3, consider such options as:
* Imposing a per-user maildrop storage quota or the like.
A disadvantage to this option is that accumulation of messages may
result in the user's inability to receive new ones into the
maildrop. Sites which choose this option should be sure to inform
users of impending or current exhaustion of quota, perhaps by
inserting an appropriate message into the user's maildrop.
* Enforce a site policy regarding mail retention on the server.
Sites are free to establish local policy regarding the storage and
retention of messages on the server, both read and unread. For
example, a site might delete unread messages from the server after
60 days and delete read messages after 7 days. Such message
deletions are outside the scope of the POP3 protocol and are not
considered a protocol violation.
Server operators enforcing message deletion policies should take
care to make all users aware of the policies in force.
Clients must not assume that a site policy will automate message
deletions, and should continue to explicitly delete messages using
the DELE command when appropriate.
It should be noted that enforcing site message deletion policies
may be confusing to the user community, since their POP3 client
may contain configuration options to leave mail on the server
which will not in fact be supported by the server.
One special case of a site policy is that messages may only be
downloaded once from the server, and are deleted after this has
been accomplished. This could be implemented in POP3 server
software by the following mechanism: "following a POP3 login by a
client which was ended by a QUIT, delete all messages downloaded
during the session with the RETR command". It is important not to
delete messages in the event of abnormal connection termination
(ie, if no QUIT was received from the client) because the client
may not have successfully received or stored the messages.
Servers implementing a download-and-delete policy may also wish to
disable or limit the optional TOP command, since it could be used
as an alternate mechanism to download entire messages.
9. POP3 Command Summary
Minimal POP3 Commands:
USER name valid in the AUTHORIZATION state
PASS string
QUIT
STAT valid in the TRANSACTION state
LIST [msg]
RETR msg
DELE msg
NOOP
RSET
QUIT
Optional POP3 Commands:
APOP name digest valid in the AUTHORIZATION state
TOP msg n valid in the TRANSACTION state
UIDL [msg]
POP3 Replies:
+OK
-ERR
Note that with the exception of the STAT, LIST, and UIDL commands,
the reply given by the POP3 server to any command is significant
only to "+OK" and "-ERR". Any text occurring after this reply
may be ignored by the client.
All messages transmitted during a POP3 session are assumed to conform
to the standard for the format of Internet text messages [RFC822].
It is important to note that the octet count for a message on the
server host may differ from the octet count assigned to that message
due to local conventions for designating end-of-line. Usually,
during the AUTHORIZATION state of the POP3 session, the POP3 server
can calculate the size of each message in octets when it opens the
maildrop. For example, if the POP3 server host internally represents
end-of-line as a single character, then the POP3 server simply counts
each occurrence of this character in a message as two octets. Note
that lines in the message which start with the termination octet need
not (and must not) be counted twice, since the POP3 client will
remove all byte-stuffed termination characters when it receives a
multi-line response.
12. References
[RFC821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC
821, USC/Information Sciences Institute, August 1982.
[RFC822] Crocker, D., "Standard for the Format of ARPA-Internet Text
Messages", STD 11, RFC 822, University of Delaware, August 1982.
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
MIT Laboratory for Computer Science, April 1992.
[RFC1730] Crispin, M., "Internet Message Access Protocol - Version
4", RFC 1730, University of Washington, December 1994.
It is conjectured that use of the APOP command provides origin
identification and replay protection for a POP3 session.
Accordingly, a POP3 server which implements both the PASS and APOP
commands should not allow both methods of access for a given user;
that is, for a given mailbox name, either the USER/PASS command
sequence or the APOP command is allowed, but not both.
Further, note that as the length of the shared secret increases, so
does the difficulty of deriving it.
Servers that answer -ERR to the USER command are giving potential
attackers clues about which names are valid.
Use of the PASS command sends passwords in the clear over the
network.
Use of the RETR and TOP commands sends mail in the clear over the
network.
Otherwise, security issues are not discussed in this memo.
14. Acknowledgements
The POP family has a long and checkered history. Although primarily
a minor revision to RFC 1460, POP3 is based on the ideas presented in
RFCs 918, 937, and 1081.
In addition, Alfred Grimstad, Keith McCloghrie, and Neil Ostroff
provided significant comments on the APOP command.
15. Authors' Addresses
John G. Myers
Carnegie-Mellon University
5000 Forbes Ave
Pittsburgh, PA 15213
EMail: jgm+@cmu.edu
Marshall T. Rose
Dover Beach Consulting, Inc.
420 Whisman Court
Mountain View, CA 94043-2186
EMail: mrose@dbc.mtview.ca.us
Appendix A. Differences from RFC 1725
This memo is a revision to RFC 1725, a Draft Standard. It makes the
following changes from that document:
- clarifies that command keywords are case insensitive.
- specifies that servers must send "+OK" and "-ERR" in
upper case.
- specifies that the initial greeting is a positive response,
instead of any string which should be a positive response.
- clarifies behavior for unimplemented commands.
- makes the USER and PASS commands optional.
- clarified the set of possible responses to the USER command.
- reverses the order of the examples in the USER and PASS
commands, to reduce confusion.
- clarifies that the PASS command may only be given immediately
after a successful USER command.
- clarified the persistence requirements of UIDs and added some
implementation notes.
- specifies a UID length limitation of one to 70 octets.
- specifies a status indicator length limitation
of 512 octets, including the CRLF.
- clarifies that LIST with no arguments on an empty mailbox
returns success.
- adds a reference from the LIST command to the Message Format
section
- clarifies the behavior of QUIT upon failure
- clarifies the security section to not imply the use of the
USER command with the APOP command.
- adds references to RFCs 1730 and 1734
- clarifies the method by which a UA may enter mail into the
transport system.
- clarifies that the second argument to the TOP command is a
number of lines.
- changes the suggestion in the Security Considerations section
for a server to not accept both PASS and APOP for a given user
from a "must" to a "should".
- adds a section on scaling and operational considerations
Appendix B. Command Index
APOP ....................................................... 15
DELE ....................................................... 8
LIST ....................................................... 6
NOOP ....................................................... 9
PASS ....................................................... 14
QUIT ....................................................... 5
QUIT ....................................................... 10
RETR ....................................................... 8
RSET ....................................................... 9
STAT ....................................................... 6
TOP ........................................................ 11
UIDL ....................................................... 12
USER ....................................................... 13
대부분의 사람들은 인터넷을 이용할 때 마우스를 사용한다. 마우스를 사용하면 편리하지만 보다 빠른 작업을 위해서는 단축키를 사용하는 것이 좋다. 인터넷을 사용할 때 단축키를 사용하면 한결 빠르고 편리하게 웹 서핑을 즐길 수 있다. 단축키란 여러 각 키의 조합으로 구성돼 있다. 단축키는 익숙해지면 마우스 보다 훨씬 빠르고 편리하다. 대부분의 단축키는 Alt 키와 Ctrl키를 사용하는 것이 많다. 각각의 기능키 별로 단축키를 살펴보자. 기사에 소개된 기능키는 Window 2000을 중심으로 설명됐고 운영체제에 따라 조금씩 다를 수 있다.
Ctrl키 사용
워드나 인터넷의 정보를 복사하고 싶을 때는 해당 부분을 마우스로 드래그(Drag) 하고 Ctrl 키 버튼을 누르고 알파벳 C를 누르면 ‘복사’가 되고 복사한 내용을 다른 곳에 붙이려면 역시 Ctrl 키 버튼을 누르고 V버튼을 누르면 된다. 선택한 내용을 잘라내고 싶은 때는 Ctrl 키를 누르고 X를 누른다. 실수로 잘못 잘라냈다면 ‘Ctrl + Z’를 사용하면 실행취소 기능이 수행된다. 드래그를 해서 일부를 선택하는 것이 아니라 전체를 선택할 때는 ‘Ctrl + A’를 사용하면 된다.
인터넷을 사용하다가 즐겨찾기 창을 열고 싶으면 'Ctrl + I' 또는 'Ctrl + B'를 누르면 된다. 현재의 창을 그대로 두고 같은 주소의 새로운 창을 열고 싶을 때는 'Ctrl + N'을 사용한다. 'Ctrl + O' 또는 'Ctrl + L'을 사용하면 인터넷 주소 창만 따로 뜨는데 그 창에 주소를 넣으면 가고자 하는 인터넷 홈페이지로 바로 갈 수 있다. 검색을 하고 싶다면 'Ctrl + E’를 누르면 검색 창이 떠 쉽게 검색을 할 수 있다. 현재 화면을 인쇄하고 싶다면 ‘Ctrl + P'를 사용한다. 'Ctrl + W'를 누르면 현재 사용하고 있는 창이 닫히고 윈도우의 시작메뉴를 열고 싶으면 'Ctrl + Esc'를 누르면 된다.
Ctrl키 사용 단축키 정리
Ctrl+C (복사) Ctrl+V (붙여넣기) Ctrl+X (잘라내기) Ctrl+Z (실행 취소) Ctrl+A (모두 선택) Ctrl+I 또는 Ctrl+B (즐겨찾기) Ctrl+N (현재 열려 있는 창과 같은 주소의 새 창 띄우기) Ctrl+L 또는 Ctrl+O (주소창 만 따로 다른 띄우기) Ctrl+E (검색 창 열기) Ctrl+P (인쇄 대화 상자 열기) Ctrl+W (현재 창 닫기) Ctrl+Esc (시작 메뉴 표시)
Alt 키 사용
인터넷을 하다가 Alt 키를 누르고 왼쪽 화살표 버튼(<-)을 함께 누르면 이전 페이지로 이동하고 반대로 오른쪽 화살표 버튼(->)을 앞 페이지로 이동한다. ‘Alt + F’ 를 누르면 화면 상단의 메뉴 중 ‘파일’을 실행할 수 있다. ‘Alt + V’는 상단 메뉴 중 ‘보기’를 실행하고 싶을 때 누르면 된다. ‘Alt + F4’ 는 활성화 되어 있는 창을 닫는 기능으로 ‘Ctrl+W’ 기능과 같다. 또한 ‘Alt + Ese’ 를 누르면 컴퓨터 안에서 실행했던 화면이 순서대로 뜬다.
Alt 키 사용 정리
Alt + <- (이전 페이지로) Alt + -> (다음 페이지로) Alt+F (파일 메뉴 표시) Alt+V (보기 메뉴 표시) Alt+F4 (활성화 된 창 닫기) Alt+Esc (창을 연 순서화면을 순서대로 띄우기)
Window 키 사용
키보드에 있는 Window 모양의 로고가 있는 버튼을 이용하면 역시 다양한 기능을 마우스 없이 빠르게 실행시킬 수 있다. 일단 Window 버튼을 그냥 누르면 시작메뉴를 바로 실행할 수 있다. ‘Windows+D’ 를 누르면 바탕화면으로 바로 갈 수 있고 ‘Windows+E’를 누르면 ‘내 컴퓨터’ 가 실행된다. 파일이나 폴더 검색을 손쉽게 하려면 ‘Windows+F’ 를 누르면 누르고 ‘Windows+R’ 을 누르면 실행 대화상자가 뜬다.
Window 키 사용 정리
Windows 버튼 (시작 메뉴를 표시하거나 숨김) Windows 버튼+D (바탕 화면 표시) Windows 버튼+E (내 컴퓨터 열기) Windows 버튼+F (파일이나 폴더 검색) Windows 버튼+R (실행 대화 상자)
[예문1] What nerve! A: Who took my chocolate bar? B: Me, I'll buy you another one, okay? A: What nerve! It was from my boy friend.
감히 그럴 수가. A : 누가 내 초콜렛 가져갔어? B : 내가, 다른 거 하나 사줄게. A : 감히 그럴 수 있어? 내 애인이 준거란 말야.
[문장1] Do you have plans after work? - 퇴근후에 무슨 계획있어요?
[예문2]
A: Do you have plans after work? B: Just a date with my DVD player. A: How about I buy you a cup of coffee in exchange for some good advice? B: Of course, a friend in need is a friend indeed.
퇴근 후에 무슨 계획이라도 있어요? A: 퇴근 후에 무슨 계획이라도 있니? B: DVD 플레이어나 보려고 해. A: 내가 커피 한 잔 살 테니 나한테 조언 좀 해주지 않을래? B: 물론이지, 필요할 때의 친구가 진정한 친구잖아.