?
Solved

PHP, SMTP and IIS - Relaying and "501 Syntactically invalid" error

Posted on 2004-08-05
3
Medium Priority
?
1,404 Views
Last Modified: 2013-12-19
Hi there,

I'm running PHP-based forum software on a web server.  The software sends e-mail to our users when an event happens, such as sending validation e-mail, or a post was replied to, etc.  I'm using IIS to host the forums, and would like to use Window's built in SMTP server to allow PHP to send mail through it.

I have it up and running and mostly working...  What I did was install the SMTP server, and allowed 127.0.0.1 to relay through it so it would send e-mail out.  Question One: Is this correct (and best) practice?

Question Two: The odd thing is that on about 30% of the mail servers my server connects to to send a message, I get a warning back that says, "501 Syntactically invalid HELO argument(s)" in my Event Viewer.

Technically I don't use the SMTP server to receive mail, only to send it.  I assume this is because those mail servers are trying to use reverse DNS and failing because I don't have an MX record pointing to my forum server?  If not, what do I do to fix that warning?

Thanks,
G
0
Comment
Question by:Gonthax
3 Comments
 
LVL 37

Expert Comment

by:meverest
ID: 11731768
Hello,

answer 1: Sure - if the only use for the smtp server is to relay mail generated by the web apps, then that will be fine.  If you wanted, you could go one step further and allow only localhost to *connect*.  Since all mail will be outbound, and no need to accept external connections for local mail delivery, then there is no reason why anyone else will need access to the smtp service.

answer 2: 'syntactically incorrect' suggests more than just a reverse lookup failure.  are you sure that the error is generated by the remote server, or could it be the smtp delivery agent you are using in your php code?

cheers.




0
 
LVL 18

Accepted Solution

by:
crissand earned 1000 total points
ID: 11736936
I found some time ago that this error can be generated if the server has an underscore in name. Anyway, you can verify manually if the hello syntax is correct, by connecting with a telnet program on port 25 of the server and type the hello sequence used. Somtimes the spam killers program can generate this error. The spam killers can try to connect back to the server to verify of it's valid, thus the eror can be connected to the mx record in dns.
0
 
LVL 1

Author Comment

by:Gonthax
ID: 11745543
It turned out to be an underscore in the hostname of the computer.  I removed that, tested it using your telnet suggestion, and that the command went through properly!

meverest, I'll make a new topic for you for points -- I didn't see the Assisted Answer feature when I accepted crissand's comment.

Thanks both of you!
-G
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

840 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