Solved

SMTP ?

Posted on 1998-03-06
5
442 Views
Last Modified: 2013-12-23
Is there any method of knowing the possiblee SMTP ccommands
an email server (say SENDMAILD) may issue to its remote SMTP server while sending mails.
I have implemented an email server that speaks SMTP. I am able to send mails to remote SMTP servers but I amm unable to receive mails from them. I have implemented the minimal set of SMTP commands like MAIL,HELO,RCPT,DATA,NOOP,RSET,HELP. Please do explain me the reasons for my inability to receive mails from remote mail servers. But do remember that I am able tto send mails to those servers through mine.So pl. exxplain me if there is any possibility to know the probabale SMTP commands a remote mails systemm may issue to my server so that I may know the reasons for my problem.
Thank You.
0
Comment
Question by:meyaps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1583177
First, you need to be prepared to accept the "500" response which is the server saying, "I don't know that command".  In that case you either try a more basic command or give up.  The ones you have listed:

MAIL,HELO,RCPT,DATA,NOOP,RSET,HELP

are basic and any SMTP mailer should support them.  You can also try the "EHLO" command to see if it support ESMTP.  You should get back a list of supported commands like this:

EHLO www.myhost.com
250-www.myserver.com Hello joe@localhost [127.0.0.1], pleased to meet you
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP


If you have implemented a mailer and can send, that's half the job.  You need to debug the receiver process and see what's going on.  Have you tried sending to yourself manually through a telnet session?  You should also be able to put some debugging output in your code to track where the incoming mail is going wrong.
0
 

Author Comment

by:meyaps
ID: 1583178
I tried by telnetting to my server which was listening at the well defined port 25 for connections,it just worked well but when I tried from a remote machine having sendmail deamon , my server did not respond. Moreover the mail that I tried  to send using the senddmail deamon were queued up in /var/spool/mail/mqueue directory.
0
 
LVL 32

Expert Comment

by:jhance
ID: 1583179
I don't really understand your last comment.  Did you diagnose the problem or are you still having trouble?  I've written several SMTP server utilities and will be glad to stay with you on this.
0
 

Author Comment

by:meyaps
ID: 1583180
Hi Jhance, I am still havinng the trouble. My server is still unable
tto receive mails. I tried this by sending a mail from an ESMTP server to mine. Since my server allows only SMTP commands it responded to ESMTP EHLO command by sending a 500 reply. But nothing happened after that. Still I am unablle to resolve this problem. But I am able to send mail to that ESMTP server. I did this proggram using C under linux OS. Moreover pl. explain me the procedure by which the mails within a server are delivered. I terminated the sendmail server running in the background, But still I wwas able to send mails. How is thhat happening ?
Moreover what is  the mailer program that iis used in UNIX/LINUX for sending mails . Is it possible to invoke them manually ? If so how ?
0
 
LVL 32

Expert Comment

by:jhance
ID: 1583181
If I understand you correctly, your SMTP mailer program (which you are writing in C) will send mail to another SMTP server but it will not receive mail.  Can you try this.  Start your mailer up and then try to connect to it with a telnet window and run the protocol manually like this:

www:~$ telnet www.myhost.com 25
Trying 1.2.3.4...
Connected to www.myhost.com.
Escape character is '^]'.
220 www.myhost.com ESMTP Sendmail 8.8.6/8.6.9 ready at Tue, 10 Mar 1998 06:09:26 -0500
HELO mypc.myhost.com
250 www.myhost.com Hello joe@mypc.myhost.com [1.2.3.5], pleased to meet you
MAIL FROM: billybob@anywhere.com
250 billybob@anywhere.com... Sender ok
RCPT TO: joe@myhost.com
250 joe@myhost.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
This is a test
.
250 GAA01812 Message accepted for delivery
quit
221 www.myhost.com closing connection
Connection closed by foreign host.
www:~$

After you've done this, please post the transcript here.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RHEL6 + dockers - No route to host 7 95
WDS can't PXE boot 3 83
VLAN Questions 3 66
VPN Exposure 19 29
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question