Protocolos a manopla

De gacq wiki
Revisión del 17:20 27 jul 2006 de 192.168.0.105 (discusión)
(dif) ← Revisión anterior | Revisión actual (dif) | Revisión siguiente → (dif)
Saltar a: navegación, buscar

POP3

Un ejemplo

gacq@intranet:~$ telnet gacq.com 110
Trying 200.114.249.74...
Connected to gacq.com.
Escape character is '^]'.
+OK geacequ Cyrus POP3 v2.1.18-IPv6-Debian-2.1.18-1 server ready <3539209771.1131918003@geacequ>
user gabriel
+OK Name is a valid mailbox
pass MiPasswordNoEsEste
+OK Maildrop locked and ready
quit
+OK
Connection closed by foreign host.

Comandos

  • USER userid
  • PASS password
  • STAT

The response to this is: +OK #msgs #bytes Where #msgs is the number of messages in the mail box and #bytes is the total bytes used by all messages. Sample response: +OK 3 345910

  • LIST

The response to this lists a line for each message with its number and size in bytes, ending with a period on a line by itself. Sample response: +OK 3 messages 1 1205 2 305 3 344400

  .
  • RETR msg#

This sends message number msg# to you (displays on the Telnet screen). You probably don't want to do this in Telnet (unless you have turned on Telnet logging). Example: RETR 2

  • TOP msg# #lines

This is an optional POP3 command. Not all POP3 servers support it. It lists the header for msg# and the first #lines of the message text. For example, TOP 1 0 would list just the headers for message 1, where as TOP 1 5 would list the headers and first 5 lines of the message text.

  • DELE msg#

This marks message number msg# for deletion from the server. This is the way to get rid a problem causing message. It is not actually deleted until the QUIT command is issued. If you lose the connection to the mail server before issuing the QUIT command, the server should not delete any messages. Example: DELE 3

  • RSET

This resets (unmarks) any messages previously marked for deletion in this session so that the QUIT command will not delete them.

  • QUIT

This deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use. This does not disconnect you from the ISP, just the mailbox.


SMTP

  • HELO: identifies client
  • MAIL: identifies the sender of the message.
  • RCPT: identifies the recipient. More than one RCPT command can be issued if there are multiple recipients.
  • DATA: To type in the message
  • QUIT: terminates conversation and closes connection

Ejemplo

geacequ:/# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 gacq.com ESMTP Postfix (Debian/GNU)
HELO mipc.gacq.com
250 gacq.com
MAIL FROM: pirulin@gmail.com
250 Ok
RCPT TO: nadie@gacq.com
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: probando
Esta es una prueba
.
250 Ok: queued as B138771D34
quit
221 Bye
Connection closed by foreign host.

<CR><LF>.<CR><LF> = ENTER + "." + ENTER

HTTP

GET

# telnet gacq.com 80
GET / HTTP/1.0
<enter>
<enter>
GET /index.php/Main_Page HTTP/1.0

POST

% telnet gacq.com 80
Escape character is '^]'.
POST /cgi-bin/form.pl HTTP/1.0
Content-type: application/x-www-form-urlencoded
Content-length: 35

email=YOUR_EMAIL&query=1crn