LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 02-06-2012, 07:46 AM   #1
graziano1968
Member
 
Registered: Sep 2004
Posts: 212

Rep: Reputation: 30
telnet and ehlo


Hello

is it possible to send a

telnet domain.com 25

followed by a

ehlo host.com

using a single command ?

I was thinking to use
telnet domain.com 25 | EHLO c4host.com

but it does not work . Any suggestion please ?

Thank you
 
Old 02-06-2012, 07:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,853

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
you could use expect, but what do you actually want to achieve here? do you want to bring the connection the the end user afterwards etc?
 
Old 02-06-2012, 10:09 AM   #3
fritz001
Member
 
Registered: Aug 2004
Posts: 100

Rep: Reputation: 18
echo -e "ehlo me\nquit\n"|nc domain.com 25
 
Old 02-06-2012, 11:52 AM   #4
graziano1968
Member
 
Registered: Sep 2004
Posts: 212

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by acid_kewpie View Post
you could use expect, but what do you actually want to achieve here? do you want to bring the connection the the end user afterwards etc?
I am writing a bash script and I am searching a way to check is STARTTLS is available for checked mail ports.
I can do it from console , in the way above, however I need to know a way to do it using a bash script (without an interactive console).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ehlo world RudyGomez LinuxQuestions.org Member Intro 1 12-03-2010 08:47 AM
EHLO everyone jjuhl LinuxQuestions.org Member Intro 1 03-25-2009 06:24 PM
ehlo penguinbrain LinuxQuestions.org Member Intro 1 04-20-2008 03:00 PM
SMPT EHLO [IP] instead of EHLO hostname pave Linux - General 0 10-12-2004 10:01 AM
Ehlo gubak Linux - Networking 1 08-10-2004 04:19 AM


All times are GMT -5. The time now is 10:00 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration