telnet shell script on red hat 9 cmd line only


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting telnet shell script on red hat 9 cmd line only
# 1  
Old 10-12-2007
Question telnet shell script on red hat 9 cmd line only

i would like to make a shell script (red hat 9 cmd line only)
to telnet to my local isp's webmail server on port 25 and send it commands
such as helo Smilie help would be much appreciated, and i found no posts similar that answered my question... the closest i've gotten to an answer from about 8 google searches is :
CODE:
#/usr/bash
( echo "helo" ) | telnet /*webserver*/ /*port*/ ;
CODE:
this code did not seem to do the job Smilie sadly...

i could manage in c++ possibly.. with some guidance but i'm trying to learn some shell programming, i've also given up on trying to do this with a doskey macro or a batch file on windows..
would someone please help me?
i'm using red hat 9 cmd line only (no gui package installed)

BTW: batch file code to do this would be awesome
# 2  
Old 10-13-2007
The reason why you can't find many posts on this is probably because it's a common tactic that spammers use, and the fact you mention that "batch file code would be awesome" suggests your intentions is to use your ISP mail server as a spam relay or to spoof e-mails.

Sadly you won't get any help here!
# 3  
Old 10-14-2007
dang,

i should have lied about my intentions like the other posts i saw on the internet....
# 4  
Old 10-14-2007
Quote:
Originally Posted by kypeswith
i could manage in c++ possibly.. with some guidance but i'm trying to learn some shell programming
Remember "horses for courses", the SMTP protocol used between servers on port 25 is a protocol that requires responses based on logic and state. Shell script is not the language for trying to do this in this situation. You would have better success with C, C++, Java, Perl or Python.

SMTP is an open protocol and you are welcome to use it, as all mail-transfer-agents do.

Also, consider why are you trying to re-invent the wheel, projects such as postfix do an excellent job of managing SMTP both outgoing and incoming in a very flexible manner, allowing you to concentrate on what you are trying to do rather than the nitty-gritties of the SMTP protocol.

Last edited by porter; 10-14-2007 at 06:26 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies

2. UNIX for Beginners Questions & Answers

Red Hat: Error connecting using secure shell

Hi All, I am getting below error when I try to connect with ssh. Not sure why the error is on.I am able to connect from a different login from the same server (local: rhe/home/s3>) ssh acces1@91.1.12.102 Connection closed by 91.1.12.102 (local: rhe/home/s3>) ssh redhlinx102 Connection... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

3. Shell Programming and Scripting

Red Hat and Ubuntu shell scripting

Are basic scripts in awk or bash or perl or other shell scripting languages the same in RHEL red hat as ubuntu? (1 Reply)
Discussion started by: cmccabe
1 Replies

4. Shell Programming and Scripting

Shell scripts migration from HP-Unix 11 to Red Hat Linux

We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
Discussion started by: Phoenix2
2 Replies

5. Red Hat

Red Hat or CentOS CMD

Hello, I'm a Solaris Admin by trade and we are getting more Linux server in. I was wondering what command Red Hat uses for hardware faults? lets say you see the fault light on the server what command do you use to see what the fault is? for example the Solaris command is fmadm faulty. this... (11 Replies)
Discussion started by: bitlord
11 Replies

6. Red Hat

HELP - Resource/Performance Monitoring Script - Red Hat Enterprise Linux Server

Hi all, ------------------------- Linux OS Version/Release: ------------------------- Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux <hostname> 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have a server that hosts 30+ Oracle... (1 Reply)
Discussion started by: newbie_01
1 Replies

7. UNIX for Dummies Questions & Answers

script in Bash 2.05b.0(1) and 3.2.25(1) Red Hat

Hi I have this script #!/bin/bash cat status.txt | while read LINE do linija="$LINE" echo $linija echo $linija | awk '{print $1}' > temp.txt koj=`tail -1 temp.txt` echo $koj echo $linija | awk '{print $2}' > temp1.txt kolku=`tail... (7 Replies)
Discussion started by: Ruzeil
7 Replies

8. Linux

red hat ent 4 cron script

hi i need to put the full path of every executable i need to put on my script. on the testing you don't need it but if it's running from cron you need to put the full path of the executable or another script. what's the work around for this? Thanks. (1 Reply)
Discussion started by: itik
1 Replies

9. UNIX for Dummies Questions & Answers

Red Hat shell

Good morning. I am using RedHat shell. when running the .out file of a program I wrote, I cannot see a terminal with the outputs. I know that the program runs, because the files to be changed are changed. how can I see the terminal (As I see it in windows)? Thanks, Ido. (2 Replies)
Discussion started by: ginodii
2 Replies
Login or Register to Ask a Question