LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 06-14-2013, 04:55 AM   #1
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Rep: Reputation: Disabled
telnet to smtp SERVER


can anyone give a working example for telnet to smtp server.
i tried this
telnet mail.isp.com 25
here the remote host rejecting my connection.

i tried
telnet smtpcorp.com 25
its connecting but failed to send mail.

my aim is to send an email using these technique. pls help me,this is for my study purpose only,
 
Old 06-14-2013, 05:26 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
You can get a reasonable idea what the conversation looks like using what is displayed by sendmail -v .
 
Old 06-14-2013, 05:38 AM   #3
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,680

Rep: Reputation: Disabled
The SMTP protocol itself it fairly simple: You start with HELO or EHLO, state the sender address with the MAIL TO command, specify the recipient with the RCPT TO command, and finally send the mail itself with the DATA command.

Most SMTP servers will refuse mail from blacklisted IP addresses, which usually include all IP ranges used by ISPs for dynamic address assignment. Some servers will accept the connection but reject the mail, while others refuse the TCP connection altogether. Also, your mails may be rejected by a number of anti-spam measures.

ISP mail relays are increasingly using the mail submission port (587) rather than port 25, usually in combination with StartTLS and forced authentication.
 
1 members found this post helpful.
Old 06-14-2013, 06:51 AM   #4
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Quote:
telnet smtpcorp.com 25
ehlo testmachine
mail from: <sender mail id>
rcpt to: <receiver mail id>
data
How are you? (Mail Body)
.
Above command will help you.

Thanks
 
1 members found this post helpful.
Old 06-14-2013, 09:06 AM   #5
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
The SMTP protocol itself it fairly simple: You start with HELO or EHLO, state the sender address with the MAIL TO command, specify the recipient with the RCPT TO command, and finally send the mail itself with the DATA command.

Most SMTP servers will refuse mail from blacklisted IP addresses, which usually include all IP ranges used by ISPs for dynamic address assignment. Some servers will accept the connection but reject the mail, while others refuse the TCP connection altogether. Also, your mails may be rejected by a number of anti-spam measures.

ISP mail relays are increasingly using the mail submission port (587) rather than port 25, usually in combination with StartTLS and forced authentication.
so how i can become whitelist ip address. what is the other ways to send mail in this way if am blacklisted.
 
Old 06-14-2013, 09:26 AM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,680

Rep: Reputation: Disabled
Quote:
Originally Posted by mr.cracker View Post
so how i can become whitelist ip address. what is the other ways to send mail in this way if am blacklisted.
If you're running a mail server and have been assigned a fixed, public IP address, and the host name is registered as a mail exchanger for the domain of the sender, you should be able to send mail anywhere. Ideally, you should also create Sender Policy Framework records in DNS.

However, if you're a regular broadband customer with a dynamic IP address, that address cannot be whitelisted, as blacklist providers such as SpamCop and Spamhaus just don't allow it. This is a Good Thing, as it helps prevent spam.

You will most likely have to use the relay server provided by the ISP. As I mentioned, this server may use the Mail Submission port rather than the standard SMTP port, and may require authentication and StartTLS, the latter of which rules out using a telnet client to send e-mails.
 
1 members found this post helpful.
Old 06-14-2013, 09:33 AM   #7
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vishesh View Post
Above command will help you.

Thanks
i tried but it gave,
550 relay refused myname101@yahoo.com/117.217.236.100 unauthenticated

what wil i do?

Last edited by mr.cracker; 06-14-2013 at 09:34 AM.
 
Old 06-14-2013, 09:35 AM   #8
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by linosaurusroot View Post
You can get a reasonable idea what the conversation looks like using what is displayed by sendmail -v .
i didnt get!
 
Old 06-14-2013, 09:38 AM   #9
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,680

Rep: Reputation: Disabled
Quote:
Originally Posted by mr.cracker View Post
i tried but it gave,
550 relay refused myname101@yahoo.com/117.217.236.100 unauthenticated

what wil i do?
The error message makes it pretty clear that the server requires authentication.
 
1 members found this post helpful.
Old 06-14-2013, 11:21 AM   #10
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
When you execute below command you will get list of commands features by MTA, what are those commands

Quote:
telnet smtpcorp.com 25
ehlo testmachine
Thanks
 
1 members found this post helpful.
Old 06-14-2013, 11:18 PM   #11
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by vishesh View Post
When you execute below command you will get list of commands features by MTA, what are those commands



Thanks
sorry not tat also not working ! any other sugestions
 
Old 06-15-2013, 10:54 PM   #12
mahesh.saga
LQ Newbie
 
Registered: Jul 2008
Location: Hyderabad,India
Distribution: Redhat,CentOS,Ubuntu
Posts: 16

Rep: Reputation: 0
Hi Mr.Cracker,


Check the smtp port number and check the service is running or not then try to telnet using that port number.


--
Mahesh Saga
System Administrator,
+91 77 02 445511
<moderated>

Last edited by colucix; 06-22-2013 at 03:59 AM. Reason: Removed link to totally unrelated site
 
Old 06-16-2013, 12:03 PM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,236

Rep: Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973Reputation: 5973
Quote:
Originally Posted by mahesh.saga View Post
Hi Mr.Cracker,
Check the smtp port number and check the service is running or not then try to telnet using that port number.
The port is obviously correct, since they were able to connect to it WITH telnet. Did you not read any of the previous posts???

Ser Olmy answered the question in post #6. OP, you're going to have to work with your ISP, unless you're running your own mail server in accordance with the guidelines of your provider.
 
1 members found this post helpful.
Old 06-19-2013, 12:20 AM   #14
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vishesh View Post
When you execute below command you will get list of commands features by MTA, what are those commands



Thanks
i got this,

ehlo testmachine
250-smtpcorp.com Hello testmachine [117.196.163.244]
250-SIZE 52428800
250-PIPELINING
250-AUTH CRAM-MD5 PLAIN LOGIN
250-STARTTLS
250 HELP
 
Old 06-19-2013, 12:26 AM   #15
mr.cracker
Member
 
Registered: May 2012
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
The error message makes it pretty clear that the server requires authentication.
HOW I WILL ACHIEVE AUTHENTICATION.
I TYPED GOT THE FOLLOWING,

AUTH CRAM-MD5
334 PDM0ODUuMTM3MTYxNTc1OEBzbXRwY29ycC5jb20+
AUTH PLAIN LOGIN
HELP

1501 Invalid base64 data
HELP AUTH
214-Commands supported:
214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP
AUTH
500 unrecognized command
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] telnet to smtp server is closing immediately sohmc Linux - Server 4 04-18-2011 02:29 PM
PHP mail not connecting to SMTP server but can connect with telnet mrJimmbo Linux - Server 1 12-12-2006 06:51 PM
authentication to SMTP server to avoid telnet sailu_mvn Linux - Software 2 12-20-2005 04:52 AM
Accessing an SMTP server via TELNET ganninu Linux - Security 14 12-10-2003 03:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration