[Webinar] Streamline your web hosting managementRegister Today


SMTP code: 503

Posted on 2004-10-29
Medium Priority
Last Modified: 2010-03-18

I got this situation and I have no idea why it caused SMTP code 503...please help me.

This is what I tried to do.  I try to run my program and send warning email if a condition is satisfied.  But I cannot receive any warning emails so I use a lan analyzer to detect what's wrong...and I got this SMTP code 503.  What will cause this problem and how can I solve this problem.  My program runs fine with other Linux 9.0....not sure which setting in Linux I should modify...Any idea????


Question by:xenia27
  • 4
  • 3
LVL 10

Expert Comment

ID: 12442010
Hi xenia27,
You're not authenticating with your mail server, that's what that business is about. I don't know what program you are using, but your mail server is set to require authentication for all non-local smtp transfer it looks like. You may want to configure that program to authenticate when it sends mail or make your SMTP server not require authentication if requests are coming from your lan.


Author Comment

ID: 12442023
how can I authenticate my program when it sends mail??  what should I do?  ^^
LVL 10

Expert Comment

ID: 12442075
> Well, what are you doing exactly. Is your mail server on your network or are you using an ISP mail server or what? Also, did you write this program, is it a shell script or what?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.


Author Comment

ID: 12442410
OK...my mail server is on our network...
I write this program...and it's an executable program in C++...
So what should I do?

Author Comment

ID: 12442445
By the way, why I got this error message, "Error: send HELO/EHLO first", which came with error 503??  

Accepted Solution

Matt_Avery earned 1000 total points
ID: 12443070
Sounds as if you have written a program that attempts to communicate directly with an SMTP server by opening a connection to port 25 on the server and speaking raw SMTP.

That's daft, in my opinion. Why bother writing your own SMTP routines, when you can invoke the "mail" or "mailx" programs and use someone else's implementation?
However, if you *must* send raw SMTP messages, you should probably take the time to read RFC821 ( http://www.faqs.org/rfcs/rfc821.html ). A successful SMTP protocol session (*without authentication*) goes something like this:

client:  HELO  foo
server:  250 Hello
client : MAIL FROM: <fred@foo.com>
server:  250  <fred@foo.com>... Sender ok
client:  RCPT TO: <fred@bar.comt>
server:  250  <matt@bar.comt>... Recipient ok
client:  DATA
server:  354 Enter mail, end with "." on a line by itself
client:  Subject: Hi!
client:  This is a test mail
client:  .
server:  250  Message accepted for delivery
client:  QUIT
server:  221 Closing connection

Perhaps you are skipping the "HELO", "MAIL FROM:", "RCPT TO:" and "DATA" commands and trying to launch directly into sending the headers and body of an e-mail?

LVL 10

Assisted Solution

NetworkArchitek earned 1000 total points
ID: 12443123
Well after seeing you are getting the EHLO/HELO first message I may have to agree with Matt. I would wonder how you are implementing the mail function in your program. Though are you having any problems sending mail using the server from other clients, not using your program?

Author Comment

ID: 12500856
Sorry for taking this long...but I'm still waiting for the reply after I adding HELO in my program..However, I think this will work!  Thank you~~~

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

590 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