Solved

SMTP ?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now