LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   telnet to localhost 25 not working in heredoc (https://www.linuxquestions.org/questions/linux-software-2/telnet-to-localhost-25-not-working-in-heredoc-932031/)

garagonp 02-29-2012 07:06 PM

telnet to localhost 25 not working in heredoc
 
Hi,

I'm running a telnet to localhost using a heredoc in solaris:

(SunOS 5.10 Generic_142900-05 sun4u sparc SUNW,SPARC-Enterprise)

telnet localhost 25 <<XXX
MAIL FROM: one@mymail.com
RCPT TO: two@mymail.com
DATA
SUBJECT: mysubject

solaris

Regards
.
QUIT
XXX

It works fine, but doing same in Linux is not working, but not returning error, however if I do it line by line it works on linux, but when using heredoc it does not work, I have another commands using heredocs and have no issues, so issue is telnet + heredoc. Is there anything I'm doing wrong? I'm not a linux expert so any help would be appreciated.

(Linux 2.6.18-164.el5 #1 SMP Thu Sep 3 04:15:13 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux)

TIA
Gabriel

jefro 03-01-2012 03:06 PM

http://kb.siteground.com/article/How...s_blocked.html

garagonp 03-01-2012 04:49 PM

Hi, tks for your post, but I don't think that is current issue, since I'm able to send email through port 25 when entering above line by line, issue here is when trying to enter it using heredoc, what makes me think about sintaxis but is weird I'm not getting any error at all.

jefro 03-01-2012 09:52 PM

Darn, sorry I didn't read your post well enough.

Line by line works so maybe an issue with line feed carriage return issue? Some telnet servers can clients may have issues with timings. May work with expect command?


All times are GMT -5. The time now is 06:15 AM.