Solved

SMTP ?

Posted on 1998-03-06
5
439 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
  • 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using BGP Attributes 2 89
Martian Packets Unix 5 54
Clarification on Network "Usage" for ESXi host. 13 70
Wired Network vs Wireless 12 58
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

825 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