Solved

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

Posted on 2004-08-05
3
1,384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 250 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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