Solved

SMTP ?

Posted on 1998-03-06
5
436 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IPV6 and AWS 3 50
Independent domain networks for setup 6 78
HP Laser Jet Errors 10 50
Security Alert 2 38
What is IRC? IRC (Internet Relay Chat) is a form of communication between multiple users. It is available freely to anyone with inernet access. IRC is a great way to communicate with others e.g. There is an IRC channel for Ubuntu Linux, which is fo…
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

12 Experts available now in Live!

Get 1:1 Help Now