Telnet and carriage return.

Arnaud Rébillout rebillout at syscom.ch
Wed Sep 12 11:50:38 UTC 2012


Hello,

I'm wondering if there is a way to issue a carriage return with telnet.

Here is the story:
This morning I used telnet to send a mail. It's quite easy to do that, 
just telnet to the right SMTP server, the procedure is quite 
straight-forward.

The problem is that the SMTP protocol expects each line to be terminated 
by a carriage return (CR, \r in C) followed with a line feed (LF, \n in 
C). And obviously, when I hit enter in Telnet, the line issued to the 
server is terminated by a simple \n.

To fix that, I simply patched telnet, and replace each \n by \r\n. It 
works, but it's an ugly solution.

That's why I'm wondering for a better solution to do that. Simply, isn't 
there a way to issue a carriage return character ?

Thanks



More information about the busybox mailing list