cURL / Mailing Lists / curl-library / Single Mail


Re[2]: Working with curl connections as with sockets.

From: Tetetest <>
Date: Fri, 25 Apr 2008 23:48:32 +0400

Hello Dan,

Friday, April 25, 2008, 7:14:18 PM, you wrote:

DF> You can't use telnet to talk to a POP3 or IMAP server--you have to use
DF> POP3 or IMAP. It just happens that when you use popular UNIX
DF> command-line telnet clients, they switch to essentially a raw socket mode
DF> when connecting to non-telnet ports, which lets you type in protocol data
DF> manually. I don't think curl does this raw mode in its telnet client.

Dan, what do you mean by "raw socket mode"? Raw sockets could be used
for manually constructing data packets of weird protocols like IGMP
and the like, and eventually for nuke attacks on poor win98 machines.

Besides, creating a raw socket in Linux requires root privileges; you
can check a nearby Linux distribution to see that telnet client
program has no SUID bit on it.

Telnet uses TCP/IP without any special modifications (except one:
Nagle's packet assembly algorithm is disabled to get better response
time). This change is not visible to applications; there is nothing
special about it.

POP3 and IMAP use telnet-style strings, and you can connect to
mailserver with any telnet client. I tried Linux, Windows (several
different pieces of telnet software), and Solaris - everything works
just fine.
Received on 2008-04-25